md.impute {missDeaths} | R Documentation |
Correctly impute missing information of possible deaths using population mortality
Description
An iterative approach is used in this method to estimate the conditional
distribution required to correctly impute the times of deaths using
population mortality tables.
Note, that simply imputing expected survival times may seem intuitive,
but does not give unbiased estimates, since the right censored individuals
are not a random subsample of the patients.
Usage
md.impute(data, f, maxtime, D, ratetable, iterations = 4)
Arguments
data |
a data.frame in which to interpret the variables named in the formula. |
f |
a formula object, with the response on the left of a ~ operator,
and the terms on the right. The response must be a survival object as
returned by the |
maxtime |
maximum potential observation time (number of days). where where |
D |
demographic information compatible with |
ratetable |
a population mortality table, default is |
iterations |
the number of iteration steps to be performed, default is 4 |
Value
an array of times with imputed times of death that can be used instead of the
unavailable complete data set to get unbiased estimates, ie. in coxph
.
References
Stupnik T., Pohar Perme M. (2015) "Analysing disease recurrence with missing at risk information." Statistics in Medicine 35. p1130-43. https://onlinelibrary.wiley.com/doi/abs/10.1002/sim.6766
See Also
Examples
library(missDeaths)
data(slopop)
data(observed)
observed$time = observed$time*365.2425
D = md.D(age=observed$age*365.2425, sex=observed$sex, year=(observed$year - 1970)*365.2425)
newtimes = md.impute(observed, Surv(time, status) ~ age + sex + iq + elevation,
observed$maxtime*365.2425, D, slopop, iterations=4)
#Cumulative incidence function
cif = survfit(Surv(observed$time, observed$status)~1)
cif$surv = 1 - cif$surv
cif$upper = 1 - cif$upper
cif$lower = 1 - cif$lower
plot(cif)
#Net survival (NOTE: std error is slightly underestimated!)
surv.net = survfit(Surv(newtimes, observed$status)~1)
summary(surv.net, times=c(3,9)*365.2425)
plot(surv.net)
#Event free survival (NOTE: std error is slightly underestimated!)
surv.efs = survfit(Surv(newtimes, 1 * (observed$status | (newtimes != observed$time)))~1)
summary(surv.efs, times=c(3,9)*365.2425)
plot(surv.efs)