posteriordb icon indicating copy to clipboard operation
posteriordb copied to clipboard

dogs-dogs not constrained properly in Stan

Open bob-carpenter opened this issue 2 years ago • 0 comments

The Stan model for dogs_log is broken in that it doesn't have support on R^2. The problem is here:

parameters {
  vector[2] beta;
}
...
  beta[1] ~ uniform(-100, 0);
  beta[2] ~ uniform(0, 100);

The right thing to do is this:

parameters {
  real<lower=-100, upper=0> beta1;
  real<lower=0, upper=100> beta2;
}

It should also be vectorized for efficiency.

bob-carpenter avatar Jun 24 '22 22:06 bob-carpenter