An internal helper function that takes a complete design matrix and simulates the dependent variable based on the specified fixed and random effects.
.simulate_outcome(
design_df,
formula,
fixed_effects,
sds_random,
family = "gaussian"
)The input design_df with an added column for the outcome variable.
The data frame from .create_design_matrix.
The model formula.
A list of the fixed effects coefficients.
A list of the random effects' standard deviations and correlations.
A string indicating the model family.