Statistical Rethinking: A Bayesian Course with Examples in R and Stan builds your knowledge of and confidence in making inferences from data. Reflecting the need for scripting in today's model-based statistics, the book pushes you to perform step-by-step calculations that are usually automated. This unique computational approach ensures that you understand enough of the details to make reasonable choices and interpretations in your own modeling work.
The text presents causal inference and generalized linear multilevel models from a simple Bayesian perspective that builds on information theory and maximum entropy. The core material ranges from the basics of regression to advanced multilevel models. It also presents measurement error, missing data, and Gaussian process models for spatial and phylogenetic confounding.
The second edition emphasizes the directed acyclic graph (DAG) approach to causal inference, integrating DAGs into many examples. The new edition also contains new material on the design of prior distributions, splines, ordered categorical predictors, social relations models, cross-validation, importance sampling, instrumental variables, and Hamiltonian Monte Carlo. It ends with an entirely new chapter that goes beyond generalized linear modeling, showing how domain-specific scientific models can be built into statistical analyses.
Features
Integrates working code into the main text
Illustrates concepts through worked data analysis examples
Emphasizes understanding assumptions and how assumptions are reflected in code
Offers more detailed explanations of the mathematics in optional sections
Presents examples of using the dagitty R package to analyze causal graphs
Provides the rethinking R package on the author's website and on GitHub
Author(s): Richard McElreath
Series: CHAPMAN & HALL/CRC Texts in Statistical Science
Edition: 2
Publisher: CRC Press
Year: 2020
Language: English
Pages: xviii+593
Cover
Half Title
Title Page
Copyright Page
Table of Contents
Preface to The Second Edition
Preface
Audience
Teaching Strategy
How to Use this Book
Installing the Rethinking R Package
Acknowledgments
Chapter 1: The Golem of Prague
1.1. Statistical Golems
1.2. Statistical Rethinking
1.3. Tools for Golem Engineering
1.4. Summary
Chapter 2: Small Worlds and Large Worlds
2.1. The Garden of Forking Data
2.2. Building a Model
2.3. Components of the Model
2.4. Making the Model Go
2.5. Summary
2.6. Practice
Chapter 3: Sampling the Imaginary
3.1. Sampling from a Grid-Approximate Posterior
3.2. Sampling to Summarize
3.3. Sampling to Simulate Prediction
3.4. Summary
3.5. Practice
Chapter 4: Geocentric Models
4.1. Why Normal Distributions are Normal
4.2. A Language for Describing Models
4.3. Gaussian Model of Height
4.4. Linear Prediction
4.5. Curves from Lines
4.6. Summary
4.7. Practice
Chapter 5: The Many Variables & The Spurious Waffles
5.1. Spurious Association
5.2. Masked Relationship
5.3. Categorical Variables
5.4. Summary
5.5. Practice
Chapter 6: The Haunted Dag & The Causal Terror
6.1. Multicollinearity
6.2. Post-Treatment Bias
6.3. Collider Bias
6.4. Confronting Confounding
6.5. Summary
6.6. Practice
Chapter 7: Ulysses' Compass
7.1. The Problem with Parameters
7.2. Entropy and Accuracy
7.3. Golem Taming: Regularization
7.4. Predicting Predictive Accuracy
7.5. Model Comparison
7.6. Summary
7.7. Practice
Chapter 8: Conditional Manatees
8.1. Building an Interaction
8.2. Symmetry of Interactions
8.3. Continuous Interactions
8.4. Summary
8.5. Practice
Chapter 9: Markov Chain Monte Carlo
9.1. Good King Markov and His Island Kingdom
9.2. Metropolis Algorithms
9.3. Hamiltonian Monte Carlo
9.4. Easy HMC: ulam
9.5. Care and Feeding of Your Markov Chain
9.6. Summary
9.7. Practice
Chapter 10: Big Entropy and the Generalized Linear Model
10.1. Maximum Entropy
10.2. Generalized Linear Models
10.3. Maximum Entropy Priors
10.4. Summary
Chapter 11: God Spiked the Integers
11.1. Binomial Regression
11.2. Poisson Regression
11.3. Multinomial and Categorical Models
11.4. Summary
11.5. Practice
Chapter 12: Monsters and Mixtures
12.1. Over-Dispersed Counts
12.2. Zero-Inflated Outcomes
12.3. Ordered Categorical Outcomes
12.4. Ordered Categorical Predictors
12.5. Summary
12.6. Practice
Chapter 13: Models with Memory
13.1. Example: Multilevel Tadpoles
13.2. Varying Effects and the Underfitting/Overfitting Trade-Off
13.3. More than One Type of Cluster
13.4. Divergent Transitions and Non-Centered Priors
13.5. Multilevel Posterior Predictions
13.6. Summary
13.7. Practice
Chapter 14: Adventures in Covariance
14.1. Varying Slopes by Construction
14.2. Advanced Varying Slopes
14.3. Instruments and Causal Designs
14.4. Social Relations as Correlated Varying Effects
14.5. Continuous Categories and the Gaussian Process
14.6. Summary
14.7. Practice
Chapter 15: Missing Data and Other Opportunities
15.1. Measurement Error
15.2. Missing Data
15.3. Categorical Errors and Discrete Absences
15.4. Summary
15.5. Practice
Chapter 16: Generalized Linear Madness
16.1. Geometric People
16.2. Hidden Minds and Observed Behavior
16.3. Ordinary Differential Nut Cracking
16.4. Population Dynamics
16.5. Summary
16.6. Practice
Chapter 17: Horoscopes
Endnotes
Bibliography
Citation Index
Topic Index