Links, examples, and code for modelling count data
I am starting this repository as a lose collection of various bits and pieces around the statistical modelling of count data phenomena. The purpose is mostly to remind myself of how to do something. I will make this more organized and add more examples over time. Code is going to be (mostly) python, but links will be to all sorts of examples.
LINKS AND READING MATERIAL
General
-
A. Colin Cameron and Pravin K. Trivedi: REGRESSION ANALYSIS OF COUNT DATA. Second Edition.
-
Nice Towardsdatascience post on fitting GLMs by hand in python - by Daniel Friedman
Poisson Regression
-
Open
statsmodels
issue on quasi-poisson. Excellent discussion on connection to robust estimation -
Stackoverflow:
statsmodels
vs R again, also nice code to get Cook's distance -
Nice Towardsdatascience post on fitting Poisson regression in python - by Sachin Date
-
Another description of IRLS for Python from the gtools documentation
-
Stata manual for fixed effects poisson regression, useful for theory (see "Methods and Formulas")
-
code snippets from various places on how to implement Poisson regression in
statsmodels
and R -
CrossValidated: Nice Explanation of Overdispersion, zero inflation etc.
Negative Binomial Regression