Description Usage Arguments Value Author(s) Examples
View source: R/tidy_lm_permute.R
permute
lm
and output the results as a tidy
table.
1 | tidy_lm_permute(data, formula, n_permute = 1000, var_permute)
|
data |
a data.frame to be analyzed |
formula |
a formula to be analyzed as typically written for the |
n_permute |
= 1000 (default) the number of permutations to perform |
var_permute |
variable(s) to unlink in the permutation |
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_permute(data = data, formula = "a ~ b + c", n_permute = 100, var_permute = "a")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.