📚 Introductory Econometrics with MORISTAT
A Practical Guide to Empirical Analysis
Naguib Lallmahomed · naglal@linux-mauritius.com · 2026-06-14
Chapter 6: Specification Issues and Dummy Variables
🎯 Learning Objectives
Upon completing this chapter, you will be able to:
- Understand and identify omitted variable bias
- Detect and address multicollinearity
- Use logarithmic, quadratic, and interaction terms
- Create and interpret dummy variables
- Use MORISTAT to estimate models with dummy variables
6.1 Omitted Variable Bias
When a relevant variable is omitted from the regression, the estimated coefficients may be biased.
Suppose the true model is:
Y = β₀ + β₁X₁ + β₂X₂ + u
But we estimate:
Y = β₀ + β₁X₁ + v
Then the bias of β̂₁ is:
Bias(β̂₁) = β₂ × Corr(X₁, X₂) × (σX₂ / σX₁)
Key Insight:
- If β₂ > 0 and Corr(X₁, X₂) > 0 → Upward bias
- If β₂ > 0 and Corr(X₁, X₂) < 0 → Downward bias
- If Corr(X₁, X₂) = 0 → No bias
Example: Omitted Ability
True model:
Wage = β₀ + β₁ × Education + β₂ × Ability + u
If Ability is omitted, the estimated β₁ will be biased upward if Ability and Education are positively correlated.
6.2 Multicollinearity
Multicollinearity occurs when independent variables are highly correlated with each other.
Consequences:
- Large standard errors (imprecise estimates)
- Difficulty identifying individual effects
- Coefficients may be unstable
Detection:
- Use
CORR to check correlations
- Use
VIF (Variance Inflation Factor)
Rule of Thumb:
- VIF > 10 → Problematic multicollinearity
- VIF > 5 → Worth investigating
6.3 Functional Form
6.3.1 Logarithmic Models
| Model | Interpretation |
| log(Y) = β₀ + β₁log(X) | Elasticity: 1% change in X → β₁% change in Y |
| log(Y) = β₀ + β₁X | Semi-elasticity: 1 unit X → β₁×100% change in Y |
| Y = β₀ + β₁log(X) | 1% change in X → β₁/100 units change in Y |
6.3.2 Quadratic Terms
Y = β₀ + β₁X + β₂X² + u
- If β₂ > 0 → U-shaped (minimum at X = −β₁/(2β₂))
- If β₂ < 0 → Inverted U (maximum at X = −β₁/(2β₂))
6.3.3 Interaction Terms
Y = β₀ + β₁X₁ + β₂X₂ + β₃(X₁ × X₂) + u
- Effect of X₁ on Y depends on X₂
- ∂Y/∂X₁ = β₁ + β₃X₂
6.4 Dummy Variables
A dummy variable (indicator variable) takes values 0 or 1:
- D = 1 if condition is true
- D = 0 if condition is false
Example: Gender Dummy
Wage = β₀ + β₁ × Education + β₂ × Female + u
- Female = 1 for female, 0 for male
- β₂ = average wage difference between females and males (holding education constant)
- If β₂ < 0, females earn less than males, ceteris paribus
6.4.1 Multiple Categories
For a variable with m categories, use m−1 dummy variables.
| Category | D₁ | D₂ | Interpretation |
| North | 1 | 0 | β₁ = difference (North vs South) |
| South | 0 | 1 | β₂ = difference (South vs South) = baseline |
| East | 0 | 0 | Baseline category |
Dummy Variable Trap:
Never include all m dummy variables – this creates perfect collinearity with the intercept. Always omit one category as the baseline.
6.5 MORISTAT Examples
6.5.1 Creating Dummy Variables
Create a dataset wage_gender.csv with a gender dummy:
Wage,Education,Gender
25,12,0
30,14,1
35,16,0
40,18,1
28,13,0
45,20,1
32,15,0
38,17,1
(Gender = 0 for Male, 1 for Female)
Run regression:
MORISTAT> LOAD wage_gender.csv
MORISTAT> REGRESS Wage ~ Education Gender
6.5.2 Interaction Term
MORISTAT> REGRESS Wage ~ Education Gender Education_Gender
6.6 Practical Exercises
Exercise 6.1: Omitted Variable Bias
You want to study the effect of class size on test scores. You estimate:
TestScore = β₀ + β₁ × ClassSize + u
But you omit TeacherQuality from the model.
- If smaller classes attract better teachers, what is the sign of Corr(ClassSize, TeacherQuality)?
- If TeacherQuality improves test scores (β₂ > 0), what is the sign of the bias?
- Is β̂₁ biased upward or downward?
Solution:
- Corr(ClassSize, TeacherQuality) < 0 (negative)
- β₂ > 0 (positive)
- Bias = β₂ × Corr × (σTeacher/σClass) = negative bias
- β̂₁ is biased downward (underestimates the true effect)
Exercise 6.2: Interpreting Dummy Variables
You estimate the following regression:
Salarŷ = 30,000 + 2,500 × Experience + 5,000 × Female
where Female = 1 if female, 0 if male.
- What is the predicted salary for a male with 10 years of experience?
- What is the predicted salary for a female with 10 years of experience?
- What is the gender wage gap (holding experience constant)?
- Is the coefficient on Female positive or negative? What does this imply?
Solution:
- Male (Female = 0): 30,000 + 2,500×10 = 55,000
- Female (Female = 1): 30,000 + 2,500×10 + 5,000 = 60,000
- Gender gap = 5,000 (females earn more than males)
- Coefficient is positive → females earn more than males, ceteris paribus
Exercise 6.3: Quadratic Model
You estimate the following model:
Wagê = 10 + 2 × Experience − 0.05 × Experience²
- What is the effect of an additional year of experience at Experience = 10?
- At Experience = 20?
- At Experience = 30?
- What is the "peak" experience level (where wage is maximized)?
Hint: ∂Wage/∂Experience = 2 − 0.10 × Experience
Solution:
- At Exp = 10: ∂Wage/∂Exp = 2 − 0.10×10 = 1.00
- At Exp = 20: ∂Wage/∂Exp = 2 − 0.10×20 = 0.00
- At Exp = 30: ∂Wage/∂Exp = 2 − 0.10×30 = -1.00
- Peak: 2 − 0.10×Exp = 0 → Exp = 20 years
Exercise 6.4: Interaction Term
You estimate:
Wagê = 20 + 2 × Education + 3 × Experience + 0.5 × (Education × Experience)
- What is the effect of an additional year of education when Experience = 5?
- When Experience = 10?
- When Experience = 15?
- Interpret the interaction term coefficient.
Solution:
- ∂Wage/∂Education = 2 + 0.5×Experience
- At Exp = 5: 2 + 0.5×5 = 4.5
- At Exp = 10: 2 + 0.5×10 = 7.0
- At Exp = 15: 2 + 0.5×15 = 9.5
- The return to education increases with experience (positive interaction)
Exercise 6.5: Real Data – Wage Discrimination
Using wage_gender.csv, run a regression of Wage on Education and Gender.
- What is the coefficient on Gender?
- Is the coefficient statistically significant?
- What is the estimated gender wage gap?
- What assumptions must hold for this coefficient to measure discrimination?
6.7 Key Terms
Omitted Variable Bias
Multicollinearity
VIF
Logarithmic Model
Quadratic Model
Interaction Term
Dummy Variable
Indicator Variable
Dummy Variable Trap
Baseline Category
6.8 Further Reading
- Wooldridge, J.M. (2020). Introductory Econometrics: A Modern Approach, Chapter 6 (Multiple Regression Analysis: Further Issues)
- Stock, J.H. & Watson, M.W. (2019). Introduction to Econometrics, Chapter 8 (Nonlinear Regression Functions)
- Angrist, J.D. & Pischke, J.S. (2015). Mastering 'Metrics, Chapter 3 (The Regression Discontinuity Design)
6.9 What's Next?
In Chapter 7, we will address:
- Heteroskedasticity – Violation of constant variance
- Serial Correlation – Correlation over time
- Instrumental Variables – When X is endogenous
→ Proceed to Chapter 7 (Coming Soon)
🔄 Ready to connect with MORISTAT?