sampleFromCondKM: sampleFromCondKM

Description Usage Arguments Value

View source: R/util.R

Description

Sample from conditional distribution estimated by Kaplan-Meier estimator. Imputed values > tmax are right-censored.

Usage

1
sampleFromCondKM(U, fit, tmax = NULL, dv = 1, f = NULL)

Arguments

U

vector of observed times

fit

Kaplan-Meier fit as returned by survfit

tmax

largest observation of the pooled sample

dv

1 if imputing events, 0 if imputing censoring times

f

interpolated Kaplan-Meier estimate

Value

Random sample of survival times drawn from conditional distribution of T given T > U


mbrueckner/permGS documentation built on Aug. 7, 2017, 3:22 p.m.