Interaction Terms
So far, we have usually treated the effect of one independent variable on the dependent variable as always being the same.
An interaction term lets us relax this.
We make an interaction term by taking two existing variables and just multiplying them together, putting the resulting product into the model.
For example, if we have two variables $X$ and $Z$, we can include $XZ$ in the model too:
$$Y=\beta_0+\beta_1X+\beta_2Z+\beta_3XZ+U$$
As we’ll see, this allows the effect of $X$ on $Y$ to depend on the value of $Z$ – and vice versa.
An Example
Suppose our population model is
$$(testscore)=\beta_0+\beta_1(religiousschool)+\beta_2(mothereduc)+\beta_3(mothereduc)(religiousschool)+U$$
Here:
- $(religiousschool)$ indicates whether somebody attends a religious school
- $(mothereduc)$ is the mother’s years of education
- $(mothereduc)(religiousschool)$ is the interaction term
Because of this interaction term, the effect associated with attending a religious school can now be different for different people.
Partial Effect and Interpretation
To find the partial effect of going to a religious school whilst holding the other variables fixed, we differentiate with respect to $(religiousschool)$:
$$\frac{\partial(testscore)}{\partial(religiousschool)}=\beta_1+\beta_3(mothereduc)$$
So, this effect depends on the value of $(mothereduc)$!
This is often described by saying that the effect of going to a religious school is moderated by mother’s education.
In other words, different values of $(mothereduc)$ give different effects.
The sign of $\beta_3$ tells us the direction of this moderation:
- if $\beta_3>0$, the effect of going to a religious school becomes more positive as mother’s education rises
- if $\beta_3<0$, it becomes less positive, or more negative
- if $\beta_3=0$, there is no interaction effect after all
N.b.: In this example, $(religiousschool)$ is a dummy variable, so strictly speaking we should not really take a derivative. A more literal interpretation is the effect of moving from 0 to 1. However, if we calculate that exact discrete change, we get the same expression:
$$\beta_1+\beta_3(mothereduc)$$
So, our partial derivative method works fine here too.
An Estimated Model
Now suppose our estimated model is
$$\widehat{testscore}=60-22(religiousschool)+10(mothereduc)+2(mothereduc)(religiousschool)$$
Then the estimated partial effect of going to a religious school is
$$\frac{\partial\widehat{testscore}}{\partial(religiousschool)}=-22+2(mothereduc)$$
So there is no single estimated effect of going to a religious school: it depends on mother’s education.
Example 1: Mother Has 10 Years of Education
If
$$(mothereduc)=10$$
then
$$-22+2(10)=-2$$
So, for somebody whose mother has 10 years of education, going to a religious school is associated with an estimated test score that is 2 points lower, holding the other variables fixed.
Example 2: Mother Has 20 Years of Education
If instead
$$(mothereduc)=20$$
then
$$-22+2(20)=18$$
So, for somebody whose mother has 20 years of education, going to a religious school is associated with an estimated test score that is 18 points higher, holding the other variables fixed.
We leave the reader to speculate on why this might be!
Background
Understanding Econometrics is completely free to use, and always will be.
If you found the site useful and would like to help me keep adding new material, please consider buying me a coffee! Buy me a coffee ☕