Learn R Programming

simMSM (version 1.1.42)

tolongformat: Transforms Data Frame into Long Format Design

Description

Data frame with one line per event gets transformed to a data frame in a format that has as many rows as each subject has transitions for which he/she is at risk.

Usage

tolongformat(d, mpl)

Arguments

d

simulated data-set as the return object from the simeventhistories function.

mpl

model parameter list.

Value

A list of data-sets.

Details

In the format of the input data frame object d, the data are not yet suitable for a stratified Cox partial likelihood analysis: we need the data frame in a format that has many rows as each subject has transitions for which he/she is at risk. We will denote this as 'long format' in reference to the literature on multi-state model software, as for example on page 5 in de Wreede et al (2011).

References

Liesbeth C. de Wreede, Marta Fiocco, Hein Putter (2011) mstate: An R Package for the Analysis of Competing Risks and Multi-State Models. Journal of Statistical Software, 38(7), 1-30. URL http://www.jstatsoft.org/v38/i07/.

See Also

simeventhistories

Examples

Run this code
# NOT RUN {
tolongformat(d, mpl)
# }

Run the code above in your browser using DataLab