Step 9: Dummy Variables and the Chow Test
- A dummy variable equals 1 if an observation has a characteristic and 0 if not. A single dummy shifts the intercept: its coefficient is the difference from the base group, holding the other regressors fixed.
- When \( y \) is in logs, a dummy coefficient \( \delta \) means a difference of exactly \( 100(e^{\delta}-1) \)%. In the book’s wage data the gender gap of −0.1578 is −14.6%, not −15.8%.
- A variable with \( g \) categories needs \( g-1 \) dummies. Including all \( g \) with an intercept is the dummy-variable trap (perfect collinearity).
- Interacting a dummy with a continuous variable gives each group its own slope. The Chow test asks whether a whole regression differs between two groups or two periods.
- Exam point: say where a Chow test finds the difference (intercept, slopes or both), not just whether it rejects.
- How to code qualitative information as 0/1 dummies and read a dummy coefficient as an intercept shift.
- How to convert a dummy coefficient into an exact percentage when \( y \) is in logs.
- How to handle several categories, choose a base and avoid the dummy-variable trap, and when to treat an ordinal variable as dummies.
- How to interpret interactions between two dummies and between a dummy and a continuous variable.
- How to run the Chow test in both forms, test for a structural break, and recognise the linear probability model.
Turning categories into numbers
Many things economists care about are not numbers. A worker is a man or a woman, a union member or not, lives in one of four regions. A house has a pool or it does not. A quarter falls before or after a policy change. To use such information in a regression, you turn it into variables that equal 0 or 1.
Three conventions keep dummies easy to read. Name the dummy after the category coded 1: female, not gender. Code it 0 and 1, never 1 and 2; recode survey data before you run anything. Use the mean as a check: the mean of a dummy is a proportion. In wages.csv the mean of female is 0.514, so 51.4% of the sample are women.
One dummy: shifting the intercept
Add the dummy female to a regression of log wage on education:
For men the intercept is \( \beta_0 \); for women it is \( \beta_0 + \delta_0 \). The slope on education is the same for both. A single dummy shifts the line up or down without changing its slope, so the gap is the same at every level of education. With no other regressors, the regression of \( y \) on a dummy simply gives the two group means: the intercept is the base-group mean and the coefficient is the difference in means.
Chapter 9 of Econometrics Made Simple estimates the gender gap on the 1,000 workers in wages.csv. Alone, the female coefficient is −0.1582 (se 0.0321). With education, experience and tenure added:
The gap hardly moves when controls are added because men and women in this sample barely differ in them: average schooling is 11.61 years for men and 11.67 for women, and average experience 17.64 and 17.70. By the omitted variable bias formula of Step 6, controls that do not differ between groups cannot explain a gap between them. The standard error does fall, from 0.0321 to 0.0286, because the controls remove noise.
A dummy cannot change by a small amount; it jumps from 0 to 1. So the approximation \( 100\delta \) from Step 8 is close only when \( |\delta| \) is below about 0.1. Our post Dummy Variables has further worked examples.
Several categories and the dummy-variable trap
A variable with \( g \) categories needs \( g-1 \) dummies in a regression with an intercept. The category left out is the base. With region and East as the base:
Why not all four? Because East + North + South + West = 1 for every worker, and the intercept is also a column of ones. The intercept is then an exact linear combination of the dummies, which breaks MLR.3. Adding any constant to \( \beta_0 \) and subtracting it from every \( \delta \) gives the same fitted values, so OLS has no unique answer. This is the dummy-variable trap. Software drops one category for you.
With East as the base, the region coefficients are North 0.0239, South −0.1076 and West −0.0193 (controls: female, educ, exper, tenure). Find the South–North difference as an exact percentage, and say whether regions matter.
Regions differ, mainly because the South pays less than the other three. Changing the base relabels the comparisons; it does not change the model.
Ordinal variables: one number or dummies?
An ordinal variable has a natural order but no natural scale: a credit rating, a satisfaction score, a level of education. Entering it as one number (1, 2, 3, 4) forces equal steps. Dummies let every step differ. The book groups schooling into four levels. As one number, each level adds 0.2216 to log wage. As dummies, the steps are 0.2840, 0.1415 and 0.3104, far from equal. The numeric model is a restricted version of the dummy model (two restrictions), and the \( F \) test gives \( F = 3.288 \), \( p = 0.038 \): the equal-steps restriction is rejected at 5%.
Interactions with dummies
Two dummies: four groups
Adding female × married lets the marriage premium differ by sex. The product is 1 only for married women. The book’s estimates (controls: educ, exper, tenure) give four group intercepts:
| Group | Intercept | Difference from single men |
|---|---|---|
| Single men (base) | \( \beta_0 \) | — |
| Married men | \( \beta_0 + \delta_2 \) | +0.0376 (+3.83%) |
| Single women | \( \beta_0 + \delta_1 \) | −0.1847 (−16.86%) |
| Married women | \( \beta_0 + \delta_1 + \delta_2 + \delta_3 \) | −0.0656 (−6.35%) |
\( \hat\delta_1 = -0.1847 \) is the gender gap among single workers; \( \hat\delta_2 = 0.0376 \) the marriage premium for men; and the interaction \( \hat\delta_3 = 0.0815 \) is how much larger the premium is for women (0.1191 in total). Its \( t = 1.36 \), so the data cannot reject equal premiums.
A dummy and a continuous variable: different slopes
For men the slope on education is \( \beta_1 \); for women it is \( \beta_1 + \delta_1 \). The gap between the groups at any education level is \( \delta_0 + \delta_1\,\text{educ} \).
The estimates are \( \hat\delta_0 = 0.0715 \) (\( t = 0.40 \)), \( \hat\beta_1 = 0.1150 \) and \( \hat\delta_1 = -0.0197 \) (\( t = -1.29 \)). Interpret them and find the gap at the mean education of 11.64 years.
Centring educ at its mean makes the female coefficient equal this gap directly (−0.1579, se 0.0286).
The Chow test: is the whole regression the same?
Do urban and rural workers need separate wage equations? With \( k \) regressors, the null hypothesis is that all \( k+1 \) parameters (intercept included) are equal across the two groups.
\( \text{SSR}_P \) comes from the pooled regression and \( \text{SSR}_1, \text{SSR}_2 \) from separate regressions for each group. Equivalently, interact the group dummy with every regressor and test all the dummy terms jointly. The fully interacted model has SSR equal to \( \text{SSR}_1 + \text{SSR}_2 \), so the two versions give the same \( F \).
For \( \log(\text{wage}) = \beta_0 + \beta_1\,\text{educ} + u \) (\( k = 1 \), \( n = 1{,}000 \)): \( \text{SSR}_P = 227.1837 \), urban \( \text{SSR}_1 = 146.1430 \), rural \( \text{SSR}_2 = 78.6958 \). Carry out the Chow test.
The return to schooling is the same in towns and the countryside; the level of pay is not. A single urban dummy with a common slope describes these data well.
Two refinements. To test only the slopes, keep the dummy in both models and test the interaction terms. And the classic Chow test assumes equal error variances in the two groups; a heteroskedasticity-robust version (Step 11) gives \( F = 5.50 \), \( p = 0.004 \) here, so the conclusion stands.
Structural breaks: the Phillips curve
The same tools ask whether a relationship changed at a date. A break dummy equals 0 before the break and 1 from it. Alone it shifts the intercept; interacted with a regressor it changes the slope. Using real US quarterly data, the book defines post = 1 from 1970 and estimates
One regression over 1959–2009 finds nothing: slope +0.145, \( t = 0.92 \). With the break, the slope before 1970 is −1.357 (\( t = -3.02 \)), a clear trade-off; from 1970 it is \( -1.3571 + 1.4755 = 0.118 \), no trade-off at all. The test of \( \delta_0 = \delta_1 = 0 \) gives \( F = 11.08 \), \( p < 0.001 \). At 5% unemployment, predicted inflation is 2.23% before 1970 and 4.24% after.
Dummies on the left: a preview
If the outcome itself is 0 or 1, OLS gives the linear probability model (LPM): each coefficient is a change in the probability that \( y = 1 \), in percentage points. In the book’s loan data, 100 more points of credit score raise the approval probability by 22.1 points. The LPM is easy to read but can predict probabilities above 1 (155 applicants here) and always needs robust standard errors. Step 14 introduces logit and probit; see also Logit vs Probit.
A treatment dummy marks who received a policy. Its coefficient is a causal effect only if treatment was as good as random. In the book’s minimum-wage data, comparing the two states after the rise gives 1.21 FTE, but they already differed before. Combining a treatment dummy, a period dummy and their interaction gives the difference-in-differences estimate, 2.75, close to the true 2.6. Step 16 develops this; for a full worked example read Difference-in-Differences (DiD) Explained.
Practise: 6 questions
Try each one on paper first, then check the worked answer.
EasyQ1. A regression of hourly pay ($) gives \( \widehat{\text{wage}} = 8.5 + 1.2\,\text{educ} – 2.1\,\text{female} \). Interpret −2.1, and predict the wage of a woman with 12 years of education. Show worked answer
Prediction: \( 8.5 + 1.2(12) – 2.1 = 8.5 + 14.4 – 2.1 = 20.8 \), so $20.80 an hour.
EasyQ2. Quarterly sales are regressed on price and a set of season dummies, with an intercept. How many season dummies should you include, and what does each coefficient measure? Show worked answer
Including all four with the intercept is the dummy-variable trap: the four dummies sum to 1, the same as the intercept column.
Each coefficient is the expected difference in sales between that season and the base season, holding price fixed.
MediumQ3. In a log-wage regression the coefficient on union is 0.22. Give the exact percentage union premium, and the exact percentage by which non-members earn less than comparable members. Show worked answer
Non-members relative to members: \( 100(e^{-0.22}-1) = -19.75\% \).
The two numbers differ because they use different bases. The approximation 22% is too far from either to use.
MediumQ4. \( \widehat{\log(\text{wage})} = 1.2 + 0.09\,\text{educ} + 0.30\,\text{urban} – 0.012\,\text{urban}\times\text{educ} \). Find the urban–rural gap at 10 and at 16 years of education, and the return to education for urban workers. Show worked answer
At 10 years: \( 0.30 – 0.12 = 0.18 \), exactly \( 100(e^{0.18}-1) = 19.7\% \).
At 16 years: \( 0.30 – 0.192 = 0.108 \).
Urban return to education: \( 0.09 – 0.012 = 0.078 \), about 7.8% per year, against 9% for rural workers.
MediumQ5. A regression with \( k = 3 \) regressors is estimated on 300 firms. The pooled SSR is 520; separate regressions for manufacturing and services give SSRs of 240 and 250. Carry out the Chow test at 5% (critical value of \( F_{4,292} \): 2.40). Show worked answer
\( \text{SSR}_1 + \text{SSR}_2 = 490 \).
\( F = \dfrac{(520-490)/4}{490/292} = \dfrac{7.5}{1.678} = 4.47 \).
\( 4.47 > 2.40 \): reject. The two sectors need different equations; the interacted model would show whether the difference is in the intercept, the slopes or both.
ExamQ6. A log-wage model includes \( -0.12\,\text{female} + 0.06\,\text{married} – 0.05\,\text{female}\times\text{married} \), plus education and experience. (a) What is the gender gap among single workers? [1] (b) What is the marriage premium for women? [2] (c) Find the exact percentage wage difference between married women and single men. [2] (d) A student instead includes dummies for all four groups plus an intercept. Explain what goes wrong. [2] Show worked answer
(b) For women: \( 0.06 + (-0.05) = 0.01 \) [M1], a premium of about 1%, against 6% for men. [A1]
(c) Married women vs single men: \( -0.12 + 0.06 – 0.05 = -0.11 \) [M1]; exactly \( 100(e^{-0.11}-1) = -10.4\% \). [A1]
(d) The four group dummies sum to 1 for every worker, the same as the intercept column: perfect collinearity, the dummy-variable trap. [B1] Drop one group (it becomes the base) or drop the intercept. [B1]
Total: 7 marks.
Check yourself
1. A model with an intercept includes a dummy for each of the 12 months. What is wrong?
2. In a model with female, educ and female × educ, the coefficient on female is
3. With \( k = 2 \) regressors and \( n = 500 \), the Chow test has how many restrictions?
Your score: 0 out of 3
The short version
- A dummy equals 1 for one category and 0 otherwise. A single dummy shifts the intercept; its coefficient is the difference from the base group, holding other regressors fixed.
- In a log model use \( 100(e^{\delta}-1) \): the wage gap of −0.1578 is −14.6%.
- \( g \) categories need \( g-1 \) dummies. Changing the base changes coefficients and \( t \) statistics, not fitted values or \( R^2 \); test a categorical variable with a joint \( F \) test.
- Dummy × dummy gives four group intercepts; dummy × continuous gives separate slopes, and the dummy’s own coefficient is the gap at \( x = 0 \).
- The Chow test compares pooled and separate regressions, or tests all interactions jointly. Urban and rural wages differ (\( F = 5.19 \)) in level, not slope.
- Break dummies test structural change: the US Phillips-curve slope was −1.36 before 1970 and 0.12 after.
- Chapter 9 of Econometrics Made Simple covers all of this in full, with code and a full set of exercises with answers.
Studying more than one subject? The Complete Book Bundle includes every Economics, Statistics, Mathematics and Econometrics book we publish.
Further reading on EconTutorials
Related in-depth articles from our blog, and the neighbouring steps:
- Dummy Variables
- Difference-in-Differences (DiD) Explained: Parallel Trends, Regression and a Worked Example
- Logit vs Probit: Which Model, How to Interpret Coefficients and Marginal Effects
- How to Interpret Log Coefficients in Regression: The Four Rules
- Previous step: Step 8: Functional Form: Logs and Quadratics
- Next step: Step 10: Model Specification and Multicollinearity
