Marinstatslectures

Like Us on FacebookFollow Us on TwitterSubscribe to Us on Youtube!Join Us on Google+

  Interpreting Interaction in Linear Regression (Tutorial 5.10)

In this video, we use an example that consists of one outcome or dependent variable and two explanatory or independent variable with two levels each.

First we will examine the data visually by producing a plot. This plot displays the interaction, which will be discussed in details in the video. Here you will learn to use different ways to state interaction in your data. Later you will see how to examine the interaction numerically by looking at the fitted regression model and learn different ways to state that. Tutorial 5.9 will show you how to include interaction or effect modification in a regression model in R.

In this video, we will also look at a model that does not include interaction and examine the terms for including an interaction term in our model.

 

How to make the Plot in the video: 

The plot in this video is produced manually; if you want to make the plot follow these steps:

In general, the type of plot to use to show interaction depends a bit on the types of variables you have. Since the variables in this video were both categorical Xs (with a numeric Y), we just need to show the 4 means on the plot. 

To produce this plot, first take the length of stay for each of the 4 different groups, and plot those one at a time. For the "no-asbestos" group, create a sequence running from 0.6 to 1.4 (entered at 1) and plot the length of stay against this. Then re-label the x-axis to read "no-asbestos" where the 1 would appear. Do the same for the other group, plotting the "asbestos" group using a sequence running from 1.6 to 2.4 (entered at 2), and then change the label of 2 on the x-axis to read "asbestos"! 

 

Previous Video in Series 5 R Tutorials

Back to Series 5 R Tutorials