Ooops, sorry for the slow response, I was hoping discourse would send me an e-mail but I must have my settings messed up.
Can you try a version of this model where you use
multi_normal_cholesky in place of
This is a version of the multivariate normal pdf that takes in the Cholesky factored matrix instead of a full one (this is still the centered parameterization – all we’re doing is changing how the computation works a little). If this works, then we can say it’s the centered vs. non-centered parameterization that is causing the problem. If it has divergences, then maybe there’s a bug somewhere in the code.
Should be able to change:
beta_unit ~ multi_normal(zero_unit, quad_form_diag(Omega_unit, tau_unit));
to (and redefine things in terms of L_Omega_unit instead of Omega_unit):
beta_unit ~ multi_normal_cholesky(zero_unit, diag_pre_multiply(tau_unit,L_Omega_unit));