to_formula | R Documentation |
mp_data
to a stats::formula
to be used for lme4::lmer
Produces the formula including the centering functions based on a data set generated with generate
.
to_formula(data, nested = FALSE)
data |
the |
nested |
logical value, if true then produce the nested restricted model |
a stats::formula
# Specify model
model <- (
outcome('Y')
+ within_predictor('X')
+ effect_size(
icc = 0.2,
within = 0.3
)
)
# Set seed
set.seed(198723)
# Create formula based on data set
model |> generate(5, 50) |> to_formula()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.