cox.kmi {kmi} | R Documentation |
Cox proportional hazards model applied to imputed data sets
Description
This function fits Cox proportional hazards models to each imputed data set to estimate the regression coefficients in a proportional subdistribution hazards model, and pools the results.
Usage
cox.kmi(formula, imp.data, df.complete = Inf, ...)
Arguments
formula |
A formula object, with the response on the left of a
|
imp.data |
An object of class |
df.complete |
Complete data degrees of freedom. |
... |
Further arguments for the |
Details
Fits a Cox proportional hazards model on each imputed data set to
estimate the regression coefficients in a proportional
subdistribution hazards model, and pools the results, using the
MIcombine
function of the mitools package.
Value
An object of class cox.kmi
including the following components:
coefficients |
Pooled regression coefficient estimates |
variance |
Pooled variance estimate |
nimp |
Number of multiple imputations |
df |
degrees of freedom |
call |
The matched call |
individual.fit |
A list of |
Author(s)
Arthur Allignol, arthur.allignol@gmail.com
See Also
coxph
,
MIcombine
, print.cox.kmi
,
summary.cox.kmi
Examples
data(icu.pneu)
if (require(survival)) {
set.seed(1313)
imp.dat <- kmi(Surv(start, stop, status) ~ 1, data = icu.pneu,
etype = event, id = id, failcode = 2, nimp = 5)
fit.kmi <- cox.kmi(Surv(start, stop, event == 2) ~ pneu, imp.dat)
summary(fit.kmi)
### Now using the censoring-complete data
fit <- coxph(Surv(start, adm.cens.exit, event == 2) ~ pneu, icu.pneu)
summary(fit)
## estimation of the censoring distribution adjusted on covariates
dat.cova <- kmi(Surv(start, stop, status) ~ age + sex,
data = icu.pneu, etype = event, id = id,
failcode = 2, nimp = 5)
fit.kmi2 <- cox.kmi(Surv(start, adm.cens.exit, event == 2) ~ pneu + age,
dat.cova)
summary(fit.kmi2)
}