| get_random_effects_structure | R Documentation |
Analyzes the random effects terms in a model formula and generates a template
for the specified random_effects parameters. This helps in specifying the required
standard deviations and correlations correctly. By default, this function prints a copy-paste-able code snippet
to the console, where the user only needs to fill in placeholders (...) for the values.
get_random_effects_structure(formula, design, family = "gaussian")
formula |
An lme4-style model formula (e.g. |
design |
A |
family |
The model family ( |
Invisibly returns a nested list with placeholders, serving as a
template for the random_effects argument in power_sim().
design <- define_design(
sample_size = list(subject = 20),
within = list(time = c("pre", "post"))
)
get_random_effects_structure(y ~ time + (time|subject), design, family = "gaussian")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.