I can not get any item-fit values when I have missing data with latent regressors.
I had a lot of tests with another data, it can replicate with any data.
> modALL_AUTO_improve <- mirt(data[17:53], 7, method = 'QMCEM', SE = T, SE.type = 'complete', covdata = as.data.frame(data[2:16]), formula = ~1+Role+sex+age+edu+workyear+teamyear)
Iteration: 341, Log-Lik: -12305.743, Max-Change: 0.00010
> itemfit(modALL_AUTO_improve, QMC = T, impute = 2, method = 'MAP') # why I can not calculate itemfit with missing data?
Error: Rows in supplied and starting value data.frame objects do not match. Were the
data or itemtype input arguments modified?
> itemfit(modALL_AUTO_improve, QMC = T, impute = 2, method = 'MAP', fscores(modALL_AUTO_improve, method = 'MAP')) # why I can not calculate itemfit with missing data?
Error: Rows in supplied and starting value data.frame objects do not match. Were the
data or itemtype input arguments modified?> describe(data[17:53])
vars n mean sd median trimmed mad min max range skew kurtosis se
acqsil01 1 383 2.51 0.92 2 2.49 1.48 1 5 4 0.40 -0.40 0.05
acqsil02 2 383 2.74 1.01 3 2.77 1.48 1 5 4 0.02 -0.79 0.05
acqsil03 3 383 2.42 0.88 2 2.38 1.48 1 5 4 0.46 -0.26 0.05
acqsil04 4 383 2.54 0.92 2 2.53 1.48 1 5 4 0.37 -0.48 0.05
acqsil05 5 383 2.57 0.99 2 2.55 1.48 1 5 4 0.43 -0.35 0.05
defsil01 6 383 2.39 0.93 2 2.35 1.48 1 5 4 0.54 -0.24 0.05
defsil02 7 383 2.29 0.86 2 2.24 0.00 1 5 4 0.46 -0.26 0.04
defsil03 8 383 2.49 0.95 2 2.46 1.48 1 5 4 0.41 -0.29 0.05
defsil05 9 383 2.27 0.87 2 2.22 1.48 1 5 4 0.48 -0.05 0.04
sear01 10 383 3.49 0.76 4 3.54 1.48 1 5 4 -0.46 0.35 0.04
sear02 11 383 3.37 0.77 3 3.42 1.48 1 5 4 -0.33 0.04 0.04
sear03 12 383 3.40 0.76 3 3.44 1.48 1 5 4 -0.25 0.42 0.04
sear04 13 383 3.45 0.80 4 3.50 1.48 1 5 4 -0.35 0.19 0.04
pers01 14 383 3.42 0.78 3 3.46 1.48 1 5 4 -0.24 0.11 0.04
pers02 15 383 3.43 0.78 3 3.47 1.48 1 5 4 -0.30 0.29 0.04
pers03 16 383 3.45 0.81 3 3.47 1.48 1 5 4 -0.17 -0.12 0.04
mradic01 17 315 3.06 0.77 3 3.09 0.00 1 5 4 -0.19 0.05 0.04
mradic02 18 315 3.07 0.82 3 3.09 0.00 1 5 4 -0.13 0.05 0.05
mradic03 19 315 3.03 0.80 3 3.03 1.48 1 5 4 0.05 -0.10 0.05
mincre01 20 315 3.45 0.77 4 3.53 1.48 1 5 4 -0.63 0.27 0.04
mincre02 21 315 3.30 0.75 3 3.36 1.48 1 5 4 -0.33 -0.08 0.04
gradic01 22 315 2.70 0.82 3 2.66 1.48 1 5 4 0.23 -0.04 0.05
gradic02 23 315 2.43 0.85 2 2.40 1.48 1 5 4 0.30 -0.26 0.05
gradic03 24 315 2.74 0.84 3 2.74 1.48 1 5 4 0.01 -0.36 0.05
gradic04 25 315 2.42 0.82 2 2.42 1.48 1 5 4 0.13 -0.18 0.05
gincre02 26 315 3.23 0.80 3 3.29 1.48 1 5 4 -0.50 0.30 0.04
gincre03 27 315 3.39 0.78 3 3.46 1.48 1 5 4 -0.55 0.50 0.04
idplea01 28 383 3.01 0.79 3 3.02 0.00 1 5 4 -0.17 0.34 0.04
idplea02 29 383 2.98 0.79 3 3.01 0.00 1 5 4 -0.23 0.24 0.04
idplea03 30 383 2.85 0.80 3 2.87 0.00 1 5 4 -0.24 -0.06 0.04
exprisk01 31 383 2.26 0.89 2 2.19 1.48 1 5 4 0.56 -0.05 0.05
exprisk02 32 383 2.26 0.87 2 2.22 1.48 1 5 4 0.38 -0.24 0.04
exprisk03 33 383 2.58 0.93 2 2.58 1.48 1 5 4 0.26 -0.49 0.05
expgain01 34 383 3.52 0.79 4 3.55 1.48 1 5 4 -0.21 -0.25 0.04
expgain02 35 383 3.69 0.82 4 3.70 1.48 1 5 4 -0.22 -0.30 0.04
expgain03 36 383 3.61 0.68 4 3.63 0.00 1 5 4 -0.36 0.29 0.03
expgain04 37 383 3.64 0.71 4 3.63 0.00 1 5 4 -0.33 0.46 0.04
How can I get it? Have I tried to fix 'utils.R'? Have I filled all missing data with another method to got item-fit values successfully? Have I excluded formula terms from getting item-fit values?