Learn R Programming

Biograph (version 2.0.6)

Biograph.long: Converts Biograph object to long format

Description

Converts Biograph object to long format used by e.g. the survival and eha packages.

Usage

Biograph.long(Bdata)

Arguments

Bdata
Biograph object

Value

Devent
Data frame with event data: one record for each transition
Depisode
Data frame with episode data: one record for each episode

Details

The function firsts calls Parameters if that function was not called before. The long format is produced by the reshape function. A few variables are added. The long format produced by Biograph.long is used by the survival and eha packages. The mstate, mvna and msm packages require a different long format. Biograph.mstate, Biograph.mvna and Biograph.msm produce these formats.

References

Willekens (2011)

See Also

Biograph.mstate, Biograph.mvna, Biograph.msm

Examples

Run this code
 data(GLHS)
 D <- Biograph.long (Bdata=GLHS)

Run the code above in your browser using DataLab