Description Usage Arguments Value Author(s) Examples
View source: R/tidy_lm_bootstrap_permute.R
permute
lm
and output the results as a tidy
table.
1 2 3 | tidy_lm_bootstrap_permute(data, formula, n_bootstrap = 1000,
bootstrap_ci = 0.95, n_permute = 1000, var_permute,
r_squared_ci = 0.95)
|
data |
a data.frame to be analyzed |
formula |
a formula to be analyzed as typically written for the |
n_bootstrap |
= 1000 (default) the number of bootstraps to perform |
bootstrap_ci |
= 0.95 (default) |
n_permute |
= 1000 (default) the number of permutations to perform |
var_permute |
variable(s) to unlink in the permutation |
r_squared_ci |
= 0.95 (default) |
outputs tidy
table that includes the p.value from the permutation of a lm
test
Ekarin Eric Pongpipat
1 2 3 4 5 6 7 8 9 10 11 | packages <- c("broom", "broomExtra", "dplyr", "modelr", "purrr", "tibble")
xfun::pkg_attach2(packages, message = F)
data <- tibble(
a = scale(sample.int(100), scale = F),
b = scale(sample.int(100), scale = F),
c = b^2,
d = scale(sample.int(100), scale = F)
)
tidy_lm_bootstrap_permute(data, a ~ b, var_permute = "a")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.