View source: R/simulation_functions.R
simulateDataset | R Documentation |
simulateDataset()
builds a new data set with a specified number of
subjects. It uses the lme4::simulate()
function to create new response
values based on the mixed model fittet to the pilot data.
simulateDataset(n_want, data, model, simvar, fixed_effects, use_u = F)
n_want |
integer: how many subjects should the new data set include? |
data |
data frame: pilot data that fits the mixed model of interest |
model |
lme4 model: mixed model of interest |
simvar |
character element: name of the varaible containing the subject |
fixed_effects |
fixed effects specified in model number in data |
A modified mixed model
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.