philchalmers / mirt

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

problem estimating 3PL items in fixedcalib #202

Closed PaulMacDOnald1234 closed 3 years ago

PaulMacDOnald1234 commented 3 years ago

Hi Phil,

I ran through your example for fixedcalib using the 2PL simulated data sets and everything worked as explained. I started back at the beginning of the example and tried to use the 3PL instead by adding...

g <- matrix(rnorm(J,0.2,.05),ncol=1) itemtype <- rep('3PL', nrow(a)) dataset1 <- simdata(a, d, guess=g, N = 20000, itemtype=itemtype) dataset2 <- simdata(a, d, guess=g, N = 5000, itemtype=itemtype) dataset1b <- dataset1[,-c(1:20, 41:50)] # keeping columns 21 to 40

When running mirt on the reduced dataset1 (items 21 through 40) , I get the following mod which closely approximates the original parameters.

$items a1 d g u Item_21 1.236 0.239 0.255 1 Item_22 1.367 0.189 0.131 1 Item_23 1.076 0.500 0.217 1 ...

But when I run the fixed item parameter calibration in the next step, the fixed items retain the 3PL model but the new items are estimated with only 2PL. The resulting mod has a mixture of 3PL and 2PL item parameters (i.e., all values for the guessing parameter are set to 0.000).

MWU_MEM <- fixedCalib(dataset2, model = 1, old_mod = mod1b, PAU="MWU", NEMC="MEM")

       a1      d     g u

Item_21 1.236 0.239 0.255 1 Item_22 1.367 0.189 0.131 1 Item_23 1.076 0.500 0.217 1 ... Item_1 0.674 0.934 0.000 1 Item_2 0.618 0.115 0.000 1 Item_3 0.520 0.267 0.000 1 ... Item_48 0.731 0.695 0.000 1 Item_49 0.904 1.158 0.000 1 Item_50 0.586 0.592 0.000 1

Also, when I view the mod, I can see that the estimation is set to "FALSE" for the guessing parameter.

MWU_MEM@ParObjects[["pars"]][[21]]@est a1 d g u TRUE TRUE FALSE FALSE

And try as I might, I can't find the syntax option(s) that will extend the 3PL model to all 50 items.

For example, adding the itemtype='3PL' argument didn't change the result.

MWU_MEM <- fixedCalib(dataset2, model = 1, old_mod = mod1b, PAU="MWU", NEMC="MEM", itemtype='3PL')

Is there a way to apply the 3PL to the unique items in the second data set?

philchalmers commented 3 years ago

Hi Paul,

This was a mistake on my end where the ... arguments were not passed to all of the estimation functions (only some). I'll send a patch momentarily to fix this issue. Thanks for the report!