Imputation of missing data using MICE - predictive models
0
0
Entering edit mode
6.3 years ago
Dtriumph ▴ 30

Hi All,

I'm trying to impute missing data for a multivariate analysis experiment using MICE package. All steps work fine except the last step where I need to pool results of all predictive models as it requires the combined result in the form of a mira object. Any suggestions on conversion to mira objets and pooling is much appreciated!

the code I tried is as below,

<h6>#</h6>

path <- "../Data/Tutorial"

data <- iris

library(missForest)

iris.mis <- prodNA(iris, noNA = 0.1)

iris.mis <- subset(iris.mis, select = -c(Species))

library(mice)

md.pattern(iris.mis)

library(VIM)

imputed_Data <- mice(iris.mis, m=5, maxit = 50, method = 'pmm', seed = 500)

summary(imputed_Data)

mice(data = iris.mis, m = 5, method = "pmm", maxit = 50, seed = 500)

imputed_Data$imp$Sepal.Width

fit <- with(data = iris.mis, exp = lm(Sepal.Width ~ Sepal.Length + Petal.Width)) # builds predictive model

combine <- pool(fit) #### this command doesn't work as it requires "fit" to be a mira object before it could be pooled.

<h6>#</h6>

Thank you!

Mira object MICE missing data imputation • 1.1k views
ADD COMMENT

Login before adding your answer.

Traffic: 2002 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6