Learn R Programming

Biograph (version 1.0)

Biograph.mstate: Biograph to mstate object of class "msdata"

Description

Converts Biograph object to input data for mstate package.

Usage

Biograph.mstate(survey)

Arguments

survey
Biograph object

Value

  • Data in msdata format, used by the mstate package.

Details

The procedure consists of four steps: a. Remove intra-state transitions. First the functions Extract and Remove_intrastate are called. b. Produce long format c. Create msdata format (mstate format) from long format by producing one record of input data for each possible destination from a given origin and by adding the attribute "trans".

References

ADD

Examples

Run this code
data (GLHS)
  D <- Biograph.mstate (GLHS)
  # Function events of mstate package
  library (mstate)
  events (D)
  s <- coxph(Surv(Tstart,Tstop,status)~edu+sex,data=D,method="breslow")

Run the code above in your browser using DataLab