stan-dev / example-models

Example models for Stan
http://mc-stan.org/
771 stars 479 forks source link

BPA/Ch.06 update #80

Closed ito4303 closed 7 years ago

ito4303 commented 7 years ago

I have changed priors of scale parameters into improper uniform or weakly informative ones for efficiency, irrespective of the original models in the book. Would you review the code?

bob-carpenter commented 7 years ago

We've talked about this for our BUGS model translations and decided to keep a literal translation of the model (that is, one that has the same log density). Then if we have what we think is a better approach, include that version, too. Would it be hard to follow that pattern here?

Also, if you want to replace a uniform(0, 3) prior, you can use a normal(1.5, 0.75), which puts 95% of the mass within (0, 3) and allows a thin tail to the right (assuming the <lower=0> declaration stays. Or you can do the same with fatter tails---put most of the mass inside the original (0, 3) bound. Or you can use a lognormal with appropriate location and scale and that will avoid values very close to zero.

ito4303 commented 7 years ago

Thank you for your advice. I changed the priors to match the original model in the book again. In addition, I added comments to indicate how to use weakly informative priors.