## Gelman and Hill, 2007

Data Analysis Using Regression and Multilevel/Hierarchical Models, 1st Edition (Amazon),
by Andrew Gelman and Jennifer Hill,
Cambridge, 2007
The following notes resulted from using RStudio, R, rstan, ggplot2, and knitr to explore the stan models kindly made available to all of us on github. Almost all of the R code and stan models originated from that source, but then sometimes morphed into late night minor explorations, as in musical ''variations on a theme.''

#### 2. Concepts and methods from basic probability and statistics

• 2.3 Classical confidence intervals (pdf)

Part 1A: Single-level regression

#### 3. Linear regression: the basics

• 3.1 One predictor (html)
• 3.2 Multiple predictors (html)
• 3.3 Interactions (html)
• 3.4 Statistical inference (html)
• 3.5 Graphical displays of data and fitted model (html)
• 3.6 Assumptions and diagnostics (html)
• 3.7 Prediction and validation (html)

#### 4. Linear regression: before and after fitting the model

• 4.1 Linear transformations (pdf)
• 4.2 Centering and standardizing, especially for models with interactions (pdf)
• 4.3 Correlation and ''regression to the mean''
• 4.4 Logarithmic transformations (pdf)
• 4.5 Other transformations (pdf)
• 4.6 Building regression models for prediction (pdf)
• 4.7 Fitting a series of regressions (pdf)

#### 5. Logistic regression

• 5.1 Logistic regression with a single predictor (pdf)
• 5.2 Interpreting the logistic regression coefficients (pdf)
• 5.3 Latent-data formulation
• 5.4 Building a logistic regression model: wells in Bangladesh (pdf)
• 5.5 Logistic regression with interactions (pdf)
• 5.6 Evaluating, checking, and comparing fitted logistic regressions (pdf)
• 5.7 Average predictive comparisons on the probability scale (pdf)
• 5.8 Identifiability and separation (pdf)

#### 6. Generalized linear models

• 6.1 Introduction
• 6.2 Poisson regression, exposure, and overdispersion (pdf)
• 6.3 Logistic-binomial model
• 6.4 Probit regression: normally distributed latent data (pdf)
• 6.5 Multinomial regression (pdf)
• 6.6 Robust regression using the t model
• 6.7 Building more complex generalized linear models (pdf)
• 6.8 Constructive choice models (pdf)

Part 1B: Working with regression inferences

#### 7. Simulation of probability models and statistical inferences

• 7.1 Simulation of probability models (pdf)
• 7.2 Summarizing linear regressions using simulation: an informal Bayesian approach (pdf)
• 7.3 Simulation for nonlinear predictions: congressional elections (pdf)
• 7.4 Predictive simulation for generalized linear models (pdf)

#### 8. Simulation for checking statistical procedures and model fits

• 8.1 Fake-data simulation (pdf)
• 8.2 Example: using fake-data simulation to understand residual plots (pdf)
• 8.3 Simulating from the fitted model and comparing to actual data (pdf)
• 8.4 Using predictive simulation to check the fit of a time-series model (pdf)

#### 9 Causal inference using regression on the treatment variable

• 9.1 Causal inference and predictive comparisons
• 9.2 The fundamental problem of causal inference
• 9.3 Randomized experiments (pdf)
• 9.4 Treatment interactions and poststratification (pdf)
• 9.5 Observational studies (pdf)
• 9.6 Understanding causal inference in observational studies
• 9.7 Do not control for post-treatment variables
• 9.8 Intermediate outcomes and causal paths

## McElreath, 2016

Statistical Rethinking, A Bayesian Course with Examples in R and Stan,
by Richard McElreath,
CRC Press, 2016

## Hoff, 2009

A First Course in Bayesian Statistical Methods,
by Peter Hoff,
Springer, 2009

## Kéry and Schaub, 2012

Bayesian population analysis using WinBUGS, A hierarchical perspective,
by Marc Kéry and Michael Schaub,

## Gelman, et al., 2014

Bayesian Data Analysis, Third Edition,
by Andrew Gelman, et al.,
CRC Press, 2014

#### Stan, RStan, bayesplot, ShinyStan

cparrish@sewanee.edu