This version computes them for all times up to times, for the restricted mean lifetime lost

leaveOneOut.competing.risks(object, times, cause, mr)

Arguments

object

A survfit object, with competing events

times

Times at which the cumulative incidence is computed, must be length 1

cause

Value indicating for which cause the cumulative incidence is to be computed, it must match one of the values available in object (see example)

mr

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, ..., k = event types)

Value

A vector of jackknifed values of the cause-specific cumulative incidence at time times

Examples


sfit.cuminc <- survival::survfit(survival::Surv(etime, event) ~ 1, data = mgus2)
mrs <- with(mgus2, Surv(etime, event))
jackvals <- leaveOneOut.competing.risks(sfit.cuminc, times = 200, cause = "pcm", mrs)