as.data.frame.survTP {TPmsm} | 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.
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.
# 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)