new.smcfcs.surv {SurvImpute}R Documentation

Multiple imputation method for missing covariates in survival endpoint.

Description

Generates multiple imputed datasets from a substantive model compatible fully conditional specification model. This method incorporates the cause-specific hazards regression model into the imputation stage, and assumes that the censoring process also depends on the covariates with missing values. Without loss of generality, we assumed there is only one competing event. Our method is an extension of Bartlett et. al. (2015) and Bartlett and Taylor (2016).

Usage

new.smcfcs.surv(data, smformula, method, m = 10, rjlimit = 5000)

Arguments

data

The input data with missing values. Note: all missing values should be coded as "NA", all binary covariates should be coded as 0/1, and all categorical covariates with more than two categories should have a class of factor.

smformula

The substantive model formula. For survival data, this should be a formula of "Surv(time, delta) ~ Covariates list" type. (see example).

method

A vector of strings for each covariate specifying the the type of regression model to impute them. The length of this vector should match the number of columns in the input dataset, and also match the position of each column (Including the outcomes). If a covariate is fully observed, the value should be blank (""). Other possible options are "norm"(linear regression for continuous covariates), "lm"(logistic regression for binary covariates), and "mlogit"(multinomial logistic regression for categorical covariates).

m

Number of complete datasets to generate, default is 10.

rjlimit

Maximum number of rejection sampling attempts, default is 5000. If there are subjects who did not get a success sampled value for the missing after reaching the limit, a warning message will be issued suggesting to increase the limit.

Value

A list containing the imputed datasets.

References

Bartlett JW, Seaman SR, White IR, Carpenter JR. (2015). Multiple imputation of covariates by fully conditional specification: accommodating the substantive model. Statistical Methods in Medical Research. 24(4), 462-487.

Examples


# Generate data with missing values
cox <- generate.surv(n = 500, beta = c(1,1,-1), phi= c(1,-1,-0.5), gamma = c(3,2,-1), seed = 112358)
# Impute
imputed <- new.smcfcs.surv(data = cox, smformula = "Surv(time, delta)~X1 +X2+X3",
method = c("","", "norm","logreg",""), m = 10, rjlimit = 10000)
# Fit a Cox regression on each imputed dataset, then produce the final estimates using Rubin's rule.
require(mitools)
library(survival)
imputed.fit <- with(imputationList(imputed), expr = coxph(Surv(time, delta) ~ X1+X2+X3))
summary(MIcombine(imputed.fit))

[Package SurvImpute version 0.1.0 Index]