Is there any implementation of Zero-Inflated Negative Binomial models for panel data?

So far I've checked out the usual suspects in terms of R packages, but as far as I can tell neither pglm nor pscl and friends provide functions to deal with both elements (zero-inflation and panel data) at the same time.
This presentation also claims that there are now fixed-effects implementations available for zero-inflated data (see ctrl-f for "zero-inf", third match). Is this correct? What is the right approach in this case?


1 Answer 1


The third match says that "Fixed effects extensions to hurdle, finite mixture, zero-inflated models are currently not available".

An alternative to "classical" FE-regression would be a mixed model. Unlike often stated, mixed models can indeed deal with heterogeneity bias and even incorporate between-effects and time-constant predictors, and even account for variation of level-1-predictors between groups (i.e. random slopes). These kind of models are also called "complex random effects within-between models" [1].

You can then use the glmmTMB package, which lets you fit negative binomial mixed models with zero-inflation.

There is an example how to do this in lme4, but you can easily extend this to glmmTMB: https://easystats.github.io/parameters/articles/demean.html

The above linked example also includes visual examples and some references for further reading. Imho, mixed models clearly outperform classical FE-models, so I would go this route. And glmmTMB is a great package for mixed models with many different error term distributions / families.

[1] Bell, Andrew, Malcolm Fairbrother, and Kelvyn Jones. 2019. “Fixed and Random Effects Models: Making an Informed Choice.” Quality & Quantity 53: 1051–74. https://doi.org/10.1007/s11135-018-0802-x.

  • $\begingroup$ The NBZIMM R package might be relevant to look at too. I don't think its on CRAN, but This paper describes it. $\endgroup$ Commented Mar 22, 2023 at 7:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.