I couldn’t follow the moves in the transformed parameters block. I just don’t see the multivariate probit structure.
You’re right you’re not doing any non-linear transforms—you’re just shuffling elements around in the transformed parameters.
These models are very hard to fit, so you often need tight priors. Your LKJ prior isn’t doing anything — a parameter value of 1 is just uniform, and you get that for free. The Cauchy priors are very wide on the sigmas—you might try replacing those with tighter normals.
The biggest issue is that you want to move
muS to a non-centered parameterization.
You can vectorize the computation of
beta_x as just
beta_x = alpha + muS[S] + muL[L]; Then I’d suggest just dropping it in the location argument position of the multi_normal rather than building a whole new block here. (Sorry if you copied this from a model that wasn’t up to our current standards—we still haven’t caught up going through the manual.)
P.S. These “here’s a link, help me debug” questions don’t get answered very quickly because they’re time consuming. I do understand the problem you have if you’re just starting trying to formulate a crisp question—just wanted to let you know why this wasn’t getting answered.
Also, dropbox’s interface is super clunky for me on the Mac in Safari—it just auto picks where to drop files and I have to go fish them out.