| .auto_data_generator | R Documentation |
Creates a simulation function taking n (sample size) and a named effect vector/list. Supports multiple predictors, brms-style random effects, and most GLM families.
.auto_data_generator(
formula,
effect_name,
family = gaussian(),
family_args = list(),
error_sd = 1,
group_sd = 0.5,
obs_per_group = 10,
predictor_means = NULL,
predictor_sds = NULL
)
formula |
Model formula (may include brms-style random effects). |
effect_name |
Character vector of fixed effect names to manipulate. |
family |
brms family object, e.g. gaussian(), binomial(). |
family_args |
Named list of family-specific arguments. |
error_sd |
Residual SD for Gaussian-like families. |
group_sd |
SD of random effects. |
obs_per_group |
Number of observations per grouping level. |
predictor_means |
Named list of means for continuous predictors. |
predictor_sds |
Named list of SDs for continuous predictors. |
Function: function(n, effect) returns a data.frame with n rows.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.