I am curious to how upper/lower bounds on parameters are treated by Stan? Is it truncation, censoring or some other method? For example, in the following code, how would the constraint on rate be handled by the <lower = 0> bound?
data {
int<lower = 1> N;
real<lower = 0> obs[N];
}
parameters {
real<lower = 0> rate;
}
model {
rate ~ normal(3, 2);
for(n in 1:N){
obs[n] ~ exponential(rate);
}
}
Obviously it is likely more appropriate to use a prior distribution that is positive continuous by definition, but this is for the sake of curiosity.