Bringing Bayesian Models to Life empowers the reader to extend, enhance, and implement statistical models for ecological and environmental data analysis. We open the black box and show the reader how to connect modern statistical models to computer algorithms. These algorithms allow the user to fit models that answer their scientific questions without needing to rely on automated Bayesian software. We show how to handcraft statistical models that are useful in ecological and environmental science including: linear and generalized linear models, spatial and time series models, occupancy and capture-recapture models, animal movement models, spatio-temporal models, and integrated population-models.


  • R code implementing algorithms to fit Bayesian models using real and simulated data examples.
  • A comprehensive review of statistical models commonly used in ecological and environmental science.
  • Overview of Bayesian computational methods such as importance sampling, MCMC, and HMC.
  • Derivations of the necessary components to construct statistical algorithms from scratch.

Bringing Bayesian Models to Life contains a comprehensive treatment of models and associated algorithms for fitting the models to data. We provide detailed and annotated R code in each chapter and apply it to fit each model we present to either real or simulated data for instructional purposes. Our code shows how to create every result and figure in the book so that readers can use and modify it for their own analyses. We provide all code and data in an organized set of directories available at the authors' websites.

section Section I|1 pages


chapter 1|7 pages

Bayesian Models

chapter 2|5 pages

Numerical Integration

chapter 3|7 pages

Monte Carlo

chapter 4|14 pages

Markov Chain Monte Carlo

chapter 5|4 pages

Importance Sampling

section Section II|1 pages

Basic Models and Concepts

chapter 6|13 pages


chapter 7|5 pages


chapter 8|4 pages

Normal-Inverse Gamma

chapter 9|6 pages

Normal-Normal-Inverse Gamma

section Section III|1 pages

Intermediate Models and Concepts

chapter 10|14 pages

Mixture Models

chapter 11|11 pages

Linear Regression

chapter 12|5 pages

Posterior Prediction

chapter 13|9 pages

Model Comparison

chapter 14|11 pages


chapter 15|11 pages

Bayesian Model Averaging

chapter 16|31 pages

Time Series Models

chapter 17|27 pages

Spatial Models

section Section IV|1 pages

Advanced Models and Concepts

chapter 18|16 pages

Quantile Regression

chapter 19|18 pages

Hierarchical Models

chapter 20|21 pages

Binary Regression

chapter 21|57 pages

Count Data Regression

chapter 22|17 pages

Zero-Inflated Models

chapter 23|33 pages

Occupancy Models

chapter 24|33 pages

Abundance Models

section Section V|1 pages

Expert Models and Concepts

chapter 25|43 pages

Integrated Population Models

chapter 26|16 pages

Spatial Occupancy Models

chapter 27|18 pages

Spatial Capture-Recapture Models

chapter 28|33 pages

Spatio-temporal Models

chapter 29|22 pages

Hamiltonian Monte Carlo