philchalmers / mirt

Multidimensional item response theory
https://philchalmers.github.io/mirt/
201 stars 75 forks source link

PV_Q1* do not convergence in polytomous items well #119

Closed seonghobae closed 7 years ago

seonghobae commented 7 years ago

Hi Phil,

I have a trouble to estimate PV_Q1, PV_Q1 do not convergence in polytomous items well.

How to increase EM cycles of PV_Q1* iterations?

Seongho

> itemfit(mirt(Science, 1, itemytpe = 'nominal', empiricalhist = T), fit_stats = 'PV_Q1*')
Iteration: 1779, Log-Lik: -1597.502, Max-Change: 0.00003
EM cycles terminated after 500 iterations.
EM cycles terminated after 500 iterations.
에러: Rows in supplied and starting value data.frame objects do not match. Were the
             data or itemtype input arguments modified?
> itemfit(mirt(Science, 1, itemytpe = 'nominal', empiricalhist = F), fit_stats = 'PV_Q1*')
Iteration: 36, Log-Lik: -1608.870, Max-Change: 0.00010
EM cycles terminated after 500 iterations.
EM cycles terminated after 500 iterations.
EM cycles terminated after 500 iterations.
에러: Rows in supplied and starting value data.frame objects do not match. Were the
             data or itemtype input arguments modified?
philchalmers commented 7 years ago

Confirmed, this is definitely a bug. I'll look into why in a few days.

philchalmers commented 7 years ago

The issue seems to be related to the empirical hist input. The PV-Q1 statistics (or any of the stats which use parametric bootstrap) shouldn't be used here because they will not be generating the correct latent variable distribution modelled in the data (the distribution is no longer Gaussian, but rather some non-parametric smoother). So, itemfit() should really throw an error here whenever empiricalhist = TRUE is detected. It works fine now when empiricalhist = FALSE

philchalmers commented 7 years ago

This now works with empiricalhist as well. But do be cautious about the assumptions in the parametric bootstrap scheme.