Learn R Programming

Biograph (version 1.0)

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(survey)

Arguments

survey
Input data

Value

  • DeventEvent file: one record for each transition
  • DepisodeEpisode file: one record for each episode

Details

The functions firsts calls Extract if that function was not called before. After calling the reshape function to generate the long format, 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 long, but different 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 (GLHS)

Run the code above in your browser using DataLab