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

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/TPmsmOut.R

Description

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

Usage

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

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.

See Also

as.data.frame.survTP, survTP.

Examples

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

TPmsm documentation built on Aug. 5, 2019, 1:02 a.m.