Generate longitudinal test data
generateLongData(
sizes = c(40, 60),
fixed = Value ~ 1,
cluster = ~1 + Time,
random = ~1,
id = getOption("latrend.id"),
data = data.frame(Time = seq(0, 1, by = 0.1)),
fixedCoefs = 0,
clusterCoefs = cbind(c(-2, 1), c(2, -1)),
randomScales = cbind(0.1, 0.1),
rrandom = rnorm,
noiseScales = c(0.1, 0.1),
rnoise = rnorm,
clusterNames = LETTERS[seq_along(sizes)],
shuffle = FALSE,
seed = NULL
)
Number of strata per cluster.
Fixed effects formula.
Cluster effects formula.
Random effects formula.
Name of the strata.
Data with covariates to use for generation. Stratified data may be specified by adding a grouping column.
Coefficients matrix for the fixed effects.
Coefficients matrix for the cluster effects.
Standard deviations matrix for the size of the variance components (random effects).
Random sampler for generating the variance components at location 0.
Scale of the random noise passed to rnoise. Either scalar or defined per cluster.
Random sampler for generating noise at location 0 with the respective scale.
A character
vector denoting the names of the generated clusters.
Whether to randomly reorder the strata in which they appear in the data.frame.
Optional seed to set for the PRNG. The set PRNG state persists after the function completes.