Open hillegass opened 1 year ago
I should have mentioned the versions: I am using rethinking 2.21, rstan 2.26.13, and cmdstanr 0.5.3
Thanks for the very clear report! The bad model isn't subsetting the TV variable inside the normal() with [i], but only in the generated quantities. If you inspect the stancode() for both models, you will see what I mean. So the estimates are the same I guess? But it's just the WAIC calc that goes wrong.
I've been thinking that what ulam() should do in these cases is make a symbol for the calculation of sigma. i.e. automatically convert the "bad" model to the "good" one. That would solve a lot of parsing issues.
If I create a model with a sigma variable all is good:
Gets me reasonable values for WAIC:
Exact same thing, but with no sigma variable is bad:
gets terrible WAIC scores:
Directory for reproduction is attached:
Bugreport.zip