sampleFromKM {permGS}R Documentation

sampleFromKM

Description

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

Usage

sampleFromKM(n, fit, start = 0, tmax = NULL, dv = 1)

Arguments

n

sample size

fit

Kaplan-Meier fit as returned by survfit

start

if 0 sample from L(T), else sample from L(T, T > start)

tmax

largest observation in pooled sample

dv

1 if imputing events, 0 if imputing censoring times

Value

Random sample of survival times


[Package permGS version 0.2.5 Index]