Srv {rms}R Documentation

Front-end to survival package Surv function

Description

Srv saves labeling and time units information when creating Surv objects. The subsetting method preserves these extra attributes.

Usage

Srv(time, time2, event,
    type = c("right", "left", "interval", "counting", "interval2",
             "mstate"), origin = 0)

Arguments

time,time2,event,type,origin

see Surv

Value

a matrix of class "Srv" plus classes from Surv

Author(s)

Frank Harrell

See Also

Surv

Examples

dtime <- c(1, 3, 7); death <- c(1, 0, 1)
units(dtime) <- 'Month'
label(dtime) <- 'Event/censoring time'
label(death) <- 'Death, all causes'
S <- Srv(dtime, death)
attributes(S)
S[2:3,]
attributes(S[2:3,])

[Package rms version 4.0-0 Index]