R/jackknife-cuminc.R
jackknife.survival2.Rd
Compute jackknife pseudo-observations of the survival function
jackknife.survival2(object, times, mr)
A survfit object, with a single event (no competing risks)
Times at which the survival is computed, must be length 1
Model response, the result of a call to Surv, or a matrix with two columns: "time" (observed follow up time) and "status" (0 = censored, 1 = event)
A vector of jackknifed estimates of survival at time times
sfit.surv <- survival::survfit(survival::Surv(time, status) ~ 1, data = colon)
mrs <- with(colon, Surv(time, status))
pseudo.obs <- jackknife.survival2(sfit.surv, times = 1000, mrs)
mean(pseudo.obs)
#> [1] 0.6908327
# agrees with
summary(sfit.surv, times = 1000)
#> Call: survfit(formula = survival::Surv(time, status) ~ 1, data = colon)
#>
#> time n.risk n.event survival std.err lower 95% CI upper 95% CI
#> 1000 641 287 0.691 0.0152 0.662 0.721