Northwest Fisheries Science Center

Display All Information

Document Type: Journal Article
Center: NWFSC
Document ID: 8715
Title: Faster estimation of Bayesian models in ecology using Hamiltonian Monte Carlo
Author: Cole C. Monnahan, James T. Thorson, Trevor A. Branch
Publication Year: 2017
Journal: Methods in Ecology and Evolution
Volume: 8
Issue: 3
Pages: 339-348
DOI: 10.1111/2041-210X.12681
Keywords: Bayesian inference, No-U-Turn sampler, Markov chain Monte Carlo, Stan, hierarchical modeling, ,
  1. Bayesian inference is a powerful tool to better understand ecological processes across varied subfields in ecology, and is often implemented in generic and flexible software packages such as the widely used BUGS family (BUGS, WinBUGS, OpenBUGS and JAGS). However, some models have prohibitively long run times when implemented in BUGS. A relatively new software platform called Stan uses Hamiltonian Monte Carlo (HMC), a family of Markov chain Monte Carlo (MCMC) algorithms which promise improved efficiency and faster inference relative to those used by BUGS. Stan is gaining traction in many fields as an alternative to BUGS, but adoption has been slow in ecology, likely due in part to the complex nature of HMC.
  2. Here, we provide an intuitive illustration of the principles of HMC on a set of simple models. We then compared the relative efficiency of BUGS and Stan using population ecology models that vary in size and complexity. For hierarchical models, we also investigated the effect of an alternative parameterization of random effects, known as non-centering.
  3. For small, simple models there is little practical difference between the two platforms, but Stan outperforms BUGS as model size and complexity grows. Stan also performs well for hierarchical models, but is more sensitive to model parameterization than BUGS. Stan may also be more robust to biased inference caused by pathologies, because it produces diagnostic warnings where BUGS provides none. Disadvantages of Stan include an inability to use discrete parameters, more complex diagnostics and a greater requirement for hands-on tuning.
  4. Given these results, Stan is a valuable tool for many ecologists utilizing Bayesian inference, particularly for problems where BUGS is prohibitively slow. As such, Stan can extend the boundaries of feasible models for applied problems, leading to better understanding of ecological processes. Fields that would likely benefit include estimation of individual and population growth rates, meta-analyses and cross-system comparisons and spatiotemporal models.
Full Text URL:;jsessionid=16FAF01EC9369E2B5FA2D5E0B3C19369.f04t02
URL1: The next link will exit from NWFSC web site Journal website access
Theme: Recovery and rebuilding of marine and coastal species
Foci: Develop methods to use physiological, biological and behavioral information to predict population-level processes.
Describe the relationships between human activities and species recovery, rebuilding and sustainability.