| Srv {rms} | R Documentation |
survival package Surv functionSrv saves labeling and time units information when creating
Surv objects. The subsetting method preserves these extra attributes.
Srv(time, time2, event,
type = c("right", "left", "interval", "counting", "interval2",
"mstate"), origin = 0)
time,time2,event,type,origin |
see |
a matrix of class "Srv" plus classes from Surv
Frank Harrell
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,])