📚 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:

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:

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:

Detection:

Rule of Thumb:

6.3 Functional Form

6.3.1 Logarithmic Models

ModelInterpretation
log(Y) = β₀ + β₁log(X)Elasticity: 1% change in X → β₁% change in Y
log(Y) = β₀ + β₁XSemi-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

6.3.3 Interaction Terms

Y = β₀ + β₁X₁ + β₂X₂ + β₃(X₁ × X₂) + u

6.4 Dummy Variables

A dummy variable (indicator variable) takes values 0 or 1:

Example: Gender Dummy

Wage = β₀ + β₁ × Education + β₂ × Female + u

6.4.1 Multiple Categories

For a variable with m categories, use m−1 dummy variables.

CategoryD₁D₂Interpretation
North10β₁ = difference (North vs South)
South01β₂ = difference (South vs South) = baseline
East00Baseline 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.

  1. If smaller classes attract better teachers, what is the sign of Corr(ClassSize, TeacherQuality)?
  2. If TeacherQuality improves test scores (β₂ > 0), what is the sign of the bias?
  3. Is β̂₁ biased upward or downward?

Solution:

  • Corr(ClassSize, TeacherQuality) < 0 (negative)
  • β₂ > 0 (positive)
  • Bias = β₂ × Corr × (σTeacherClass) = 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.

  1. What is the predicted salary for a male with 10 years of experience?
  2. What is the predicted salary for a female with 10 years of experience?
  3. What is the gender wage gap (holding experience constant)?
  4. 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²
  1. What is the effect of an additional year of experience at Experience = 10?
  2. At Experience = 20?
  3. At Experience = 30?
  4. 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)
  1. What is the effect of an additional year of education when Experience = 5?
  2. When Experience = 10?
  3. When Experience = 15?
  4. 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.

  1. What is the coefficient on Gender?
  2. Is the coefficient statistically significant?
  3. What is the estimated gender wage gap?
  4. 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

6.9 What's Next?

In Chapter 7, we will address:

→ Proceed to Chapter 7 (Coming Soon)

🔄 Ready to connect with MORISTAT?