# NOT RUN {
x <- rnorm(20)
y <- rnorm(20) + x
xy_data = data.frame(x = x, y = y)
first_model <- lm(y ~ x, data = xy_data)
out_list <- bootstrap_model(first_model, base_data = xy_data, 20,
return_coefs_instead = TRUE)
bootstrap_ci(out_list$base_coef_se,
out_list$resampled_coef_se)
# }
# NOT RUN {
data(test_data)
library(glmmTMB)
## where subj is a random effect
test_model <- glmmTMB(y ~ x_var1 + (1 | subj),
data = test_data, family = binomial)
output_lists <- bootstrap_model(test_model, base_data = test_data, 199,
return_coefs_instead = TRUE)
bootstrap_ci(output_lists$base_coef_se,
output_lists$resampled_coef_se)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab