Hi I am Mike Marin and in this video we will discuss the concept of interaction in a
linear regression model. We will examine the concept of interaction and how this is interpreted
for two categorical variables with two levels each. Our example will consists of an outcome
or dependent variable of the Length of Stay in hospital, an explanatory or independent
variable of whether or not the individual smokes recorded as Yes or No, and an explanatory
or independent variable of whether or not the individual has regularly been exposed to Asbestos,
recorded as Yes or No. Both of these variables will have No as the
reference category. Now let's suppose that the data looks as follows: the X-axis shows
whether or not they have been exposed to Asbestos, and the plotting characters n or s coloured
using blue or red indicate a Non-Smoker and a Smoker respectively.
The lines added into this plot show the mean Length of Stay for each of the four groups
formed by the smoking variable and the Asbestos exposure variable. In this plot, we can see
that the effect of Asbestos exposure and the effect of Smoking interact. That is the
effect of Asbestos exposure on the Length of Stay is dependent on Smoking and Vice Versa.
Let's talk about why I am saying that this plot displays the concept of interaction.
Looking at this plot we can see that the effect of smoking on the mean Length of Stay is different
for those who are not exposed to Asbestos and for those who are exposed to Asbestos.
In other words, the effect of smoking depends on whether or not they have been exposed to
Asbestos. We can also see that the effect of exposure on the Length of Stay depends
on whether or not they smoke. Here we can see the effect of exposure to Asbestos for
Non-Smokers and here we can see the effect of exposure to Asbestos for a Smoker.
The effect of Asbestos exposure is different depending on whether or not they smoke. These
can all be stated in a few different ways: we could say that the effect of Asbestos exposure
and the effect of smoking interact; we can also say that effect of smoking depends on
Asbestos exposure and vice versa; or that the effect of smoking is modified by Asbestos
exposure and vice versa. Let's take a look at this numerically. Here we've added in the
mean for each of these four groups. Suppose that the fitted regression model is as shown here.
Recall that the smoking indicator equals 1 if they smoke and the Asbestos exposure indicator
equals 1 if they've been exposed. The 23.1 is the interaction term. We can think of this
as capturing the change in the smoking effect if someone has been exposed to Asbestos or
we can think of this as the change in the Asbestos exposure effect if someone smokes.
The intercept term of 21.5 tells us the mean Length of Stay for the reference group. That
is for the Non-Smokers who are not exposed to Asbestos. The 11.1 is the smoking effect
for someone not exposed to Asbestos; and the 23.1 is the change in smoking effect for someone
who has been exposed to Asbestos. So for someone who has been exposed to Asbestos the smoking
effect is 11.1 + 23.1 which is 34.2 .For individuals who have been exposed to Asbestos we expect
the Smoker to have an increase in the mean Length of Stay of 34.2 days relative to Non-Smokers.
To state that again, for those who are not exposed to Asbestos we expect mean Length
of Stay to increase by 11.1 days for a Smoker relative to a Non-Smoker, and for those who
have been exposed to Asbestos we expect the mean Length of Stay to increase by 34.2 for
Smoker relative to a Non-Smoker. The effect of smoking on the Length of Stay
is much larger for those who have been exposed to Asbestos than those who have not.
Now let's look at this again but from the perspective of the effect of exposure to Asbestos.
Recall that the intercept of 21.5 is the mean Length of Stay for a Non-Smoker who is not
exposed to Asbestos. The 14.6 is the effect of exposure to Asbestos for a Non-Smoker.
And the 23.1 is the change in the effect of Asbestos exposure for those who do smoke so
for someone who smokes the effect of Asbestos exposure is 14.6 +23.1 which is 37.7. In other
words, for individuals who smoke we expect that those who have been exposed to Asbestos
have an increase of 37.7 days in length of stay relative to those who have not been exposed
to Asbestos. To state that again, for those who do not
smoke we expect Asbestos exposure to increase the mean Length of Stay by 14.6 days; and
for those who do smoke we expect Asbestos exposure to increase the mean Length of Stay
by 37.7 days. The effect of Asbestos exposure is different for those who smoke and for those
who do not and ends up being much more harsher of an effect for those who do smoke. For the
sake of comparing and contrasting let's take a quick look at what a model that does not
include interaction would look like. No interaction suggests that the effect of smoking is the
same for those who are exposed to Asbestos and those who are not. No interaction also
suggests that the effect of Asbestos exposure is the same for Smokers and for Non-Smokers.
This is the same concept as parallel lines discussed in previous videos. As we noted
there, in order to include an interaction term in our model, the interaction term should
satisfy a few things. First, it should make sense conceptually; that is it should be reasonable
to believe that the effect of Asbestos exposure would be different for Smokers and for Non-Smokers.
The interaction term should also be statistically significant and this can be judged by the
p-vlaue of the interaction term, confidence interval or other forms of significance tests.
In following videos, we'll continue to build up our understanding of linear regression
models. Thanks for watching this video, and make sure
to check out my other instructional videos.