bindDatasets {robustlmm} | R Documentation |
Bind Generated Datasets
Description
This method can be used to bind multiple datasets generated using different random genrators into one large dataset. The underlying dataset needs to be the same.
Usage
bindDatasets(..., datasetList = list(...))
Arguments
... |
multiple datasets to be bound together |
datasetList |
list of datasets created with one of the generate dataset functions |
Value
merged 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
Examples
datasets1 <- generateAnovaDatasets(2, 4, 4, 4)
datasets2 <- generateAnovaDatasets(2, 4, 4, 4)
datasets <- bindDatasets(datasets1, datasets2)
data <- datasets$generateData(1)
stopifnot(data$numberOfDatasets == 4,
all.equal(datasets2$generateData(1), datasets$generateData(3),
check.attributes = FALSE),
all.equal(datasets2$sphericalRandomEffects(1), datasets$sphericalRandomEffects(3)),
all.equal(datasets2$createXMatrix(data), datasets$createXMatrix(data)),
all.equal(datasets2$createZMatrix(data), datasets$createZMatrix(data)))
preparedDataset <- prepareMixedEffectDataset(Reaction ~ Days + (Days|Subject), sleepstudy)
datasets1 <- generateMixedEffectDatasets(2, preparedDataset)
datasets2 <- generateMixedEffectDatasets(2, preparedDataset)
datasets <- bindDatasets(datasets1, datasets2)
data <- datasets$generateData(1)
stopifnot(data$numberOfDatasets == 4,
all.equal(datasets2$generateData(1), datasets$generateData(3),
check.attributes = FALSE),
all.equal(datasets2$sphericalRandomEffects(1), datasets$sphericalRandomEffects(3)),
all.equal(datasets2$createXMatrix(data), datasets$createXMatrix(data)),
all.equal(datasets2$createZMatrix(data), datasets$createZMatrix(data)))
[Package robustlmm version 3.3-1 Index]