问题
I used coxph() from the survival package in multiply imputed dataset and encountered a warning when trying to pool the results. The warning message states: "In mice.df(m, lambda, dfcom, method) : Large sample assumed.
A reproducible example is below (with publically available data, without worrying to much about the appropriateness of using both mice and coxph is these data):
library(mice)
library(survival)
#load publically available data
data(pbc)
#select variables for the reproducable example
pbc.select <- pbc[pbc$status %in% c(0,1) , c("id", "time", "status", "trt")]
imp <- mice(pbc.select) #impute trt
fit <- with(imp, coxph(Surv(time, status) ~ trt)) #fit coxph in each imp
pool(fit) #pool the models; get's the error
This warning seems to result from the pool() function trying to require dfcom from
dfcom <- df.residual(object)
where df.residual() is not applicable to the object referred to in this context, which is of class "coxph"
class(fit) # "mira" "matrix"
class(fit$analyses[[1]]) "coxph"
My questions are 1) am I using the correct syntax for purpose 2) if so, is there a way to supply pool() with the appropriate information? 3) how does this assumption influence the results?
来源:https://stackoverflow.com/questions/27128838/mice-pool-function-and-coxph-in-mice-df-large-sample-assumend