philchalmers / mirt

Multidimensional item response theory
199 stars 75 forks source link

Lower and upper paremeter's bound in exploratory MIRT #228

Closed hynekcigler closed 2 years ago

hynekcigler commented 2 years ago

Hi, I defined an exploratory two-factor MIRT model with lower and upper bound for factor loading and with fixed lower asymptote:

> irt_model2 <- "
+ NEXPLORE = 2
+ LBOUND = (1-70, a1, 0), (1-70, a2, 0)
+ UBOUND = (1-70, a1, 3), (1-70, a2, 3)
+ "
> irt4 <- mirt(scdat, irt_model2, itemtype = "2PL", guess = 1/5, SE = T, technical = list(NCYCLES = 10000))

However, this returned me an error:

Error: LBOUND = ... has not been supplied enough arguments
In addition: Warning message:
In rbind(model$x, oldmodel$x[oldmodel$x[, 1L] != "NEXPLORE"]) :
  number of columns of result is not a multiple of vector length (arg 2)
> 

If I remove either lbound or either ubound, the model is being estimated (but it is not as I have quite small sample, which is another story). I assume there is a bug in the mirt.model function?

philchalmers commented 2 years ago

Looks like this is just a classic drop bug in R. I'll push the patch momentarily.