Open ilyagoldin opened 11 years ago
Thanks for noting this. Not sure why it goes wrong in only the data block, since it's using the internal R methods for building the design matrix. But I will take a look early next week.
I found the corner case, and I understand what's going wrong. BUT fixing it is not trivial, not without risking breaking other things. So it won't be an immediate fix. I have a couple of ideas, but not sure I'll get to work on this right away.
In the meantime, I'm happy that the bug prevents compilation, rather than running the wrong model.
This should work, using the VerbAgg dataset in lme4, but the Stan model doesn't compile:
The problem is that with the intercept removed (-1), all 3 levels of btype should be included in the data block, but glmer2stan only includes 2 levels. (It correctly uses all 3 levels in the parameters and model blocks.)