TPmsmOut: Convert a data.frame in the 'TPmsm' format to other formats

View source: R/TPmsmOut.R

TPmsmOutR Documentation

Convert a data.frame in the TPmsm format to other formats

Description

Converts a data.frame in the TPmsm format to formats supported by external packages.

Usage

TPmsmOut(data, names, package="p3state.msm")

Arguments

data

A data.frame in the TPmsm format.

names

A character vector of lenght 4, indicating the variable names equivalent to variable names “time1”, “event1”, “Stime”, “event” in the TPmsm format, in this order.

package

The format of the data.frame. Possible options are “p3state.msm” and “etm”. Defaults to “p3state.msm”.

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, survTP.

Examples

data(heartTP)
heartP3 <- TPmsmOut( heartTP, c("time1", "event1", "Stime", "event") )
head(heartP3)

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