The attached model2.stan (2.8 KB) sometimes has divergent transitions (depending on the seed). The way I’ve tried to address this is to increase lkj’s eta parameter. I started with lkj_corr_cholesky(2), but that had lots of divergent transitions. Currently, I have lkj_corr_cholesky(5). There is not much data in the model so I want to prefer correlations of zero, but I don’t want to overdo it with too strong a prior. I guess I could try increasing to 6. The thing is, I feel dubious about setting the eta parameter high enough to avoid divergent transitions. Is that a defensible way to set a prior?
Or can I improve sampling by using a non-centered parameterization? I’ve looked at examples of non-centered models, but so far, none of them quite match what I’m trying to do. How could I convert my model to be non-centered? Or does that even make sense for a correlation matrix?
Here are the scripts and data needed to run the model:
(Download everything, place all files in the same directory, and execute f4.R.)