Prior for positive bounded paramater

Hi, Sorry for the super simple question - but I am trying to understand what happens when we set an unbounded Normal or Cauchy prior on a scale parameter that is bounded to be positive. For example, here (taken from stan manual) sigma is bounded to be positive but the prior is a Cauchy that can be negative…


parameters {
  vector[K] alpha;
  vector<lower=0>[K] sigma;
transformed parameters {
model {
  sigma ~ cauchy(0, 5);
  alpha ~ std_normal();
  // implies: beta ~ multi_normal(mu,
  //  diag_matrix(sigma) * L * L' * diag_matrix(sigma)))


This results in a half-Cauchy prior. That is, the prior given in the model block is truncated according to the bounds given in the parameter declaration.

1 Like

Got you. Thanks.