genCMM {genSurv} | R Documentation |
Generation of Cox Markov data from an illness-death model.
genCMM(n, model.cens, cens.par, beta, covar, rate)
n |
Sample size. |
model.cens |
Model for censorship. Possible values are "uniform" and "exponential". |
cens.par |
Parameter for the censorship distribution. Must be greater than 0. |
beta |
Vector of three regression parameters for the three transitions: (beta_12,beta_13,beta_23). |
covar |
Parameter for generating the time-fixed covariate. An uniform distribution is used. |
rate |
Vector of dimension six: (shape1, scale1, shape2, scale2, shape3, scale3). A Weibull baseline hazard function is assumed (with two parameters) for each transition (see details below). |
The Weibull distribution with shape parameter λ and scale parameter θ has hazard function given by:
α(t)=λθ t^{θ-1}
An object with two classes, data.frame
and CMM
.
The data structure used for generating survival data from the Cox Markov Model (CMM) is similar as for the time-dependent Cox model (TDCM).
In this case the data structure has one more variable representing the transition (variable trans
).
trans=1
denotes the transition from State 1 to State 3 (without observing the intermediate event; State 2);
trans=2
denotes the transition from State 1 to State 2; and trans=3
denotes the transition from State 2 to State 3 (absorbing).
Artur Araújo, Luís Meira Machado and Susana Faria
Meira-Machado, L., Cadarso-Suárez, C., De Uña- Álvarez, J., Andersen, P.K. (2009). Multi-state models for the analysis of time to event data. Statistical Methods in Medical Research, 18(2):195-222.
Meira-Machado, L., Roca-Pardiñas, J. (2011). p3state.msm: Analyzing Survival Data from an Illness-Death Model. Journal of Statistical Software, 38(3): 1-18.
Therneau, T.M., Grambsch, P.M. (2000). Modelling survival data: Extending the Cox Model. New York: Springer.
cmmdata <- genCMM( n=1000, model.cens="uniform", cens.par=2.5, beta=c(2,1,-1), covar=10, rate=c(1,5,1,5,1,5) ) head(cmmdata, n=20L) library(survival) fit_13<-coxph(Surv(start,stop,event)~covariate, data=cmmdata, subset=c(trans==1)) fit_13 fit_12<-coxph(Surv(start,stop,event)~covariate, data=cmmdata, subset=c(trans==2)) fit_12 fit_23<-coxph(Surv(start,stop,event)~covariate, data=cmmdata, subset=c(trans==3)) fit_23