You don’t want to try to make things deterministic by imposing a very strong prior. It’s better to code the constraint up directly.
As I keep trying to tell people on the list, it’s hard for me to go back through chains of posts and put information together. I read a lot of these every day and they all run together after a while.
The manual explains how to impose summation constraints. If you want a parameter vector alpha
to sum to sum_alpha
, then you can do this:
parameters {
vector[K - 1] alpha_raw;
transformed parameters {
vector[K] alpha;
alpha[1:(K - 1)] = alpha_raw;
alpha[K] = alpha_sum - sum(alpha_raw);
And then you’re guaranted that sum(alpha) = alpha_sum
by construction.