as.data.frame.survTP: as.data.frame method for a survTP object

View source: R/as.data.frame.survTP.R

as.data.frame.survTPR Documentation

as.data.frame method for a survTP object

Description

as.data.frame method for an object of class ‘survTP’.

Usage

## S3 method for class 'survTP'
as.data.frame(x, ..., package="TPmsm")

Arguments

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”.

Value

A data.frame in the format specified by argument package.

Author(s)

Artur Araújo, Javier Roca-Pardiñas and Luís Meira-Machado

References

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

See Also

as.data.frame, survTP.

Examples

# 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)

TPmsm documentation built on Jan. 14, 2023, 1:17 a.m.