Restricting parameters based on data

If you truncate your priors you’ll also want to constrain your variables (to prevent the sampler from going outside of the support of the truncated distribution – this’ll give HMC trouble), so that doesn’t get around the problem.

Vectorized constraints aren’t here yet, but for what you’re describing you might be better off just rolling your own: How to specify variable parameter constraints based on other model parameters . Check out the constraints part of the manual: https://mc-stan.org/docs/2_18/reference-manual/variable-transforms-chapter.html for how this is done.

Also, since your priors aren’t a function of other parameters, you really don’t need that truncation either. The normalization for the truncation is constant so you can leave it out.

Hope that helps!