Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI for slope #26

Closed
hardin47 opened this issue Jul 13, 2017 · 3 comments
Closed

CI for slope #26

hardin47 opened this issue Jul 13, 2017 · 3 comments

Comments

@hardin47
Copy link

@andrewpbray

I'm doing CIs for the linear model case. Can that option also be implemented in infer?

Also, I don't know if you were asking for advice for the linear model hypothesize function, But I prefer "slope=0". That way, the ideas are easier to generalize to multivariate models. I'm also not opposed to having both options be possible as hypothesize arguments.

@andrewpbray
Copy link
Collaborator

andrewpbray commented Jul 13, 2017

Hmm, are you thinking CIs on E(Y|X) or on B1? If the latter, yes, it's no problem to set up the bootstrap. I've added that to the README as the final use case to build out.

In terms of the parameterization of hypothesize(), we have two options I think:

hypothesize(null = "independence")
# or
hypothesize(null = "point", slope = c("xvarname" = 0))

For the permutation test on the slope, the former strikes me as a more apt description of the null since permutation implies that the slope is 0 and that the intercept is y_bar - a bit stronger hypothesis than simply that the slope is 0. It's a similar argument to whether the null in the diff in means case should be "independence" or that the means are equivalent. I think the former is more appropriate there since, under permutation, all sorts of summary stats are equivalent, not just the means.

Does this make sense?

@hardin47
Copy link
Author

  1. Right, we're on the same page: I do both (CIs for E(Y|X) and B1), however, I only bootstrap CIs for B1 (the E(Y|X) CI is done using theory).

  2. As for the null within hypothesize, I totally get your point. I think my hesitation simply has to do with being used to teaching it as B1=0.

I hadn't thought about (or noticed) the null being = independence for 2 means. I agree that it is more in line with the idea of permuting, but I wonder if it will confuse people. Do you usually teach the two sample mean problem as a problem of independence? I don't. But I guess I should. (Maybe????) I don't have strong opinions one way or another.

@github-actions
Copy link

github-actions bot commented Mar 9, 2021

This issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue.

@github-actions github-actions bot locked and limited conversation to collaborators Mar 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants