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

Description Usage Arguments Details Value Author(s) References Examples

Description

Converts Biograph object to input data for mstate package (long format).

Usage

1

Arguments

Bdata

Biograph object

Details

The procedure consists of four steps:

a. Remove intra-state transitions. First the functions Parameters and Remove.intrastate are called.

b. Produce long format

c. Create object of class "msdata" (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".

Value

Data in msdata format, used by the mstate package.

Author(s)

Frans Willekens

References

Putter, H., M. Fiocco and R.B. Geskus (2007) Tutorial in biostatistics: competing risks and multi-state models. Statistics in Medicine, 26:2389-2430.

De Wreede, L.C., M. Fiocco and H. Putter (2010) The mstate package for estimation and prediction in non- and semi-parametric multi-state and competing risks models. Computer Methods and Programs in Biomedicine, doi:10.1016/j.cmpb.2010.01.001

Examples

1
2
3
4
5
6
  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")

Example output

[1] "     Biograph.mstate: calls function Remove_intrastate  . . . "
[1] . . . . . .   Removes intrastate transitions . . . .
[1] . . . . Intrastate transitions removed. Recalculating transitions . . . . 
[1] ". . . . Running function Parameters . . . . "
[1] "Exploring types of transitions"
[1] A new Biograph object without intrastate transitions is returned.
[1] ". . . . Running function Parameters . . . . "
[1] "Exploring types of transitions"
[1] . . . . .  Creating long format  . . . . . .
[1] . . . . .  running reshape  . . . . . 
[1]  . . . . Sort data in long format  . . . . 
[1]  . . . . Adjust long format for survival package etc . . .  
Loading required package: survival
$Frequencies
    to
from   N   J no event total entering
   N   0 323       59            382
   J 181   0      142            323

$Proportions
    to
from         N         J  no event
   N 0.0000000 0.8455497 0.1544503
   J 0.5603715 0.0000000 0.4396285

Biograph documentation built on May 1, 2019, 8:48 p.m.