Zero Inflated Poisson / Negative Binomial Model ---- using Python (statsmodels)

python
negative-binomial
poisson
count-model

#1

Hello All

I tried to run the above. It seems statsmodels in Python now support it. See the below two links:

https://www.statsmodels.org/stable/generated/statsmodels.discrete.count_model.ZeroInflatedNegativeBinomialP.html?highlight=zero%20inflated%20negative%20binomial#statsmodels.discrete.count_model.ZeroInflatedNegativeBinomialP

I still don’t quite get it. Anyone here can provide me a simplified illustration? I think I might have messed up the datatype for the endog and exog. I usually use scikit learn format.

Any help is appreciated.

Thanks,
Sunny.