Estimating Animal Abundance with N-Mixture Models Using the R-INLA Package for R

Timothy D. Meehan, Nicole L. Michel, Håvard Rue

Main Article Content


Successful management of wildlife populations requires accurate estimates of abundance. Abundance estimates can be confounded by imperfect detection during wildlife surveys. N-mixture models enable quantification of detection probability and, under appropriate conditions, produce abundance estimates that are less biased. Here, we demonstrate how to use the R-INLA package for R to analyze N-mixture models, and compare performance of R-INLA to two other common approaches: JAGS (via the runjags package for R), which uses Markov chain Monte Carlo and allows Bayesian inference, and the unmarked package for R, which uses maximum likelihood and allows frequentist inference. We show that R-INLA is an attractive option for analyzing N-mixture models when (i) fast computing times are necessary (R-INLA is 10 times faster than unmarked and 500 times faster than JAGS), (ii) familiar model syntax and data format (relative to other R packages) is desired, (iii) survey-level covariates of detection are not essential, and (iv) Bayesian inference is preferred.

Article Details

Article Sidebar


Blangiardo M, Cameletti M (2015). Spatial and Spatio-Temporal Bayesian Models with R-INLA. John Wiley & Sons, West Sussex, UK.

Chandler RB, Royle JA, King DI (2011). "Inference About Density and Temporary Emigration in Unmarked Populations." Ecology, 92(7), 1429-1435.

Dail D, Madsen L (2011). "Models for Estimating Abundance from Repeated Counts of an Open Metapopulation." Biometrics, 67(2), 577-587.

Denes FV, Silveira LF, Beissinger SR (2015). "Estimating Abundance of Unmarked Animal Populations: Accounting for Imperfect Detection and Other Sources of Zero Inflation." Methods in Ecology and Evolution, 6(5), 543-556.

Denwood MJ (2016). "runjags: An R Package Providing Interface Utilities, Model Templates, Parallel Computing Methods and Additional Distributions for MCMC Models in JAGS." Journal of Statistical Software, 71(9). URL

Dodd CK, Dorazio RM (2004). "Using Counts to Simultaneously Estimate Abundance and Detection Probabilities in a Salamander Community." Herpetologica, 60(4), 468-478.

Fiske I, Chandler R, et al. (2011). "unmarked: An R Package for Fitting Hierarchical models of Wildlife Occurrence and Abundance." Journal of Statistical Software, 43(10), 1-23. URL

Gong L, Flegal JM (2016). "A Practical Sequential Stopping Rule for High-Dimensional Markov Chain Monte Carlo." Journal of Computational and Graphical Statistics, 25(3), 684-700.

Joseph LN, Elkin C, Martin TG, Possingham HP (2009). "Modeling Abundance Using N-Mixture Models: The Importance of Considering Ecological Mechanisms." Ecological Applications, 19(3), 631-642.

Kery M (2010). Introduction to WinBUGS for Ecologists: Bayesian Approach to Regression, ANOVA, Mixed Models and Related Analyses. Academic Press, Burlington, MA USA.

Kery M, Dorazio RM, Soldaat L, Van Strien A, Zuiderwijk A, Royle JA (2009). "Trend Estimation in Populations with Imperfect Detection." Journal of Applied Ecology, 46(6), 1163-1172.

Kery M, Royle JA (2010). "Hierarchical Modelling and Estimation of Abundance and Population Trends in Metapopulation Designs." Journal of Animal Ecology, 79(2), 453-461.

Kery M, Royle JA (2015). Applied Hierarchical Modeling in Ecology: Analysis of Distribution, Abundance and Species Richness in R and BUGS: Volume 1: Prelude and Static Models. Academic Press, Burlington, MA USA.

Kery M, Royle JA, Schmid H (2005). "Modeling Avian Abundance from Replicated Counts using Binomial Mixture Models." Ecological Applications, 15(4), 1450-1461.

Kery M, Schaub M (2011). Bayesian Population Analysis using WinBUGS: A Hierarchical Perspective. Academic Press, Burlington, MA USA.

Lindgren F, Rue H (2015). "Bayesian Spatial Modelling with R-INLA." Journal of Statistical Software, 63(19), 1-25. URL

Lindgren F, Rue H, Lindstrom J (2011). "An Explicit Link Between Gaussian Fields and Gaussian Markov Random Fields: The Stochastic Partial Differential Equation Approach (with discussion)." Journal of the Royal Statistical Society B, 73(4), 423-498.

Lunn D, Jackson C, Best N, Thomas A, Spiegelhalter D (2012). The Bugs Book: A Practical Introduction to Bayesian Analysis. CRC Press, Boca Raton, FL USA.

Martin J, Royle JA, Mackenzie DI, Edwards HH, Kery M, Gardner B (2011). "Accounting for Non-Independent Detection when Estimating Abundance of Organisms with a Bayesian Approach." Methods in Ecology and Evolution, 2(6), 595-601.

Martins TG, Simpson D, Lindgren F, Rue H (2013). "Bayesian Computing with INLA: New Features." Computational Statistics and Data Analysis, 67, 68-83.

O'Donnell KM, Thompson FR, Semlitsch RD (2015). "Partitioning Detectability Components in Populations Subject to Within-Season Temporary Emigration using Binomial Mixture Models." PLoS ONE, 10(3), e0117216. URL

Plummer M (2003). "JAGS: A Program for Analysis of Bayesian Graphical Models using Gibbs Sampling." In K Hornik, F Leisch, A Zeileis (eds.), Proceedings of the 3rd International Workshop on Distributed Statistical Computing, pp. 1-10. Vienna, Austria. URL

Pollock KH, Nichols JD, Simons TR, Farnsworth GL, Bailey LL, Sauer JR (2002). "Large Scale Wildlife Monitoring Studies: Statistical Methods for Design and Analysis." Environmetrics, 13(2), 105-119.

Royle JA (2004). "N-Mixture Models for Estimating Population Size from Spatially Replicated Counts." Biometrics, 60(1), 108-115.

Royle JA, Dorazio RM (2008). Hierarchical Modeling and Inference in Ecology: the Analysis of Data from Populations, Metapopulations, and Communities. Academic Press, Burlington, MA USA.

Royle JA, Nichols JD (2003). "Estimating Abundance from Repeated Presence-Absence Data or Point Counts." Ecology, 84(3), 777-790.

Rue H, Martino S, Chopin N (2009). "Approximate Bayesian Inference for Latent Gaussian Models by Using Integrated Nested Laplace Approximations." Journal of the Royal Statistical Society B, 71(2), 319-392.

Rue H, Riebler A, Srbye SH, Illian JB, Simpson DP, Lindgren FK (2017). "Bayesian Computing with INLA: A Review." Annual Reviews of Statistics and Its Applications, 4(March), 395-421.

R Core Team (2016). "R: A Language and Environment for Statistical Computing." URL

Wenger SJ, Freeman MC (2008). "Estimating Species Occurrence, Abundance, and Detection Probability using Zero-Inflated Distributions." Ecology, 89(10), 2953-2959.

Yoccoz NG, Nichols JD, Boulinier T (2001). "Monitoring of Biological Diversity in Space and Time." Trends in Ecology and Evolution, 16(8), 446-453.