Courses › Graduate Econometrics
Instrumental variables and two-stage least squares
Endogeneity and identification, 2SLS in matrix form, overidentification, weak instruments and robust inference, many-instrument bias, and how to argue for an exclusion restriction.
OLS consistently estimates the best linear predictor, but many economic questions are about structural or causal parameters: how much quantity demanded falls when a café raises its price, how much an extra year of school raises earnings. When the regressor of interest is correlated with the structural error, OLS converges to the wrong number. Instrumental variables (IV) use a source of variation in the regressor that is unrelated to the error to recover the parameter.
Statistics and Econometrics introduced IV with one instrument and the Wald ratio. This module treats IV as a GMM estimator in matrix form: identification, two-stage least squares, overidentification tests, and the problems that dominate modern practice, namely weak instruments, many instruments, and the credibility of exclusion restrictions. Module 12 returns to IV when effects differ across people.
By the end of this module you will be able to
- Explain how omitted variables, simultaneity and measurement error make a regressor endogenous.
- State the relevance and exclusion conditions and the rank and order conditions for identification.
- Derive 2SLS in matrix form and compute correct standard errors.
- Diagnose weak instruments with the first-stage F and use weak-instrument-robust inference such as the Anderson–Rubin test.
- Explain many-instrument bias and evaluate arguments for exclusion restrictions.
What this module covers
- Endogeneity
- Instruments and identification
- Two-stage least squares
- Weak instruments
- Many instruments and the credibility of exclusion
- Problem set with step-by-step solutions
- Module quiz
Lesson 8.1 Free lesson
Endogeneity
Write the structural equation y = x′β + u, where β is the parameter we care about and u collects everything else that affects y. A regressor is endogenous if it is correlated with u. Then E[xu] ≠ 0 and OLS converges to β + E[xx′]−1E[xu] ≠ β. Three mechanisms produce endogeneity.
Omitted variables
If ability raises both schooling and earnings and is not measured, it sits in u and is correlated with schooling. Module 1’s omitted-variable formula gives the probability limit of OLS.
Simultaneity
Prices and quantities are set together by supply and demand. Suppose demand for lattes is q = α − βp + ud and supply is q = γ + δp + us. A demand shock ud raises both quantity and price, so p is positively correlated with ud. Regressing q on p traces out neither curve: it mixes the demand slope with the supply slope, weighted by the relative variances of the two shocks.
Measurement error
Suppose the true regressor x* is measured with classical error, x = x* + e with e independent of everything else. Then y = βx* + u = βx + (u − βe), and the composite error is negatively correlated with x. OLS is attenuated toward zero:
Worked example: Self-reported hours
Weekly hours of piano practice x* raise exam scores by β = 2 points per hour. Hours are self-reported with error: Var(x*) = 4 and Var(e) = 1.
Reliability ratio λ = 4/(4 + 1) = 0.8, so OLS converges to 0.8 × 2 = 1.6. More data do not help: the bias is in the probability limit.
Adding controls that are correlated with x* but not with e makes things worse: they absorb some of the true signal, and the share of what is left that is noise rises.
Key ideas
- Endogeneity means E[xu] ≠ 0 for the structural error, making OLS inconsistent for β.
- Sources: omitted variables, simultaneity and measurement error.
- Classical measurement error in x attenuates OLS by the reliability ratio σx*2/(σx*2 + σe2).
Practice questions: Instrumental variables and two-stage least squares
Try these, then open each answer to check your work.
- 1.Classical measurement error in a regressor with reliability ratio 0.75 and true slope 2 makes OLS converge to
- 0.5
- 1.5
- 2
- 2.67
Show answer
Answer: B. Attenuation: 0.75 × 2 = 1.5.
- 2.Which condition for a valid instrument can be checked in the data?
- Exclusion from the structural equation
- Zero correlation with the structural error
- Monotonicity
- Relevance: correlation with the endogenous regressor
Show answer
Answer: D. Relevance shows up in the first stage; exclusion is an untestable assumption when there is one instrument per regressor.
- 3.Winning a lottery raises program enrolment by 0.4 and annual earnings by $800. What is the IV estimate of the effect of enrolment on earnings?
- $320
- $800
- $1,200
- $2,000
Show answer
Answer: D. Reduced form ÷ first stage = 800/0.4 = $2,000.
Problems with step-by-step solutions
- 4.A regressor is measured with error: Var(x*) = 9, Var(e) = 3, true β = 1.2. What does OLS converge to?
Show step-by-step solution
- Reliability ratio 9/(9 + 3) = 0.75.
- plim β̂ = 0.75 × 1.2 = 0.9.
- 5.Demand q = 10 − p + ud, supply q = 2 + p + us, with independent shocks of variances σd2 and σs2. Solve for equilibrium p and find the probability limit of the OLS slope of q on p.
Show step-by-step solution
- Equating: 10 − p + ud = 2 + p + us ⇒ p = 4 + (ud − us)/2 and q = 6 + (ud + us)/2.
- Cov(q, p) = (σd2 − σs2)/4 and Var(p) = (σd2 + σs2)/4.
- OLS slope → (σd2 − σs2)/(σd2 + σs2): −1 (demand) only if σd = 0, +1 (supply) only if σs = 0, and 0 with equal variances.
Get the full module
The complete module adds every lesson, interactive graphs, a full problem set with step-by-step solutions, and a quiz. The academy opens in January 2027: join the waitlist for the founding price (lifetime access for $179).
Join the waitlist Try a full module free
More practice: free practice questions for this course.