Description Usage Arguments Value Author(s) References See Also Examples
Generation of survival data from a time-homogeneous Markov model.
1 |
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. |
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.
Artur Araújo, Luís Meira Machado and Susana Faria
Jackson, C. (2011). Multi-State Models for Panel Data: The msm Package for R. Journal of Statistical Software, 38(8), 1–28. doi: 10.18637/jss.v038.i08
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. doi: 10.1177/0962280208092301
Meira-Machado L., Faria S. (2014). A simulation study comparing modeling approaches in an illness-death multi-state model. Communications in Statistics - Simulation and Computation, 43(5), 929-946. doi: 10.1080/03610918.2012.718841
Meira-Machado, L., Sestelo M. (2019). Estimation in the progressive illness-death model: a nonexhaustive review. Biometrical Journal, 61(2), 245–263. doi: 10.1002/bimj.201700200
Therneau, T.M., Grambsch, P.M. (2000). Modelling survival data: Extending the Cox Model, New York: Springer.
1 2 3 |
PTNUM time state covariate
1 1 0.00000000 1 27.29563
2 1 0.34603421 2 27.29563
3 1 75.50008204 2 27.29563
4 2 0.00000000 1 11.29024
5 2 6.03978341 3 11.29024
6 3 0.00000000 1 40.94547
7 3 0.24411471 2 40.94547
8 3 27.54375381 2 40.94547
9 4 0.00000000 1 75.97174
10 4 0.02467472 3 75.97174
11 5 0.00000000 1 72.87969
12 5 0.03255812 2 72.87969
13 5 79.17631030 2 72.87969
14 6 0.00000000 1 41.65639
15 6 0.10750566 3 41.65639
16 7 0.00000000 1 49.21315
17 7 0.07773812 3 49.21315
18 8 0.00000000 1 54.89188
19 8 0.02821177 2 54.89188
20 8 20.37991060 2 54.89188
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.