Course contentsShow
← Data Science
Lesson 1466 of 2,14536. Causal Inference BasicsFree lesson

Two-Stage Least Squares (2SLS) Estimation

Implementing IV estimation by first predicting treatment with the instrument, then using predicted values in outcome regression.

Two-Stage Least Squares (2SLS) Estimation

What you'll learn: How to implement instrumental variable estimation by running two regressions—first predicting treatment using the instrument, then using that prediction to estimate causal effects.

The Core Idea

Two-Stage Least Squares (2SLS) is the workhorse method for implementing instrumental variable estimation. Remember the endogeneity problem where your treatment variable is correlated with unobserved factors? 2SLS solves this by using your instrument to create a "clean" version of the treatment variable that's free from that problematic correlation.

Think of it like filtering dirty water: your original treatment variable is contaminated with endogeneity, but your instrument helps you extract only the "clean" variation.

The Two Stages

Stage 1: Predict treatment from the instrument You regress your treatment variable on the instrument(s). This captures only the part of treatment variation that's driven by the instrument—the exogenous part.

Treatment = β₀ + β₁ × Instrument + error

Save the predicted values (fitted values) from this regression.

Stage 2: Use predicted treatment in outcome regression Replace the actual treatment with the predicted values from Stage 1 in your outcome equation:

Outcome = α₀ + α₁ × Predicted_Treatment + error

The coefficient α₁ is your causal effect estimate, free from endogeneity bias because you've used only the variation in treatment that came from the exogenous instrument.

Why Two Stages?

By filtering treatment through the instrument first, you eliminate the endogenous variation that would bias a naive regression. You keep only the variation that's "as good as random" because it came from the instrument.

Key Takeaway: 2SLS implements IV estimation by first predicting treatment from your instrument, then regressing outcomes on predicted treatment values—isolating only the exogenous variation needed for causal inference.