Model Exploration Using the emmeans Package in R

This workshop will cover how to use the emmeans package in R to explore the results of linear models. When models include many categorical predictors or interaction terms, the reported estimates of the model coefficients are difficult to interpret.

Estimated marginal means are model predictions based on a set of combinations of predictor variables. This workshop will cover how to use estimates marginal means (or emmeans) to interpret model output in tabular or graphical form. We will also cover post hoc comparisons such and the Tukey Test for all pairwise comparsions, as well as custom constrats and difference-of-differences. The emmeans package also allows for testing and comparison of slopes by group in an ancova model, and aids in interpretation of output when the response has been transformed, or for generalized linear models (such as logistic or posison regression).

This workshop assumes familiarity with linear models (regression and anova) as well as logistic regression.

Methods will be demonstrated in a hands-on fashion using R, with the help of the emmeans and ggplot2 packages.

Downloading R and R Studio:

If you intend follow along with the R coding during the workshop, please make sure that you have the latest version of R and RStudio installed.

First, you will need to download and install R. R can be downloaded at: https://cran.r-project.org/.

Next you will need to download and install RStudio. We will use RStudio in this workshop. You can download RStudio at:
https://rstudio.com/products/rstudio/download/#download.