Welcome to the online supplemental materials for Bayesian Statistical Methods: With a Balance of Theory and Computation by Brian J. Reich and Sujit K. Ghosh. Below we provide the data sets using in the book as R workspaces and step-by-step R/JAGS code for several worked examples.

**Data**

- 2016 Presidential Election data
- Brown-headed nuthatch data for species distribution mapping
- Tyrannosaurid growth curves
- Marathon data
- Gun control data
- Microbiome data

**Worked examples**

### Chapter 1 – Basics of Bayesian inference

- Distribution GUIs
- Bayesian modeling of a disease outbreak (Background, NYT article about COVID-19 and Bayes)

### Chapter 2 – From Prior Information to Posterior Inference

### Chapter 3 – Computational Methods

- Bayesian Central Limit Theorem
- Gibbs sampling for a one-sample t-test
- Gibbs sampling for a two-sample t-test
- Gibbs sampling for simple linear regression
- Gibbs sampling for the concussions data
- Step-by-step illustration of Metropolis sampling
- Metropolis sampling for the concussions data
- Metropolis sampling for the concussions data with adaptive tuning
- Gibbs + Metropolis sampling for simulated data
- Simple linear regression in JAGS
- Poisson-gamma model in JAGS
- Error messages in JAGS
- Convergence diagnostics for a ill-posed model
- Convergence diagnostics for a well-behaved model
- Software comparison – Linear regression
- Software comparison – Random slopes model

### Chapter 4 – Linear Models

- Multiple linear regression for the homes data
- Linear regression prediction
- Logistic regression for NBA clutch free throws
- Beta regression for the homes data
- One-way random effects model for the jaw data
- Linear mixed model for the jaw data
- Spatial modeling of gun-related homicide rates
- Non-linear regression for the motorcycle data

### Chapter 5 – Model Selection and Diagnostics

- Cross validation for NBA clutch free throws
- DIC/WAIC analysis of the Gambia data
- DIC/WAIC analysis of the 2016 US Presidential Election
- Simulation study comparing DIC and WAIC
- Stochastic search variable selection
- Stochastic search variable selection for high-dimensional data
- Posterior predictive checks for the Guns laws data

### Chapter 6 – Case Studies Using Hierarchical Modeling

- Analysis of tyrannosaurid growth curves
- Species distribution mapping via data fusion
- Missing data analysis of 2016 Boston marathon data

### Chapter 7 – Statistical Properties of Bayesian Methods

### Solutions to odd-numbered problems

### Lecture notes

### Code from the listings

### Video lectures

- Univariate probability
- Multivariate probability
- Bayes’ Theorem
- Introduction to Bayes
- Summarizing a univariate posterior
- Summarizing a multivariate posterior
- Posterior predictive distribution
- Conjugate priors I
- Conjugate priors II
- Objective priors
- Deterministic algorithms
- Gibbs sampling
- Metropolis-Hastings sampling
- JAGS
- Convergence diagnostics
- Linear regression
- Linear regression examples
- Generalized linear models
- Mixed models
- Nonlinear models
- Bayes factors
- Cross-validation and information criteria
- Posterior predictive checks
- Hierarchical models
- Frequentist properties of Bayesian methods