Modern R with the tidyverse

by Bruno Rodrigues


This book will teach you how to use R to solve you statistical, data science and machine learning problems. Importing data, computing descriptive statistics, running regressions (or more complex machine learning models) and generating reports are some of the topics covered. No previous experience with R is needed. […] This book is still being written. Chapters 1 to 6 are almost ready. Chapter 7 is outdated, but the key messages are still useful. Chapters 8 and 9 are quite complete too. 10 and 11 are empty for now. Some exercises might be at the wrong place too. If you already like what you … Read more →


Mixed Models in R

by Michael Clark

Mixed Models in R

This is an introduction to mixed models in R. It covers a many of the most common techniques employed in such models, and relies heavily on the lme4 package. The basics of random intercepts and slopes models, crossed vs. nested models, etc. are covered. Discussion includes extensions into generalized mixed models and realms beyond. […] … Read more →


Advanced Spatial Modeling with Stochastic Partial Differential Equations Using R and INLA

by Elias T. Krainski, Virgilio Gómez-Rubio, Haakon Bakka, Amanda Lenzi, Daniela Castro-Camilo, Daniel Simpson, Finn Lindgren and Håvard Rue


Advanced Spatial Modeling with Stochastic Partial Differential Equations Using R and INLA […] This book grew out of a tutorial written by Elias T. Krainski, which he started in 2013 together with his PhD-studies at NTNU, Trondheim, Norway. The tutorial has since then been expanded continuously, based on response from the many users and based on new developments. Lindgren, Rue, and Lindström (2011) describe an approximation to continuous spatial models with a Matérn covariance that is based on the solution to a stochastic partial differential equation (SPDE). This approximation is computed … Read more →


Notes for ST463/ST683 Linear Models 1

by Katarina Domijan, Catherine Hurley


These are the notes for ST463/ST683 Linear Models 1 course offered by the Mathematics and Statistics Department at Maynooth University. This module is offered at as a part of of MSc in Data Science and Data Analytics. It is an introductory course for students who have basic background in Statistics, Data analysis, R Programming and linear algebra (matrices). […] There are many good resources, e.g. Weisberg (2005), Fox (2005), Fox (2016), Ramsey and Schafer (2002), Draper and Smith (1966). We will use Minitab and R (R Core Team 2017). To create this document, I am using the bookdown package … Read more →


Statistical Rethinking with brms, ggplot2, and the tidyverse

by A Solomon Kurz


This project is an attempt to re-express the code in McElreath’s textbook. His models are re-fit in brms, plots are redone with ggplot2, and the general data wrangling code predominantly follows the tidyverse style. […] I love McElreath’s Statistical Rethinking text. It’s the entry-level textbook for applied researchers I spent a couple years looking for. McElreath’s freely-available lectures on the book are really great, too. However, I’ve come to prefer using Bürkner’s brms package when doing Bayeisn regression in R. It’s just spectacular. I also prefer plotting with Wickham’s ggplot2, … Read more →


Graphical & Latent Variable Modeling

by Michael Clark


This document focuses on structural equation modeling. It is conceptually based, and tries to generalize beyond the standard SEM treatment. It includes special emphasis on the lavaan package. Topics include: graphical models, including path analysis, bayesian networks, and network analysis, mediation, moderation, latent variable models, including principal components analysis and ‘factor analysis’, measurement models, structural equation models, mixture models, growth curves, item response theory, Bayesian nonparametric techniques, latent dirichlet allocation, and more. Read more →


Data Visualization with R

by Rob Kabacoff

Data Visualization with R

A guide to creating modern data visualizations with R. Starting with data preparation, topics include how to create effective univariate, bivariate, and multivariate graphs. In addition specialized graphs including geographic maps, the display of change over time, flow diagrams, interactive graphs, and graphs that help with the interpret statistical models are included. Focus is on the 45 most popular graph types. The guide also includes detailed instructions on how to customizing graphs, and ends with a chapter on graphing best practices. Although strongly based on the ggplot2 package, other approaches are included as well. Read more →


Generalized Additive Models

by Michael Clark

Generalized Additive Models

An introduction to generalized additive models (GAMs) is provided, with an emphasis on generalization from familiar linear models. It makes extensive use of the mgcv package in R. Discussion includes common approaches, standard extensions, and relations to other techniques. More technical modeling details are described and demonstrated as well. […] … Read more →


recoding Introduction to Mediation, Moderation, and Conditional Process Analysis

by A Solomon Kurz


This project is an effort to connect his Hayes’s conditional process analysis work with the Bayesian paradigm. Herein I refit his models with my favorite R package for Bayesian regression, Bürkner’s brms. I use syntax based on sensibilities from the tidyverse and plot with Wickham’s ggplot2. […] Andrew Hayes’s Introduction to Mediation, Moderation, and Conditional Process Analysis text, the second edition of which just came out, has become a staple in social science graduate education. Both editions of his text have been from a frequentist OLS perspective. This project is an effort to … Read more →


Broadening Your Statistical Horizons

by J. Legler and P. Roback


Test. […] Broadening Your Statistical Horizons (BYSH): Generalized Linear Models and Multilevel Models is intended to be accessible to undergraduate students who have successfully completed a regression course through, for example, a textbook like Stat2. We started teaching this course at St. Olaf in 2003 so students would be able to deal with the non-normal, correlated world we live in. It has been offered at St. Olaf every year since; in fact, it is required for all statistics concentrators. Even though there is no mathematical prerequisite, we still introduce fairly sophisticated topics … Read more →


Exploratory Data Analysis with R

by Roger D. Peng

Exploratory Data Analysis with R

This book covers the essential exploratory techniques for summarizing data with R. These techniques are typically applied before formal modeling commences and can help inform the development of more complex statistical models. Exploratory techniques are also important for eliminating or sharpening potential hypotheses about the world that can be addressed by the data you have. We will cover in detail the plotting systems in R as well as some of the basic principles of constructing informative data graphics. We will also cover some of the common multivariate statistical techniques used to visualize high-dimensional data. Read more →