Thanks for the prompt and clear reply! It’s very helpful!
A few quick related follow-ups tho.
-
Is there any other way to do this in stan (e.g. through
generated quantities
block or any other way)? -
I have tried to implement this in form of
mm[j, i] ~ uniform(mm[j, i]-0.01, mm[j, i]+0.01)
and I am getting no errors and the results are somewhat sensible. What is happening there, why does it (seem?) to work? Should I be suspicious? -
Is
transformed parameters
recalculated after prior sampling and before posterior sampling? If no, then how can I havemodel
block with onlytransfored parameters
variables? (This was suggested to me by Bob Carpenter here, so I have little to no doubt that it’s correct, but would like to understand why this works and what is the order of computation).