It’s pretty neat, you can still mix the constraint with a non-centered param but the bound is a little different - Bob covered over in this thread how to work out the new bound: Non-centered parameterisation with boundaries
And a practical example for lower=0
:
data {
int<lower=0> J;
real y[J];
real<lower=0> sigma[J];
}
parameters {
real mu;
real<lower=0> tau;
real<lower=-mu/tau> theta_raw[J]; //Implies lower=0 on theta
}
transformed parameters {
theta[J] = mu + theta_raw * tau;
}
model {
theta_raw ~ std_normal();
y ~ normal(theta, sigma);
}