Statistical Rethinking
In 2020, Gradient wanted to collectively up their statistical knowledge. We did this using Richard McElreath’s Statistical Rethinking as our starting point. If you’d like to order your personal copy of Statistical Rethinking. Feel free to use your RAMP card.
Contents
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.
R package
The book is accompanied by an R package,
rethinking. The package is available from github. The core of this package is two functions, quap and ulam, that allow many different statistical models to be built up from standard model formulas. This has the virtue of forcing the user to lay out all of the assumptions. The function quap performs maximum a posteriori fitting. The function ulam builds a Stan model that can be used to fit the model using MCMC sampling. Some of the more advanced models in the last chapter are written directly in Stan code, in order to provide a bridge to a more general tool. There is also a technical manual with additional documentation.
Week by week, we covered a set of chapters, and discussed the chapters during a live session. In case you want to go through the chapters yourself, and have any remaining questions, you can take a look at the video to see if it’s answered.