I am currently working through an example from the "Handbook of Educational Measurement and Psychometrics Using R" by Desjardins and Bulut. The example pertains to item fit of a Rasch model using the mirt package.
Their R code was:
rasch_itemfit <- itemfit(rasch_fit,
fit_stats = c("S_X2", "G2"),
impute = 10)
head(rasch_itemfit)
This results in:
item G2 df.G2 p.G2 S_X2 df.S_X2 p.S_X2
1 reason.4 10.888 9 0.344 20.597 12 0.057
2 reason.16 9.007 9 0.443 10.802 12 0.546
3 reason.17 15.409 9 0.131 19.920 12 0.069
4 reason.19 14.018 9 0.166 26.702 12 0.009
5 letter.7 5.458 9 0.788 12.490 12 0.407
6 letter.33 14.195 9 0.163 27.096 13 0.012
However, when I run the same code, I encounter the following error message:
Only X2, G2, PV_Q1, PV_Q1*, infit, X2*, and X2*_df can be computed with missing data.
Pass na.rm=TRUE to remove missing data row-wise
I understand that something has changed regarding the impute argument in the mirt package since the book was published. How can I recreate their results with the current version of the mirt package? Should I use imputeMissing or a different function?
Cheers,
Oskar