Bounding one parameter using another parameter

Hi! I would like to specify a model, where a_3 > a_2, where a_2 and a_3 are parameters. I have done this as follows:

parameters {
  real<lower=0> a2;
  real<lower=a2> a3;

model {
  a2 ~ normal(1.5,0.75);
  a3 ~ normal(1.5,0.75);

Is this okay? Or should I be using the transformed parameters block?

This is fine. Another fine approach is to use Stan’s ordered type 10.6 Ordered vector | Stan Reference Manual

Note that the interaction between the prior model and the constraints means that you won’t get norma(1.5, 0.75) prior margins for either parameter.

1 Like