I have "0=incorrect" and "1=correct" coded questionnaire, including 28 questions. There are missing data and I imputed the missing data with the Multiple Imputation method. After having multiple imputations from the mice
library, I want to get the IRT parameter estimates as a pool estimate in R. I can get parameter estimates from each 5 imputed datasets separately but I want to have a pooled estimations in one step.
Here is my code:
# only questions from the column 4 to 31, 28 questions
data_for_imputation <- MYDATA[, 4:31]
data_for_imputation[, 1:28] <- lapply(data_for_imputation[, 1:28], factor)
# I have created 5 different datasets without missing data with this command
imputation_of_data <- mice(data_for_imputation, m = 5, maxit = 10, method = 'logreg', printFlag = FALSE)
# extracting 5 imputed datasets as data.frame
imputed_data_alldatasets <- complete(imputation_of_data, action = "long", include = FALSE)
imputed_data_alldatasets[,3:30] <- as.data.frame(lapply(imputed_data_alldatasets[,3:30], function(x) as.numeric(as.character(x))))
Models <- with(imputation_of_data, tam.mml(imputed_data_alldatasets[,3:30]))
Up to here everything seems working. With the with()
function, I carried out IRT analyses to every datasets in the data.frame and I get a 'mira' object which normally the pool()
function requires in mice
. This 'mira' object includes all the analyses of 5 imputed datasets as a list:
summary(pool(Models))
When I try to pool the estimations, it gives this error "Error:
Error: No tidy method for objects of class tam.mml In addition: Warning message: In get.dfcom(object, dfcom) : Infinite sample size assumed.
I have been trying all the different variations for days. I am maybe trying something that doesn't exist or work in R. Any other method or ways to get IRT item parameters from imputed datasets would be very helpful.
The pool function at the end unfortunately doesn't work and doesn't give me the expected pooled estimations.