generateMixedEffectDatasets {robustlmm} | R Documentation |
Generate Mixed Effects Datasets
Description
Generates mixed effects datasets using parametric bootstrap.
Usage
generateMixedEffectDatasets(
numberOfDatasetsToGenerate,
preparedDataset,
errorGenerator = rnorm,
randomEffectGenerator = rnorm
)
Arguments
numberOfDatasetsToGenerate |
number of datasets to generate. |
preparedDataset |
dataset as prepared by
|
errorGenerator |
random number generator used for the errors. |
randomEffectGenerator |
random number generator used for the spherical random effects. |
Value
list with generators and the contents of the prepared dataset. See
prepareMixedEffectDataset
and
generateAnovaDatasets
for a description of the contents.
Author(s)
Manuel Koller
See Also
generateAnovaDatasets
,
prepareMixedEffectDataset
and
createDatasetsFromList
Examples
preparedDataset <- prepareMixedEffectDataset(Reaction ~ Days + (Days|Subject), sleepstudy)
datasets <- generateMixedEffectDatasets(2, preparedDataset)
head(datasets$generateData(1))
head(datasets$generateData(2))
datasets$formula
head(datasets$randomEffects(1))
head(datasets$sphericalRandomEffects(1))
head(datasets$errors(1))
[Package robustlmm version 3.3-1 Index]