sampleFromKM function

sampleFromKM

sampleFromKM

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

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

Returns

Random sample of survival times

  • Maintainer: Matthias Brueckner
  • License: GPL-3 | file LICENSE
  • Last published: 2017-08-07

Useful links