inst/tests/bootkm.r

require(Hmisc)
require(survival)
yrs <- runif(30, 0, 10)
ev  <- sample(0:1, 30, TRUE)
w <- bootkm(Surv(yrs, ev), times=5)
describe(w)
quantile(w, c(.025, .975))

# Try with only 2 events
ev <- c(1, 1, rep(0, 28))
w <- bootkm(Surv(yrs, ev), times=5)
describe(w)
quantile(w, c(.025, .975))

Try the Hmisc package in your browser

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

Hmisc documentation built on June 22, 2024, 12:19 p.m.