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

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

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)
}

aallignol/kmi documentation built on June 4, 2019, 3:05 a.m.