iddata: Transforming a Simple Illness-Death Dataset into a Proper...

Description Usage Arguments Value Examples

Description

Converts a raw illness-death dataset to a data frame which can be passed into TPreg function.

Usage

1
iddata(Stime, Sind, Iltime, Ilind, covar, ...)

Arguments

Stime

the possibly censored total survival time.

Sind

the indicator of uncensored total survival time.

Iltime

the arrival time to the intermediate state, for example diseased, recurrence, or relapse time.

Ilind

the indicator of visiting intermediate state.

covar

a vector of covariates.

...

arguments to be passed to methods.

Value

iddata returns an object of class data frame, containing at least the following components:

id

identification variable

Zt

the possibly censored sojourn time in initial state

delta1

the indicator of uncensored sojourn time in initial state

Tt

the possibly censored total survival time

delta

the indicator of uncensored total survival time

covar

a vector of covariates

Examples

1
2
3
4
5
6
7
Stime <- c(10, 20, 34, 12, 30)
Sind <- c(1, 0, 0, 1, 1)
Iltime <- c(7, 20, 28, 12, 30)
Ilind <- c(1, 0, 1, 0, 0)
covar <- c(20, 25, 57, 36, 46)
mydata <- iddata(Stime, Sind, Iltime, Ilind, covar)  
mydata

idmTPreg documentation built on May 2, 2019, 3:35 p.m.