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

Pure Poisson model versus gamma-Poisson model #21

Conversation

ayhteo
Copy link

@ayhteo ayhteo commented Sep 17, 2022

According to Chapter 12.1.2, a gamma-Poisson model should reduce the impact of high pareto-k points by accounting the difference in rates as gamma-distributed. Hence, highly influential points like Hawaii in the Oceanic tools dataset should not pull the low-contact trend down as much.

I have attempted to replicate Figure 12.2 that accompanies this statement, but I did not get the same result from the models built in numpyro, that the original book author presented. Between Pure Poisson model and gamma-Poisson model, the only observed difference I had was the larger dispersion that is accompanied with using a gamma distribution to estimate the Poisson rate. However, the mean prediction line is similar across both models.

@fehiepsi
Copy link
Owner

IIRC there is a bug in the stan implementation of dgampois (you can find its definition here https://rdrr.io/github/rmcelreath/rethinking/src/R/distributions.r . Probably rmcelreath/rethinking#53 is related.

@fehiepsi
Copy link
Owner

I added a comment to the code in #31 mentioning about the bug. Thanks for raising this!

@fehiepsi fehiepsi closed this Feb 15, 2024
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

Successfully merging this pull request may close these issues.

2 participants