glmmTMB Balances Speed and Flexibility Among Packages for Zero-inflated Generalized Linear Mixed Modeling

Count data can be analyzed using generalized linear mixed models when observations are correlated in ways that require random effects. However, count data are often zero-inflated, containing more zeros than would be expected from the typical error distributions. We present a new package, glmmTMB, and compare it to other R packages that fit zero-inflated mixed models. The glmmTMB package fits many types of GLMMs and extensions, including models with continuously distributed responses, but here we focus on count responses. glmmTMB is faster than glmmADMB, MCMCglmm, and brms, and more flexible than INLA and mgcv for zero-inflated modeling. One unique feature of glmmTMB (among packages that fit zero-inflated mixed models) is its ability to estimate the Conway-Maxwell-Poisson distribution parameterized by the mean. Overall, its most appealing features for new users may be the combination of speed, flexibility, and its interface’s similarity to lme4.

Mollie E. Brooks , Kasper Kristensen , Koen J. van Benthem , Arni Magnusson , Casper W. Berg , Anders Nielsen , Hans J. Skaug , Martin Mächler , Benjamin M. Bolker
2017-12-01

Supplementary materials

Supplementary materials are available in addition to this article. It can be downloaded at RJ-2017-066.zip

CRAN packages used

glmmTMB, pscl, MCMCglmm, mgcv, brms, gamlss, flexmix, MXM, VGAM, mgcv, TMB, devtools

CRAN Task Views implied by cited packages

Econometrics, Environmetrics, SocialSciences, Bayesian, Psychometrics, Survival, Cluster, Distributions, ExtremeValue, gR, MachineLearning, Multivariate, Phylogenetics

Reuse

Text and figures are licensed under Creative Commons Attribution CC BY 4.0. The figures that have been reused from other sources don't fall under this license and can be recognized by a note in their caption: "Figure from ...".

Citation

For attribution, please cite this work as

Brooks, et al., "glmmTMB Balances Speed and Flexibility Among Packages for Zero-inflated Generalized Linear Mixed Modeling", The R Journal, 2017

BibTeX citation

@article{RJ-2017-066,
  author = {Brooks, Mollie E. and Kristensen, Kasper and Benthem, Koen J. van and Magnusson, Arni and Berg, Casper W. and Nielsen, Anders and Skaug, Hans J. and Mächler, Martin and Bolker, Benjamin M.},
  title = {glmmTMB Balances Speed and Flexibility Among Packages for Zero-inflated Generalized Linear Mixed Modeling},
  journal = {The R Journal},
  year = {2017},
  note = {https://doi.org/10.32614/RJ-2017-066},
  doi = {10.32614/RJ-2017-066},
  volume = {9},
  issue = {2},
  issn = {2073-4859},
  pages = {378-400}
}