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

New PoissonBinomial distribution & countreg support & minor improvements #100

Merged
merged 12 commits into from
May 3, 2024

Conversation

zeileis
Copy link
Collaborator

@zeileis zeileis commented Apr 27, 2024

Alex @alexpghayes, I have accumulated various additions in the devel branch that are ready for the main branch IMO.

If you have the time to look at these: great! If not: no problem. I can either merge myself or wait a little bit longer
because I want to do further additions in the next weeks.

The biggest addition is a new PoissonBinomial distribution, see the Wikipedia for some background. It's a generalization of the binomial distribution where there are still n independent Bernoulli trials but these can have different probabilities.

I have implemented the distribution based on the PoissonBinomial package. However, I have also added fallback computations based on a normal approximation in case the PoissonBinomial package is not available.

In addition to the new distribution I have made various smaller improvements and documentation fix-ups. This includes a distinction in some prodist() methods between the old pscl package and the newer countreg package which we plan to release to CRAN soon (leveraging distributions3).

@alexpghayes
Copy link
Owner

Looks good to me! Merge as you see fit!

@zeileis zeileis merged commit 66b64dd into main May 3, 2024
1 of 9 checks passed
@zeileis zeileis deleted the devel branch May 3, 2024 13:47
@zeileis
Copy link
Collaborator Author

zeileis commented May 3, 2024

Thanks, Alex @alexpghayes! I also asked Moritz @mnlang for feedback and now merged it into main.

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