stan-dev / posteriordb

Database with posteriors of interest for Bayesian inference
181 stars 36 forks source link

dogs-dogs not constrained properly in Stan #245

Closed bob-carpenter closed 1 year ago

bob-carpenter commented 2 years ago

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.

MansMeg commented 1 year ago

Now fixed in 0.4