- An interaction term is the product of two regressors, such as \(educ \times female\). It lets the effect of one variable depend on the value of another.
- With an interaction, the coefficient on a “main effect” is the effect when the other variable is zero, not an average effect.
- Dummy × continuous: different slopes for each group. Continuous × continuous: the slope of one changes smoothly with the other.
- Test the interaction coefficient with a t-test; test “no difference at all between groups” with an F-test on the dummy and the interaction together.
- Centre continuous variables to make the main effects meaningful.
The problem: one slope for everyone
A standard wage regression gives a single return to education: each extra year of schooling adds the same amount to pay for everybody. But what if the payoff to education is different for men and women, or for workers in cities and rural areas? What if a fertiliser raises yields more when rainfall is high? A model with one slope cannot capture this. Interaction terms can, and they are one of the most used, and most misread, tools in applied econometrics[1].
Key ideas
The coefficient \(\beta_3\) tells you how much the slope of \(x\) changes when \(z\) rises by one unit. The coefficient \(\beta_1\) is the slope of \(x\) only when \(z = 0\). That second point catches out many students and some published papers[2].
Worked example: a dummy × continuous interaction
Using a sample of workers, a researcher estimates (standard errors in brackets):
\(\widehat{wage} = 4.00 + 1.20\,educ – 1.00\,female – 0.15\,(educ \times female)\)
\(\qquad\quad (0.90)\ \ (0.10)\qquad (1.40)\qquad\ \ (0.07)\)
where wage is in dollars per hour and educ is years of schooling. Interpret the results. (The figures are illustrative.)
Conclusion: interpret interaction models by writing out the equation for each group, or by calculating effects at meaningful values. Never interpret a main effect on its own.
Continuous × continuous interactions
Suppose crop yield depends on fertiliser \(F\) and rainfall \(R\): \(\widehat{yield} = 2.0 + 0.40F + 0.05R + 0.002(F \times R)\). The effect of one more unit of fertiliser is \(0.40 + 0.002R\). With 100 mm of rain it is 0.60; with 300 mm it is 1.00. Fertiliser is worth more in wetter years.
Here \(0.40\) is the fertiliser effect at zero rainfall, again not a useful number. Centring fixes this: replace \(R\) with \(R – \bar R\). Then the coefficient on \(F\) becomes the effect of fertiliser at average rainfall, and the interaction coefficient is unchanged.
Testing
- Do the slopes differ? t-test on \(\beta_3\).
- Do the groups differ at all? Joint F-test that \(\beta_2 = \beta_3 = 0\). This is the Chow test written as a regression.
- Is the effect of \(x\) significant at a given \(z\)? Test \(\beta_1 + \beta_3 z = 0\), which needs the covariance of the two estimates; software does this with a “lincom” or “margins” command.
Free help or the books
Our guides to reading regression output, dummy variables and log coefficients cover the basics. The Econometrics Made Simple textbook works through interactions, quadratics and functional form on real datasets with code in Python, R and Stata.
Practice questions
EasyQ1. In \(\hat y = 10 + 2x + 5d + 3(x \times d)\), where \(d\) is a dummy, write the fitted line for each group. Show worked answer
\(d = 1\): \(\hat y = 15 + 5x\).
EasyQ2. What does the coefficient on an interaction term measure? Show worked answer
MediumQ3. \(\widehat{price} = 50 + 1.2\,size + 20\,garden + 0.3\,(size \times garden)\), size in m². What is the effect of 10 extra m² for a house with a garden? Without? Show worked answer
Without: slope 1.2, so +12.
MediumQ4. Explain why the coefficient on \(educ\) in a model with \(educ \times experience\) may be hard to interpret, and how centring helps. Show worked answer
ExamQ5. A study estimates \(\ln(wage) = \beta_0 + \beta_1 educ + \beta_2 urban + \beta_3 (educ \times urban) + u\) and finds \(\hat\beta_1 = 0.06\), \(\hat\beta_3 = 0.03\) (s.e. 0.01). (a) Interpret \(\hat\beta_1\) and \(\hat\beta_3\). (b) Test whether returns to education differ between urban and rural workers at 5%. (c) What test would show whether urban and rural workers have identical wage equations? [7 marks] Show worked answer
(b) \(H_0: \beta_3 = 0\). \(t = 0.03/0.01 = 3.0 > 1.96\), so reject: returns differ. [2]
(c) A joint F-test of \(H_0: \beta_2 = \beta_3 = 0\) (equivalent to a Chow test). [2]
Frequently asked questions
Do I always need the main effects?
Almost always. Keep both main effects whenever you include their interaction, unless theory gives a very strong reason not to.
What about interactions in logit or probit models?
They are trickier, because marginal effects there depend on all the variables. Compute marginal effects at chosen values rather than reading the coefficient directly.
Can I interact two dummies?
Yes. With female and urban, the interaction shows whether the gender gap differs between urban and rural areas. This is the same structure as difference-in-differences.
References
- Wooldridge, J. M. (2020) Introductory Econometrics: A Modern Approach. 7th edn. Boston, MA: Cengage. Chapters 6–7.
- Brambor, T., Clark, W. R. and Golder, M. (2006) ‘Understanding interaction models: improving empirical analyses’, Political Analysis, 14(1), pp. 63–82. https://doi.org/10.1093/pan/mpi014

