
Last chance! 50% off unlimited learning
Sale ends in
getsurv2(sf, time, which.est = c("point", "lower", "upper"))
survfit
object point
for the point estimate, lower
for the lower bound and upper
for the upper bound survfit
function.survfit
require(survival)
set.seed(12345)
age <- rnorm(30, 50, 10)
stime <- rexp(30)
cens <- runif(30,.5,2)
sevent <- as.numeric(stime <= cens)
stime <- pmin(stime, cens)
sf <- survfit(Surv(stime, sevent) ~ 1)
getsurv2(sf, time=1)
Run the code above in your browser using DataLab