-
Notifications
You must be signed in to change notification settings - Fork 82
Open
Labels
featurea feature request or enhancementa feature request or enhancement
Description
< -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
Feature
I use the Stat2 textbook in my regression course, and one homework problem asks students to do a randomization test for a multiple linear regression model. But rather than collecting the coefficient estimates from each randomization sample, the question asks students to find some summary statistic about the model, e.g.
null_fits <- gss %>%
specify(hours ~ age + college) %>%
hypothesize(null = "independence") %>%
generate(reps = 100, type = "permute") %>%
fit()
and getting a bunch of null slopes for age
and college
, I would like to get a bunch of null purrr
,
null_fits <- gss %>%
specify(hours ~ age + college) %>%
hypothesize(null = "independence") %>%
generate(reps = 100, type = "permute") %>%
split(.$replicate) %>%
map(~lm(hours~age+college, data = .x)) %>%
map(summary) %>%
map_dbl("r.squared")
But I wish it was better-facilitated by infer
itself.
wjhopper
Metadata
Metadata
Assignees
Labels
featurea feature request or enhancementa feature request or enhancement