genTHMM {genSurv}R Documentation

Generation of survival data from a time-homogeneous Markov model

Description

Generation of survival data from a time-homogeneous Markov model.

Usage

genTHMM(n, model.cens, cens.par, beta, covar, rate)

Arguments

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 three. We assume an exponential baseline hazard function with constant hazard rate for each transition.

Value

An object with two classes, data.frame and THMM. For generating survival data from the THMM model, the counting process data structure must contain the following variables: id, time, state, covariate. Each patient is identified by id. The variable time represents time for each interval of follow-up while variable state denotes the state of the individual. Variable covariate is the (time-fixed) covariate to be studied in the regression model. Individuals without change in the time dependent covariate are represented by two lines of data, whereas patients with a change in the time-dependent covariate must be represented by three lines.

Author(s)

Artur Araújo, Luís Meira Machado and Susana Faria

References

Jackson, C. (2007). Multi-state modelling with R: the msm package, Cambridge, U.K.

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.

Therneau, T.M., Grambsch, P.M. (2000). Modelling survival data: Extending the Cox Model. New York: Springer.

See Also

genCMM, genTDCM, genCPHM.

Examples

thmmdata <- genTHMM( n=100, model.cens="uniform", cens.par=80, beta= c(0.09,0.08,-0.09),
covar=80, rate= c(0.05,0.04,0.05) )
head(thmmdata, n=20L)

[Package genSurv version 1.0.3 Index]