OLSEndogeneityCausal Inference

Why Do We Need Causal Inference? Three Sources of Endogeneity

An in-depth explanation of the three sources of endogeneity—omitted variable bias (OVB), reverse causality, and measurement error—and when OLS fails. Simulated data are used to intuitively demonstrate the necessity of causal inference.

作者:Econometrics Research Navigation Station发布:2025-03-01★★★

Structure of This Article

This is the first article in the causal inference series, designed to help you build the core intuition of "why causal inference is needed." The article is divided into three parts:

  1. Principles: The three sources of endogeneity and their mathematical expressions
  2. Intuition: Building intuition using the minimum wage and employment example
  3. Code: Stata simulation demonstrating OLS bias

Layer 1: Principles

The Core Problem of Causal Inference

The central goal of empirical research in economics is to answer causal questions: "What is the causal effect of XX on YY?"

Using the Potential Outcomes Framework, the treatment effect for individual ii is:

τi=Yi(1)Yi(0)\tau_i = Y_i(1) - Y_i(0)

where Yi(1)Y_i(1) and Yi(0)Y_i(0) are the potential outcomes for the individual under treatment and no treatment, respectively. The fundamental problem of causal inference is that we can never observe both potential outcomes for the same individual simultaneously.

Three Sources of Endogeneity

When we use OLS to estimate Y=α+βX+εY = \alpha + \beta X + \varepsilon, β^\hat{\beta} being a consistent estimator of β\beta requires Cov(X,ε)=0\text{Cov}(X, \varepsilon) = 0. The endogeneity problem arises when Cov(X,ε)0\text{Cov}(X, \varepsilon) \neq 0, and it has three sources:

1. Omitted Variable Bias (OVB)

If a variable WW that affects both XX and YY is omitted:

plim β^OLS=β+Cov(X,W)Var(X)OVBγ\text{plim } \hat{\beta}_{OLS} = \beta + \underbrace{\frac{\text{Cov}(X, W)}{\text{Var}(X)}}_{\text{OVB}} \cdot \gamma

2. Reverse Causality

YY may in turn affect XX. For example: higher GDP leads to more education investment, rather than education alone raising GDP.

3. Measurement Error

If XX suffers from classical measurement error X=X+uX^* = X + u, then:

plim β^OLS=βσX2σX2+σu2<β\text{plim } \hat{\beta}_{OLS} = \beta \cdot \frac{\sigma_X^2}{\sigma_X^2 + \sigma_u^2} < \beta

This produces attenuation bias.


Layer 2: Intuition

Example: Does Raising the Minimum Wage Reduce Employment?

Suppose you observe that states that raised their minimum wage actually saw employment rates increase. Can you directly conclude that "raising the minimum wage promotes employment"?

No! Because:

  • OVB: Economically booming states are more likely to raise the minimum wage (economic conditions are omitted)
  • Reverse causality: Strong employment conditions → increased political pressure → raise the minimum wage
  • Selection bias: The labor market structures of different states are inherently different

This is precisely the problem that Card and Krueger (1994, AER) addressed using difference-in-differences (DID).


Layer 3: Stata Code

Simulation Demonstration: OLS Bias Under Endogeneity

// ═══════════════════════════════════════════════
// Demonstration: OLS bias in the presence of endogeneity
// ═══════════════════════════════════════════════
 
clear all
set seed 12345
set obs 1000
 
// True DGP
gen ability = rnormal(0, 1)           // Unobservable ability (omitted variable)
gen education = 12 + 2*ability + rnormal(0, 1)  // Education is affected by ability
gen wage = 10 + 3*education + 5*ability + rnormal(0, 2)
// True return to education = 3
 
// OLS regression (omitting ability)
reg wage education, robust
// Coefficient > 3, indicating upward bias!
 
// After adding the control variable
reg wage education ability, robust
// Coefficient ≈ 3, close to the true value

Key Takeaway: When there are omitted variables, the OLS estimator is biased and inconsistent. This is the fundamental reason we need causal inference methods such as DID, IV, and RDD.


Types of Treatment Effects

Abbreviation Full Name Meaning
ATE Average Treatment Effect Average treatment effect across all individuals
ATT Average Treatment Effect on the Treated Average treatment effect for the treatment group
ATU Average Treatment Effect on the Untreated Average treatment effect for the untreated group
LATE Local Average Treatment Effect Treatment effect for marginal individuals (Compliers)
ATE=E[Y(1)Y(0)]\text{ATE} = E[Y(1) - Y(0)] ATT=E[Y(1)Y(0)D=1]\text{ATT} = E[Y(1) - Y(0) \mid D = 1]

When treatment effects are heterogeneous, ATEATTLATE\text{ATE} \neq \text{ATT} \neq \text{LATE}. Understanding which parameter your estimator identifies is a prerequisite for correctly interpreting empirical results.


References

  • Angrist, J. D., & Pischke, J. S. (2009). Mostly Harmless Econometrics. Princeton University Press.
  • Card, D., & Krueger, A. B. (1994). Minimum Wages and Employment: A Case Study of the Fast-Food Industry in New Jersey and Pennsylvania. American Economic Review, 84(4), 772-793. DOI
  • Rubin, D. B. (1974). Estimating Causal Effects of Treatments in Randomized and Nonrandomized Studies. Journal of Educational Psychology, 66(5), 688-701.