Gamma parameterisation
Opened this issue · 0 comments
I am using a Gamma likelihood in ulam(), a distribution which is only briefly touched on in the book. I was surprised to find out by trial and error and repeated checking with stancode() that ulam() parameterises the Gamma likelihood as Gamma(mean, scale) rather than the Stan convention Gamma(shape, rate). stancode() showed me that this is internally reparameterised as Gamma(mean/scale, 1/scale) to work with Stan's convention, since shape = mean/scale and rate = 1/scale. Am I correct in my deductions? If yes, I am curious to know the reason behind this choice and why it is "hidden". Why not Gamma(shape, rate), Gamma(shape, scale) or Gamma(mean, sd)? Thanks in advance for your insight.
Edit: To generalise my previous questions, is it possible to reparameterise distributions such as Gamma or Beta in ulam() @rmcelreath? Say, in addition to the Gamma example above, I wanted to reparameterise the Beta distribution as Beta(mean, count) according to https://mc-stan.org/docs/2_21/stan-users-guide/reparameterizations.html#.