bioRxiv (Cold Spring Harbor Laboratory) · 2017 · 428 citations · 18 references
Life SciencesBiostatisticsEcologyParasite EcologyParasitologyPopulation EcologyCount Data ModelsEcological ModelingMixed Model AnalysisCount Data AnalysisGeneralized Linear Mixed ModelsGeneralized Linear Mixed-effects ModelsLinear Mixed ModelsNegative Binomial DistributionZero-inflated DistributionsZero-inflated ModelsZeros
Ecological studies often rely on count data that are zero‑inflated and require generalized linear mixed models to account for correlated observations. The authors introduce glmmTMB, an R package that expands the range of count‑data models available via maximum‑likelihood estimation. glmmTMB implements a lme4‑style interface built on Template Model Builder, employing automatic differentiation and the Laplace approximation to fit GLMs, GLMMs, zero‑inflated, and hurdle models efficiently, as illustrated in two ecological case studies. In practice, glmmTMB outperforms other maximum‑likelihood packages for zero‑inflated models, is faster than MCMC‑based methods, and offers greater flexibility than INLA, thereby enabling ecologists to rapidly fit diverse models and test ecological hypotheses.
Abstract Ecological phenomena are often measured in the form of count data. These data can be analyzed using generalized linear mixed models (GLMMs) 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 standard error distributions used in GLMMs, e.g., parasite counts may be exactly zero for hosts with effective immune defenses but vary according to a negative binomial distribution for non-resistant hosts. We present a new R package, glmmTMB , that increases the range of models that can easily be fitted to count data using maximum likelihood estimation. The interface was developed to be familiar to users of the lme4 R package, a common tool for fitting GLMMs. To maximize speed and flexibility, estimation is done using Template Model Builder ( TMB ), utilizing automatic differentiation to estimate model gradients and the Laplace approximation for handling random effects. We demonstrate glmm TMB and compare it to other available methods using two ecological case studies. In general, glmm TMB is more flexible than other packages available for estimating zero-inflated models via maximum likelihood estimation and is faster than packages that use Markov chain Monte Carlo sampling for estimation; it is also more flexible for zero-inflated modelling than INLA , but speed comparisons vary with model and data structure. Our package can be used to fit GLMs and GLMMs with or without zero-inflation as well as hurdle models. By allowing ecologists to quickly estimate a wide variety of models using a single package, glmm TMB makes it easier to find appropriate models and test hypotheses to describe ecological processes.
18
R: A Language and Environment for Statistical Computing
R Core Team · 2000 · 353K citations · Full text
Natural Sciences, Computer Science, Statistical Computing +10
Fitting Linear Mixed-Effects Models Using <b>lme4</b>
Douglas M. Bates, Martin Mächler, Benjamin M. Bolker et al. · Journal of Statistical Software · 2015 · 85.6K citations · Full text