View source: R/as.data.frame.survTP.R
as.data.frame.survTP | R Documentation |
as.data.frame method for an object of class ‘survTP’.
## S3 method for class 'survTP' as.data.frame(x, ..., package="TPmsm")
x |
An object of class ‘survTP’. |
... |
Additional arguments to be passed to or from method. |
package |
The format of the data.frame. Possible options are “TPmsm”, “p3state.msm” and “etm”. Defaults to “TPmsm”. |
A data.frame in the format specified by argument package
.
Artur Araújo, Javier Roca-Pardiñas and Luís Meira-Machado
Allignol A., Schumacher M., Beyersmann J. (2011). Empirical Transition Matrix of Multi-State Models: The etm Package. Journal of Statistical Software, 38(4), 1-15. doi: 10.18637/jss.v038.i04
Araújo A, Meira-Machado L, Roca-Pardiñas J (2014). TPmsm: Estimation of the Transition Probabilities in 3-State Models. Journal of Statistical Software, 62(4), 1-29. doi: 10.18637/jss.v062.i04
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. doi: 10.18637/jss.v038.i03
as.data.frame
,
survTP
.
# Example for the "TPmsm" format weiTP <- dgpTP(n=100, corr=1, dist="weibull", dist.par=c(2, 7, 2, 7), model.cens="exponential", cens.par = 6, state2.prob=0.6) weidata <- as.data.frame(weiTP) head(weidata) # Example for the "etm" format expTP <- dgpTP(n=100, corr=1, dist="exponential", dist.par=c(1, 1), model.cens="uniform", cens.par=3, state2.prob=0.5) expdata <- as.data.frame(expTP, package="etm") head(expdata)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.