How to constraint multilevel parameters when using a non-centered parametrisation?

No, you’re not (yet) able to mix offset/multiplier with upper and lower bounds. For now you’ll have to use the ‘old’ non-centered construction with a separate ‘raw’ variable:

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<lower=-mu/tau> theta_raw[J]; // How to constraint theta[J] ???
}
transformed parameters {
  theta[J] = mu + theta_raw * tau;
}
model {
    theta_raw ~ std_normal();
    y ~ normal(theta, sigma);
}
2 Likes