Learn R Programming

eventglm (version 1.4.5)

leaveOneOut.survival2: Compute leave one out jackknife contributions of the survival function

Description

For each subject, the survival function is recomputed leaving that subject out. This is the workhorse for jackknife.survival2 and will generally not be called by the user.

Usage

leaveOneOut.survival2(object, times, mr)

Value

A vector of jackknifed values of survival at time times

Arguments

object

A survfit object, with a single event (no competing risks)

times

Times at which the survival is computed, must be length 1

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 = event)

Examples

Run this code

sfit.surv <- survival::survfit(survival::Surv(time, status) ~ 1, data = colon)
mrs <- with(colon, Surv(time, status))
jackvals <- leaveOneOut.survival2(sfit.surv, times = 1000, mrs)

Run the code above in your browser using DataLab