philchalmers / mirt

Multidimensional item response theory
199 stars 75 forks source link

Restricting Rasch to confirmatory models? #224

Closed mspezio closed 2 years ago

mspezio commented 2 years ago

Was there a recent change to restrict Rasch item types to confirmatory models with more than 1 factor? What is the purpose of that restriction? I am getting an error message that I did not see in a previous release. Thank you.

philchalmers commented 2 years ago

There were some syntax updates under the hood, but no structural change that should affect this setup. It also seems to be running fine on this end (see below). Are you certain this is the issue? In any event, a reprex would be helpful.

library(mirt)

model <- "F1 = 1-10
          F2 = 11-32
          COV = F1*F2"

dat <- key2binary(SAT12,
                   key = c(1,4,5,2,3,1,2,1,3,1,2,4,2,1,5,3,4,4,1,4,3,3,4,1,3,5,1,3,1,5,4,5))

mod <- mirt(dat, model, itemtype = 'Rasch', TOL=.01)
coef(mod, simplify=TRUE)

$items
        a1 a2      d g u
Item.1   1  0 -1.114 0 1
Item.2   1  0  0.346 0 1
Item.3   1  0 -1.134 0 1
Item.4   1  0 -0.592 0 1
Item.5   1  0  0.604 0 1
Item.6   1  0 -1.977 0 1
Item.7   1  0  1.389 0 1
Item.8   1  0 -1.647 0 1
Item.9   1  0  2.397 0 1
Item.10  1  0 -0.372 0 1
Item.11  0  1  4.475 0 1
Item.12  0  1 -0.399 0 1
Item.13  0  1  0.795 0 1
Item.14  0  1  1.131 0 1
Item.15  0  1  1.736 0 1
Item.16  0  1 -0.407 0 1
Item.17  0  1  3.644 0 1
Item.18  0  1 -0.716 0 1
Item.19  0  1  0.236 0 1
Item.20  0  1  2.220 0 1
Item.21  0  1  2.703 0 1
Item.22  0  1  3.012 0 1
Item.23  0  1 -0.919 0 1
Item.24  0  1  1.160 0 1
Item.25  0  1 -0.597 0 1
Item.26  0  1 -0.183 0 1
Item.27  0  1  2.109 0 1
Item.28  0  1  0.149 0 1
Item.29  0  1 -0.777 0 1
Item.30  0  1 -0.278 0 1
Item.31  0  1  1.865 0 1
Item.32  0  1 -1.911 0 1

$means
F1 F2 
 0  0 

$cov
      F1    F2
F1 1.055 0.779
F2 0.779 0.866
mspezio commented 2 years ago

Right, what you showed was a confirmatory model, which is what seems to be required now. Try this command with the same data: mod <- mirt(dat, 3, itemtype = 'Rasch', TOL=.01) It gives this error: Error: Rasch itemtype is for confirmatory models only.

But the Rasch itemtype used to work with exploratory models. This seems to have changed and is there a reason? Thank you.

philchalmers commented 2 years ago

I see. Yes, that was removed a little while back as the EFA approach does not result in a Rasch model. This is partially due to how the over-parameterized model leads to a rotationally indeterminant solution which is not any type of interpretable Rasch model as there are no types of proportionality constraints between the item loadings. I believe what the package did before is just treat the itemtype = 'Rasch' input as just a standard 2PL or GRM, so the 'Rasch' portion was essentially ignored.

mspezio commented 2 years ago

Thank you.