Mice pool() function and coxph(): in mice.df (…) : large sample assumend?

六月ゝ 毕业季﹏ 提交于 2020-01-13 18:05:14

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!