philchalmers / mirt

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

Set parameter bound separately in createItem() #241

Closed ellaninomiya closed 1 year ago

ellaninomiya commented 1 year ago

Hi, I am using createItem() to define a item reponse function with three estimated parameters, and only one parameter needs a lower bound which can constrain it to be positive. In reference manual, createItem() has lbound argument, it seems all parameters will be affected when lbound is specified. How can I set the lower bound for just one parameter, while other parameters' bounds remains inf or being defined using different settings?

philchalmers commented 1 year ago

If you have three parameters with only one indicating a lower bound then just specify lbound as a vector with $-\infty$ where necessary. For example, if the 2nd parameter is bounded then lbound = c(-Inf, 0, -Inf).