# NOT RUN {
mtcars_df <- mtcars %>%
dplyr::mutate(am = factor(am))
d_hat <- mtcars_df %>%
specify(mpg ~ am) %>%
calculate(stat = "diff in means", order = c("1", "0"))
bootstrap_distn <- mtcars_df %>%
specify(mpg ~ am) %>%
generate(reps = 100) %>%
calculate(stat = "diff in means", order = c("1", "0"))
bootstrap_distn %>% conf_int(level = 0.9)
bootstrap_distn %>% conf_int(type = "se", point_estimate = d_hat)
# }
Run the code above in your browser using DataLab