Stan doesn’t support factor data types. You have specified x as array of int.
If you have a factor you may convert it in GNU R with as.numeric(f) with f factor.
These factor types used to be implicitly converted to integers before which seems reasonable. Anyone passing a factor probably wants their IDs passed to the model. Not sure why rounding is now being applied to them now.
You should not pass a factor to a model. Instead translate your factor levels to
integers and then use these values in Stan. In other word, you have to handle
the factor levels as integers in Stan by yourself.
I assume they are treated as real values. But it’s not a bug, since Stan doesn’t support
factors.
This just an inconvenience really so not a big issue. The reason I report is that it used to work in the more reasonable way of converting factors to integers not reals. Yes, I know Stan doesn’t support factors directly.