gendata {trajmsm} | R Documentation |
Generate data trajectories for MSM
Description
Provides datasets for running examples for LCGA-MSM and LCGA-HRMSM.
Usage
gendata(
n,
include_censor = FALSE,
format = c("long", "wide"),
start_year = 2011,
total_followup,
timedep_outcome = FALSE,
seed
)
Arguments
n |
Number of observations to generate. |
include_censor |
Logical, if TRUE, includes censoring. |
format |
Character, either "long" or "wide" for the format of the output data frame. |
start_year |
Baseline year. |
total_followup |
Number of measuring times. |
timedep_outcome |
Logical, if TRUE, includes a time-dependent outcome. |
seed |
Use a specific seed value to ensure the simulated data is replicable. |
Value
A data frame with generated data trajectories.
Examples
gendata(n = 100, include_censor = FALSE, format = "wide",total_followup = 3, seed = 945)
[Package trajmsm version 0.1.0 Index]