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.
tolongformat(d, mpl)
Arguments
d: simulated data-set as the return object from the simeventhistories function.
mpl: model parameter list.
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).
Returns
A list of data-sets.
Author(s)
Holger Reulen
See Also
simeventhistories
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/.