cox.kmi: Cox proportional hazards model applied to imputed data sets

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/cox.kmi.R

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

1
cox.kmi(formula, imp.data, df.complete = Inf, ...)

Arguments

formula

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 Surv function.

imp.data

An object of class kmi.

df.complete

Complete data degrees of freedom.

...

Further arguments for the coxph function.

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 coxph objects. One for each imputed data set.

Author(s)

Arthur Allignol, arthur.allignol@gmail.com

See Also

coxph, MIcombine, print.cox.kmi, summary.cox.kmi

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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)
}

Example output

Loading required package: survival
Call:
cox.kmi(formula = Surv(start, adm.cens.exit, event == 2) ~ pneu + 
    age, imp.data = dat.cova)


*****************
Pooled estimates:
*****************
          coef exp(coef) se(coef)     t Pr(>|t|)    
pneu1 1.076654  2.934842 0.239870 4.488 7.17e-06 ***
age   0.018102  1.018267 0.005034 3.596 0.000323 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

      exp(coef) exp(-coef) lower .95 upper .95
pneu1     2.935     0.3407     1.834     4.696
age       1.018     0.9821     1.008     1.028

kmi documentation built on May 28, 2019, 1:02 a.m.

Related to cox.kmi in kmi...