Preface

This book is a series of tutorials on data analysis with examples drawn from paleobiology, macroevolution, and macroecology. Each chapter of this book can act as a 2-hour tutorial, with each lesson building on the previous ones.

I emphasize Bayesian data analysis approaches throughout this text. Parameter inference is done using the brms package which is a flexible tool for implementing Stan-based models in R.

This book uses the tidyverse collection of R packages with a particular emphasis on dplyr, ggplot2, and purrr. Other tidyverse packages are used as necessary (e.g. modelr). Management and processing of posterior estimates, as well as some some aspects of visualization, is done using the tidybayes package. The pacman package is used throughout to ensure that all packages are both installed and loaded into namespace. The here package is used to ensure safe file paths. I attempt to stick to the tidyverse style guide as much as possible.

A lot of material in this book is derived from material and examples presented in Statistical Rethinking by Richard McElreath, Bayesian Data Analysis 3 by Gelman et al., and Data Analysis Using Regression and Multilevel/Hierarchical Models by Gelman and Hill.

Additionally, some of the code used in this book is derived from this rewriting of Statistical Rethinking.

This textbook was made possible by my postdoctoral funding provided by Seth Finnegan during my time at UC-Berkeley (2017-2019).