inst/tests/npsurv.r

require(rms)
require(survival)
d <- data.frame(time=1:500, death=sample(0:1, 500, TRUE))
f <- npsurv(Surv(time, death) ~ 1, data=d, conf.type='log-log')
g <- function(y) 1 - y
survplot(f, fun=g)
survplot(f, fun=g, conf='bars')

Try the rms package in your browser

Any scripts or data that you put into this service are public.

rms documentation built on Sept. 12, 2023, 9:07 a.m.