I have a multilevel model for which the “parent” and “children” parameters are known to be strictly positive (excuse my lack of statistics vocabulary). Using a centred parameterization is sampling a bit too slow for my needs, so I want to test a non-centred model and see if that improves things.
For sake of argument, say I’m fitting something like the 8-schools example but I know that the effect in each school is strictly positive. How can I write such constraint while using a non-centred parameterization?
data {
int<lower=0> J;
real y[J];
real<lower=0> sigma[J];
}
parameters {
real<lower=0> mu; // Lower bound on mean effect
real<lower=0> tau;
real<offset=mu, multiplier=tau> theta[J]; // How to constraint theta[J] ???
}
model {
theta ~ normal(mu, tau);
y ~ normal(theta, sigma);
}
Thank you! :)