I’ve hoped that someone else would comment on this first because, while I do a lot of IRT modeling, I’m not an expert on what is and isn’t going to be identified in Bayesian models. To my eye, the reason this is not identified is related to the multiplication as changing the sign of (theta - beta)
could be compensated for by also just changing the sign of gamma
: that is, -gamma * +(theta - beta) is no different than +gamma * -(theta - beta) since the sign can be arbitrarily changed (e.g., your prior gives equal probability to -2 and +2 for gamma, so neither sign is uniquely preferred to the other and easily changed).
There is a thorough pre-print on fitting IRT models using brms
: here. He has multiple examples of a 2PL model, and there is also a paper applying brms
estimated IRT models, including the 2PL model, that includes a very helpful github repository of all the code to extract post-hoc information: here.
In short, I believe that you will need to constrain the discrimination parameter (gamma
) to be positive. In the linked papers, this is done by exponentiating discrimination so that it is estimated on the log-scale. You may check the item-total correlations to screen for cases where there will be negative discrimination (i.e., individuals with higher latent trait have lower probability of endorsing an item – this is a negative item-total correlation). You could, for those cases, reverse score the item so that a positive discrimination makes sense again. Item fit statistics should be informative for whether the reverse scoring of “negative” discrimination items improved fit, and you can also always check the item characteristic curves to see whether some discrimination parameters are essentially straight lines (i.e., the model is trying to estimate as close to zero as possible because the true slope is negative but is being constrained to be positive).
Additionally, I’ve played around with different specifications of the IRT model, and I believe that the standard discrimination * (ability - difficulty) parameterization is not identified, even with a prior/model restricting the discrimination parameter to be positive. I don’t know exactly why it fails to estimate in this format, so maybe someone with more of a math background could explain. The models described in the previously linked papers, however, are very stable and get the same results, even if the formula is different than the standard IRT notations.
----- EDIT -----
Since my initial response, a recent post on the forum has gone out for a beta version of a Stan package designed specifically for ideal point models: New R package release: idealstan v1.0 beta (Ideal point/IRT models in Stan). I suspect that this is likely an ideal option for your needs