Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gamma parameterisation #410

Open
lukaseamus opened this issue Oct 3, 2023 · 0 comments
Open

Gamma parameterisation #410

lukaseamus opened this issue Oct 3, 2023 · 0 comments

Comments

@lukaseamus
Copy link

lukaseamus commented Oct 3, 2023

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#.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant