A few suggestions:
- Are you sure the observation equation is right? At present the entire
O3
vector is used on every loop. Perhaps you meantO3[n]
? - Try a smaller value for the
init
argument (ex.1
or.1
). - Try student-t with df>1 or normal everywhere you currently have cauchy; cauchy tends to behave badly both numerically and in terms of what it implies as a prior.
- If using cauchy, definitely run some prior predictive checks to ensure it implies your real expectations; you might be surprised by the consequences of the cauchy heavy-tail.
- If using cauchy, try the reparameterization suggested by the SUG
- Instead of doing the non-centering by hand, use the new-ish
<offset=...,multiplier=...>
syntax for less chance of implementation errors. (Also see here) - Your priors for the measurement error are such that they convey peak credibility for zero measurement error. Consider a peaked-away-from-zero prior, which can be elegantly achieved by replacing the 0-bound
measurement_error
parameter with an unboundedlog_measurement_error
parameter that is then exponentiated when it comes to its use in the likelihood (... , exp(measurement_error[sensor[n]]) );
)