powered by
Provides datasets for running examples for LCGA-MSM and LCGA-HRMSM.
gendata( n, include_censor = FALSE, format = c("long", "wide"), start_year = 2011, total_followup, timedep_outcome = FALSE, seed )
A data frame with generated data trajectories.
Number of observations to generate.
Logical, if TRUE, includes censoring.
Character, either "long" or "wide" for the format of the output data frame.
Baseline year.
Number of measuring times.
Logical, if TRUE, includes a time-dependent outcome.
Use a specific seed value to ensure the simulated data is replicable.
gendata(n = 100, include_censor = FALSE, format = "wide",total_followup = 3, seed = 945)
Run the code above in your browser using DataLab