Learn R Programming

eventglm (version 1.4.5)

jackknife.competing.risks2: Compute jackknife pseudo-observations of the cause-specific cumulative incidence for competing risks

Description

Compute jackknife pseudo-observations of the cause-specific cumulative incidence for competing risks

Usage

jackknife.competing.risks2(object, times, cause, mr)

Value

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

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)

Examples

Run this code

sfit.cuminc <- survival::survfit(survival::Surv(etime, event) ~ 1, data = mgus2)
mrs <- with(mgus2, Surv(etime, event))
pseudo.obs <- jackknife.competing.risks2(sfit.cuminc, times = 200, cause = "pcm", mrs)
mean(pseudo.obs)
# agrees with
summary(sfit.cuminc, times = 200)

Run the code above in your browser using DataLab