View source: R/simulation_functions.R
simulateModel | R Documentation |
simulateModel()
builds a new model set with a specified number of
levels of a specified random effect.
simulateModel(model, data, n_want, simvar, fixed_effects)
model |
lme4 model: starting mixed model used for simulation |
data |
data frame: data used to inform the simulation |
n_want |
integer: how many levels should the new model be based on? |
simvar |
character element: name of the varaible containing the random effect levels |
fixed_effects |
vector containing variable names used as fixed effects |
A modified mixed model
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.