Skip to Main Content

Analysis and Visualization of Interactions in R

Welcome to the Analysis and Visualization of Interactions in R workshop!

This workshop will teach you how to analyze and visualize interactions in regression models in R using the emmeans package and with base R coding.

Requirements

Before beginning the seminar, please make sure you have R and RStudio installed.

Please also make sure to have the following R packages installed, and if not, run these commands in R (RStudio).

install.packages("emmeans", dependencies=TRUE)

install.packages("ggplot2", dependencies=TRUE)

Code Files

The following code files can be used to participate in the R coding in the workshop.  Right-click to download or left-click to open the file, then copy-and-paste the whole file into the RStudio script editor.   For those participating in a live workshop, we encourage you to use the file without solutions to the exercises.

 

Presentation slides

 Analysis and Visualization of Interactions in R : Left-click the link to open the presentation directly. To download with all images, open the presentation (by left-clicking), then right-click in the presentation, select “Save As”, and then make sure you save as type “Webpage, Complete” (Note: this will download the webpage and a folder of images and style files).

Use any web browser (Chrome, Firefox, etc.) to view the seminar. Once it is open, use the following keys to alter the display: