SurvLR: Transform Surv object to data frame with L and R values

Description Usage Arguments Details Value See Also Examples

Description

Takes a Surv object and transforms it into a data frame with two variables, L and R, representing the left and right interval of interval censored data. The failure time is known to be in the interval (L,R]. Right censored data are handled by setting L=R for observed and R=Inf for right censored. These are interpreted correctly by icfit and ictest.

Usage

1
SurvLR(x)

Arguments

x

a Surv object

Details

Currently type='counting' not supported.

Value

A data frame with two variables:

L

left end of interval

R

right end of interval

See Also

Called from icfit and ictest

Examples

1
2
3
4
time<-c(1,5,3,7)
status<-c(1,1,0,1)
y<-Surv(time,status)
SurvLR(y)

Example output

Loading required package: survival
Loading required package: perm
Loading required package: Icens
Loading required package: MLEcens
  L   R   Lin   Rin
1 1   1  TRUE  TRUE
2 5   5  TRUE  TRUE
3 3 Inf FALSE FALSE
4 7   7  TRUE  TRUE

interval documentation built on Oct. 23, 2020, 6:05 p.m.