Learn R Programming

SLTCA (version 0.1.0)

simulation: Simulate a dataset which can be analyzed by SLTCA

Description

Simulate a dataset with longitudinal observations.

Usage

simulation(n)

Arguments

n

Sample size.

Value

Returns a data frame with 6 longitudinal features y.1 - y.6, including count (y.1 and y.2), binary (y.3 and y.4) and continuous (y.5 and y.6) type. Variable baselinecov is the baseline risk factor of latent classes. Variable latent is the true latent class labels.

References

Hart, K.R., Fei, T. and Hanfelt, J.J. (2020), Scalable and robust latent trajectory class analysis using artificial likelihood. Biometrics. Accepted Author Manuscript <doi:10.1111/biom.13366>.

Examples

Run this code
# NOT RUN {
dat <- simulation(500)

# }

Run the code above in your browser using DataLab