These are some resources you can take a look at to brush up on your R or statistical modeling, that I have found helpful. I’ve divided this resources page into three sections: resources about learning how to code in R, resources about mixed models and applied stats more generally, and resources about Bayesian statistics.

Learning R

R for Data Science

This is a book on using the tidyverse family of R packages to work with data in R. It is available in ebook and print form. It covers how to clean and manipulate data, and how to make simple plots. It even gets into the very basics of statistical modeling.



USDA SciNet’s list of free online R training courses

This is a list of free online tutorials, many available through AgLearn, on R. Many of them cover statistical models including linear mixed models. Shout-out to my fellow ARS statisticians Sara and Kathy, who compiled this list of resources!

SESYNC Cyberhelp lessons

These are tutorials on data science for researchers including a lot of lessons on R and a few on statistics. I helped develop many of these lessons in my previous job at SESYNC.

UCLA Stats Consulting’s page of R resources

The stats consultants at UCLA do a great job putting together tutorials, lessons, and examples on statistics using R. (For SAS users, they also have a nice page of SAS lessons and examples).

QCBS R Workshop series

Another excellent set of R lessons provided by the Québec Centre for Biodiversity Science.

Mixed models

Full-length books

Analysis of GLMMs in the Agricultural and Natural Resources Sciences

This excellent book was co-written by one of my ARS area statistician colleagues. It is packed with relevant examples for agricultural scientists (coded in SAS). page hosting some of the example datasets from the book

Applied Statistics in Agricultural, Biological, and Environmental Sciences

Another gem of a book co-written and edited by my ARS area statistician colleague Kathy Yeater. The chapter on analysis of combined experiments is particularly useful for its discussion of how to decide whether terms should be fixed or random when you have data that span multiple locations and years. The book examples are in SAS but I have R code for some of the chapters that I can provide upon request.

Generalized Linear Mixed Models: Modern Concepts, Methods and Applications

An excellent book on all things GLMM by legendary ag statistician Walt Stroup. It mostly takes a frequentist perspective but has a few chapters on Bayesian GLMMs.

GLMMs with Applications in Agriculture and Biology

I have not gone through this book in depth, but it covers a wide variety of the models that agricultural scientists are likely to encounter.

Short tutorials

Animated visualization of mixed models

This simple visualization does an amazing job explaining what mixed models are.

Basic tutorial on mixed models in R

A brief and accessible introduction.

Mixed models for agriculture in R

This is a lot more technical in terms of the statistics compared with other resources I’ve posted here, but it is very relevant to agricultural data analysis.

Towards Data Science blog post on mixed models

This tutorial by a statistician has some nice demonstrations of the “partial pooling” aspect of mixed models, and goes on to advocate a Bayesian approach to fitting mixed models.

Bayesian statistics

Full-length books

Statistical Rethinking

Richard McElreath has created an amazing Bayesian course called Statistical Rethinking. It has a print book and ebook version, as well as a set of free video lectures. Solomon Kurz translated all the code examples in the book to brms, ggplot2, and tidyverse code: Statistical Rethinking Recoded. Both are highly recommended.

Bayes Rules!

This is another useful book-length course by Johnson, Ott, and Dogucu. It’s based on the rstan interface. I particularly recommend the first chapter, a funny and readable introduction to the Bayesian approach.

Statistical Modeling with R: a dual frequentist and Bayesian approach for life scientists

The title of this book by Pablo Inchausti says it all. It is a well-written and engaging introduction to statistical analysis. It’s one of the rare books that shows the frequentist and Bayesian approaches to the same problem side-by-side.

Short tutorials

Here are some more links to tutorials and lessons for learning basic Bayesian statistics with brms:

Here is a tutorial that goes through all the cool plots and tables you can make from a brms model with Matthew Kay’s tidybayes package.

Generalized additive models (GAMs and GAMMs)

Full-length books

Beginner’s Guide to Generalized Additive Mixed Models with R

A great book by Alain Zuur et al., though it’s kind of hard to find a copy. A good introduction to GAMMs, both Bayesian and frequentist, with lots of examples.

Short tutorials