after running MICE on specific variables in R, and using m= 5, I am trying to get a pooled dataset that will have the average of those 5 imputations.
-
imp <- mice(dt_imp, predictorMatrix = pred, method = meth,m=5,seed = 123) # this is my imputation
-
complete_data <- complete(imp) # This code is working but I discovered that this is taking the first imputed dataset, I want to get the average of the imputed datasets.
-
pooled_data= pool(imp) # this is giving error (Error in as.mira(object) :
as.mira() cannot convert class ‘mids’ into ‘mira’. Use with() instead.) -
I even tried it with, with() nothing is working.
Note: all my variables are categorical and as.factor
I am trying to get a pooled dataset from the imputed datasets with same number of observations as my initial dataset.
Mimzey is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.