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!