Lesson M05.L05: Interactions Between Dummies and Continuous Variables
| Field | Detail |
|---|---|
| Module | 05 — Functional Forms & Dummy Variables |
| Level | Graduate |
| Duration | 30–35 min |
| Learning Objective | Specify and interpret dummy-continuous interaction models; understand slope-shift vs intercept-shift; conduct and interpret the Chow test; apply interaction models in policy evaluation contexts. |
| Provenance | Wooldridge Introductory Econometrics, Ch 7.3–7.4 |
Explanation
Dummy × Continuous Interaction: Slope Shifts
In Lesson M05.L03 we allowed a dummy variable to shift the intercept of the regression line (parallel lines with different heights). But what if the dummy variable also changes the slope of the relationship between \(y\) and a continuous variable \(x\)?
The model:
Expected values by group:
Interpretation of coefficients:
| Coefficient | Meaning |
|---|---|
| \(\beta_0\) | Intercept for base group (\(D=0\)) |
| \(\beta_1\) | Intercept difference: group \(D=1\) vs \(D=0\) |
| \(\beta_2\) | Slope of \(x\) for base group |
| \(\beta_3\) | Slope difference: how much steeper (or flatter) the \(x\)-\(y\) relationship is for the \(D=1\) group |
\(\hat{\beta}_3\) is the key parameter: it tells us whether the marginal effect of \(x\) on \(y\) differs between groups.
- \(\hat{\beta}_3 > 0\): the effect of \(x\) is stronger (larger slope) for the \(D=1\) group
- \(\hat{\beta}_3 < 0\): the effect of \(x\) is weaker for the \(D=1\) group
- \(\hat{\beta}_3 = 0\): parallel lines (no slope difference; reduces to the model in M05.L03)
The Chow Test
The Chow test is an F-test of whether all regression coefficients differ between two groups, not just the slope.
Full unrestricted model:
Null hypothesis (no structural break between groups):
This tests whether both the intercept and the slope are the same for both groups. Rejection means the two groups have different regression functions — you should estimate them separately (or use the interaction model).
F-statistic:
where \(q = 2\) (number of restrictions: \(\beta_1 = 0\) and \(\beta_3 = 0\)), \(SSR_R\) is from the restricted model (pooled, no interactions), and \(SSR_U\) is from the unrestricted model.
Alternative formulation (computationally equivalent): Run OLS separately for each group; compute \(SSR_1\) and \(SSR_2\); then:
where \(k\) is the number of coefficients in each group's model.
Policy Evaluation Application
Interactions are central to difference-in-differences (DiD) style analysis:
Here: - \(Treated_i \in \{0,1\}\): treatment group indicator - \(Post_t \in \{0,1\}\): post-policy period indicator - \(\beta_3\): the DiD estimator — the treatment effect, identifying causal impact under the parallel trends assumption
This is M07 content, but the structural form — dummy × dummy or dummy × continuous interactions — is the same tool introduced here.
Worked Example
Research question: Do women receive lower returns to education than men?
Model:
Estimated (Wooldridge WAGE1, \(n = 526\)):
| Variable | Coefficient | SE | t-stat |
|---|---|---|---|
| Intercept | 0.389 | 0.119 | 3.27 |
| female | −0.227 | 0.168 | −1.35 |
| educ | 0.082 | 0.009 | 9.11 |
| female × educ | −0.0056 | 0.013 | −0.43 |
Interpreting the slope:
- Men (\(female = 0\)): return to education = \(0.082\) per year ≈ 8.2%
- Women (\(female = 1\)): return to education = \(0.082 + (-0.0056) = 0.0764\) per year ≈ 7.6%
Test: Is \(\hat{\beta}_3 = -0.0056\) statistically significant? \(t = -0.43\), \(p\)-value large. We cannot reject \(H_0: \beta_3 = 0\) — the evidence does not support a statistically significant difference in the education slope between men and women in this sample.
Chow test (test both intercept and slope differences, \(H_0: \beta_1 = \beta_3 = 0\)):
Compute \(F_{2,522}\). If significant, conclude the entire wage equation differs by gender.
Important caveat: The coefficient on \(female\) (\(\hat{\beta}_1 = -0.227\)) is now the effect of being female for workers with zero years of education — not the average gender gap across all workers. When the interaction is present, the "main effect" of the dummy is evaluated at \(x = 0\).
Common Misconception
"If the interaction term is significant, \(\hat{\beta}_1\) gives the average effect of being in the dummy group."
Correction: In an interaction model, \(\hat{\beta}_1\) is the effect of \(D = 1\) when \(x = 0\) — not the average effect over all values of \(x\). The full effect of the dummy at any given value of \(x\) is:
At \(x = 0\), this equals \(\hat{\beta}_1\). At the mean of \(x\), it equals \(\hat{\beta}_1 + \hat{\beta}_3 \bar{x}\). For a meaningful average effect, you must either evaluate at a substantively interesting value of \(x\) (e.g. \(\bar{x}\)) or compute the marginal effect averaged over the sample distribution of \(x\) using margins in Stata or marginaleffects in R.
Practice Prompts
Prompt 1 — Slope interpretation A researcher estimates the effect of training programs on worker productivity:
where \(output\) is units produced per day, \(trained \in \{0,1\}\), and \(months\) is months on the job.
(a) What is the slope of experience (months) for untrained workers? (b) What is the slope for trained workers? (c) Interpret the coefficient 0.5 on the interaction. (d) At what level of \(months\) does the productivity of trained workers first exceed that of untrained workers?
Prompt 2 — Chow test A researcher pools data from two countries (A and B) and estimates:
The restricted model (no interactions, \(\beta_1 = \beta_3 = 0\)) gives \(SSR_R = 412.3\); the unrestricted model gives \(SSR_U = 388.1\); \(n = 200\), \(k = 4\).
(a) Compute the Chow F-statistic. (b) Find the critical value at the 5% level. (c) What do you conclude?
Prompt 3 — Policy evaluation A state introduces a minimum wage increase in 2020. You have quarterly employment data for affected counties (treatment) and unaffected counties (control), 2018–2022.
(a) Write the difference-in-differences regression equation, defining all variables clearly. (b) Which coefficient is the policy effect of interest? (c) What assumption is needed for \(\hat{\beta}_{DiD}\) to be a causal estimate?
Further Resources
- Wooldridge, Introductory Econometrics (7th ed.), §7.3–7.4
- Stata:
gen femXeduc = female * educthenreg lwage female educ femXeduc, orreg lwage female##c.educ - R:
lm(log(wage) ~ female * educ, data = wage1)— automatically creates main effects and interaction - Chow test in Stata:
suestor separate regressions withtestafter seemingly unrelated estimation marginaleffectsR package: compute average marginal effects after interactions