ECON 104 · Lecture 12 · Fall 2026

Instrumental Variables: Identification, Specification Tests, and Simultaneous Equations

Jake Anderson
Guest lecture · UCLA

Plan for Today

1

IV Idea

2

In Practice

3

2SLS

4

Tests

5

Simultaneity

IV idea · A question about this class

Does Coming to Lecture Raise Your Grade?

$\underbrace{Y_i}_{\mathclap{\text{final grade}}} = \beta_0 + \beta_1 \underbrace{X_i}_{\mathclap{\text{lectures attended}}} + \varepsilon_i$
One quarter of this class: 100 students and 20 lectures. Each figure is one student, stacked by the number of lectures the student attended.
The regressionRegress each student’s final grade (out of 100) on the number of lectures attended.
My claim$\hat\beta_1$ is the causal effect of attending one more lecture on the final grade.
IV idea · A question about this class

My Claim

$\underbrace{Y_i}_{\mathclap{\text{final grade}}} = \beta_0 + \beta_1 \underbrace{X_i}_{\mathclap{\text{lectures attended}}} + \varepsilon_i$
$\hat\beta_1$ is the causal effect of attending one more lecture on the final grade.
Is it causal?
Tell me a story that disproves my claim.
IV idea · A story

A Story: Teaching at Athlete University

$\underbrace{Y_i}_{\mathclap{\text{final grade}}} = \beta_0 + \beta_1 \underbrace{X_i}_{\mathclap{\text{lectures attended}}} + \varepsilon_i$
Every student is on one of two teams.
Team APractice is at lecture time.
$\implies$ Never comes.
Team BThe coach requires lecture and studying.
$\implies$ Always comes.
The regressionOLS slope: 1.0 point per lecture.
MIXED$\hat\beta_1$ captures both the effect of lectures and the differences between the two teams.
IV idea · A more realistic picture

Who Comes to Lecture?

$\underbrace{Y_i}_{\mathclap{\text{final grade}}} = \beta_0 + \beta_1 \underbrace{X_i}_{\mathclap{\text{lectures attended}}} + \varepsilon_i$
Never comeSome expect to fail. Others are excellent and do not need to come.
Always comeSome struggle and need the help. Others are excellent.
Fair-weather attendersEveryone else: they come when it is easy and skip when it is not.
Attendance depends on ability and motivation, which are in $\varepsilon_i$. So $\operatorname{cov}(X_i, \varepsilon_i) \neq 0$ and OLS is biased. $\implies$ We need a reason to miss lecture that has nothing to do with the student.
IV idea · Where students come from

Seattle and Los Angeles: Who Is Moved by Rain?

$\underbrace{Y_i}_{\mathclap{\text{final grade}}} = \beta_0 + \beta_1 \underbrace{X_i}_{\mathclap{\text{lectures attended}}} + \varepsilon_i$
Half the class is from Seattle and half from Los Angeles. Both cities send the same mix of ability.
Never takersDo not come, whatever the weather.
Always takersCome, whatever the weather.
Everyone elseSeattle students (blue) own umbrellas. LA students (orange) do not.
Where you are from changes attendance in the rain. It does not change ability.
IV idea · Where students come from

Everyone Else: How Much Rain Keeps You Home?

Rain tolerance is unrelated to academic ability: same mix of high and low performers.
IV idea · Rain as an instrument

An Instrument Needs Two Conditions

Relevance
The instrument does change the treatment. Rain actually affects who comes to class and who doesn’t.
Exogeneity
The instrument affects grades only through $X$. It can’t also be connected directly to $Y$.
IV idea · Condition 1

Relevance

$\overbrace{Y_i}^{\mathclap{\text{final grade}}} = \beta_0 + \beta_1 \overbrace{X_i}^{\mathclap{\text{lectures attended}}} + \varepsilon_i$
relevance
$Z_i$Rain
  • The instrument (rain) changes the treatment (class attendance).
  • $\operatorname{Cov}(Z_i, X_i) \neq 0$
IV idea · Condition 2

Exogeneity

$\overbrace{Y_i}^{\mathclap{\text{final grade}}} = \beta_0 + \beta_1 \overbrace{X_i}^{\mathclap{\text{lectures attended}}} + \varepsilon_i$
$Z_i$Rain
  • The instrument (rain) affects grades only through attendance.
    Threat: rain keeps students indoors, so they study more at home.
  • $\operatorname{Cov}(Z_i, \varepsilon_i) = 0$
    Threat: determination in the rain may go with determination in class and academics.
IV idea · The idea

2SLS: Keep Only the Exogenous Part of $X$

$Y_i = \beta_0 + \beta_1 X_i + \varepsilon_i$
Split X
$X_i = \overbrace{\textcolor{#2e7d32}{X_i^{\text{exog}}}}^{\mathclap{\text{moved by rain}}} \hspace{0.5in} + \hspace{0.5in} \overbrace{\textcolor{#D96C00}{X_i^{\text{endog}}}}^{\mathclap{\text{sorting: ability, motivation}}}$
First stage
$X_i = \pi_0 + \pi_1 Z_i + v_i \quad\Longrightarrow\quad \overbrace{\textcolor{#2e7d32}{\hat X_i}}^{\mathclap{\text{exogenous part of } X}} = \hat\pi_0 + \hat\pi_1 Z_i$
Second stage
$Y_i = \beta_0 + \beta_1 \overbrace{\textcolor{#2e7d32}{\hat X_i}}^{\mathclap{\text{no sorting}}} + \varepsilon_i$
Our conclusion is only valid for “compliers”: people who are influenced by the rain.
Always takers and never takers do not provide any variation.
IV idea · First stage

First Stage: Does Rain Change Attendance?

$X_i = \pi_0 + \pi_1 Z_i + v_i$
$X_i$ = lectures attended  ·  $Z_i = 1$ in the rainy winter, $0$ in the dry winter
EstimateStd. errort
Intercept
Rainy winter, $Z_i$
$N$ =  ·  $R^2$ =  ·  $F$ =
  • $\hat\pi_1 = -2.0$: rain lowers attendance by 2.0 lectures.
  • $F$ is above 10: rain is a strong instrument.
IV idea · Reduced form

Reduced Form: Does Rain Change Grades?

$Y_i = \gamma_0 + \gamma_1 Z_i + u_i$
$Y_i$ = final grade  ·  $Z_i = 1$ in the rainy winter, $0$ in the dry winter
EstimateStd. errort
Intercept
Rainy winter, $Z_i$
$N$ =  ·  $R^2$ =
  • $\hat\gamma_1 = -1.0$: grades are 1.0 point lower in the rainy winter.
  • This is the effect of rain on grades, with no attendance in the regression.
IV idea · OLS

OLS: Grade on Attendance

$Y_i = \beta_0 + \beta_1 X_i + \varepsilon_i$
EstimateStd. errort
Intercept
Lectures attended, $X_i$
$N$ =  ·  $R^2$ =
  • OLS: one more lecture goes with more points.
  • But ability and motivation are in $\varepsilon_i$, so this slope is biased.
  • This model is trained on data that includes people who will never change their attendance, so it is picking up groups that have inherent differences.
IV idea · The IV estimate

The IV Estimate: A Ratio

First stage
Rainy winter: attendance 2.0 lectures lower.
Reduced form
Rainy winter: grades 1.0 point lower.
Ratio
$\hat\beta_{IV} = \dfrac{-1.0}{-2.0} = \mathbf{0.5}$ points per lecture
IV VS. OLSOLS gives 1.7. Too large: it also picks up ability and motivation.
IV idea · OLS vs. IV

OLS and IV on the Same Data

IV uses less variation.
$\implies$ Wider interval.
Instruments in practice · Instrument 1: held or released?

Immigration Courts: Does Release Change the Outcome?

$\overbrace{Y_i}^{\mathclap{\text{deported}}} = \beta_0 + \beta_1 \overbrace{X_i}^{\mathclap{\text{released}}} + \varepsilon_i$
Setting
After a bond hearing, a judge either releases the person on bond or keeps the person in detention.
Treatment
$X_i = 1$ if released. $X_i = 0$ if held in detention.
Outcome
$Y_i = 1$ if deported.
$\hat\beta_1$ is the causal effect of release on being deported.
Is it causal?
Instruments in practice · Instrument 1: held or released?

Released vs. Held: The Groups Differ

$\overbrace{Y_i}^{\mathclap{\text{deported}}} = \beta_0 + \beta_1 \overbrace{X_i}^{\mathclap{\text{released}}} + \varepsilon_i$
EOIR case data, first bond hearings 2010 to 2026, within the same location and week. Released: released within 30 days of the hearing. 95% intervals are narrower than the dots.
The groups are different $\implies$ a naive comparison mixes release with who gets released.
The ideal comparisonTwo people alike in every way except chance: one released, one held.
Instruments in practice · Instrument 1: the naive regression

The Naive Regression: Release Has Two Parts

$Y_i = \beta_0 + \beta_1 X_i + \varepsilon_i$
$Y_i = 1$ if person $i$ is deported. $X_i = 1$ if person $i$ is released.
The problemUnseen things, like a strong case or family ties, make release more likely and also change deportation. They sit in $\varepsilon_i$, so $\operatorname{cov}(X_i, \varepsilon_i) \neq 0$ and OLS is biased.
THE IDEAKeep only $X_{i,\text{exog}}$. $\implies$ We need something that moves release by chance.
Instruments in practice · Instrument 1: the “ideal” experiment

The “Ideal” Experiment: Release by Coin Flip

Flip a coin for each person, whatever their case. Heads: released. Tails: detained.
AssignmentChance alone sorts people into two groups: a randomized controlled trial (RCT).
Same mixBoth groups have the same share with a criminal record (gold): 16%.
This is a perfect instrument. It is mechanically random.
Thought experiment: the dots illustrate the design and are not data.
Question: Any problems with running this experiment?
Instruments in practice · Instrument 1: the “ideal” experiment

Release by Coin Flip: Not Feasible

It is not ethical

Detention takes away a person’s freedom. We cannot detain people for no reason just to run an experiment.

Releasing at random is dangerous

Some people could harm others if released. Detaining them prevents that harm while they are held (incapacitation). A coin would release some of them.

Detaining at random is harmful

Many people should not be detained at all. A coin would detain about half of them.

The alternativeSomething the court already does that works like the coin: it changes who is released, and it has nothing to do with the person.
Instruments in practice · Instrument 1: from a coin to a judge

Put a Judge over Each Door

A judge over each doorReplace the coin with a judge. Cases go to judges by the court’s schedule, not by choice, so the judge works like the coin.
Extreme judgesIf the lenient judge released everyone and the strict judge detained everyone, this would be the coin experiment.
Real judgesNo judge is that lenient or that strict. In one court, they release 75% and 21%.
Which judge you get changes your chance of release: here by 54 percentage points instead of 100.
Release rates: Port Isabel, TX, 2011.
Instruments in practice · Instrument 1: judge assignment

Random Assignment: Who Hears Your Case?

AssignmentEach person is assigned to one of five judges by docket, not by choice.
Judges get similar casesEvery room has the same mix: the same share with a criminal record (gold).
Some judges release moreJudges differ: the strict judge releases 21%, the lenient judge 75% (blue ring: released).
Two alike peoplePerson A gets the strict judge and stays in custody. Person B gets the lenient judge and is released. Chance made the difference.
Release rates are real (Port Isabel, TX, 2011). The dots are illustrative.
Instruments in practice · Instrument 1: judge assignment

The Judge as an Instrument: Two Conditions

Release is not random, but the judge is. The judge's release rate is the instrument $z$.
✓
Relevance

Some judges release more than others.

✓
Exogeneity

Judges get similar cases. The judge affects deportation only through release.

PASSES EXOGENEITYThe balance checks pass.
Instruments in practice · Instrument 1: first stage

First Stage: Does the Judge Change Release?

$\overbrace{X_i}^{\mathclap{\text{released}}} = \pi_0 + \pi_1 \overbrace{Z_i}^{\mathclap{\text{judge release rate}}} + v_i$
$X_i = 1$ if released  ·  $Z_i$ = assigned judge’s release rate, relative to the court-week average
EstimateStd. errort
Judge release rate, $Z_i$
$N$ =  ·  $F$ =
  • $\hat\pi_1 = 0.77$: a judge who releases 10 points more often raises your chance of release by 7.7 points.
  • $F$ is far above 10: the judge is a strong instrument.
Instruments in practice · Instrument 1: reduced form

Reduced Form: Does the Judge Change Deportation?

$\overbrace{Y_i}^{\mathclap{\text{deported}}} = \gamma_0 + \gamma_1 \overbrace{Z_i}^{\mathclap{\text{judge release rate}}} + u_i$
$Y_i = 1$ if deported within 8 years  ·  $Z_i$ = assigned judge’s release rate
EstimateStd. errort
Judge release rate, $Z_i$
$N$ =
  • $\hat\gamma_1 = -0.15$: a judge who releases 10 points more often lowers your chance of being deported by 1.5 points.
  • This is the effect of the judge on deportation, with release not in the regression.
Instruments in practice · Instrument 1: judge assignment

The IV Estimate: A Ratio

First stage
A higher judge release rate raises release: 0.77.
Reduced form
A higher judge release rate lowers deportations: $-0.15$.
Ratio
$\hat\beta_{IV} = \dfrac{\text{reduced form}}{\text{first stage}} = \dfrac{\hat\gamma_1}{\hat\pi_1}$
$\nearrow$$Y_i = \gamma_0 + \textcolor{#2774AE}{\gamma_1} Z_i + u_i$
$\searrow$$X_i = \pi_0 + \textcolor{#2774AE}{\pi_1} Z_i + v_i$
Plug in
$\hat\beta_{IV} = \dfrac{-0.149}{0.772} = \mathbf{-0.19}$
ANSWERRelease lowers the chance of being deported by 19 points after 8 years (95% interval: $-22$ to $-16$). Held people in this group are deported 56% of the time.
Instruments in practice · Instrument 1: judge assignment

IV vs. the Naive Comparison

$\overbrace{Y_i}^{\mathclap{\text{deported}}} = \beta_0 + \beta_1 \overbrace{X_i}^{\mathclap{\text{released}}} + \varepsilon_i$
OLS
Released vs. held, no instrument: $-0.23$ (std. error 0.002).
IV
Judge as instrument: $-0.19$, 95% interval $[-0.22, -0.16]$.
IV VS. OLS$\implies$ The raw gap overstates the effect of release: it also reflects who gets released. The IV compares people the judge assignment treats alike.
Instruments in practice · Instrument 1: judge assignment

2SLS: The Two Stages with the Judge

$\overbrace{Y_i}^{\mathclap{\text{deported}}} = \beta_0 + \beta_1 \overbrace{X_i}^{\mathclap{\text{released}}} + \varepsilon_i$
First stage
$X_i = \pi_0 + \pi_1 \overbrace{Z_i}^{\mathclap{\text{judge release rate}}} + v_i \quad\Longrightarrow\quad \overbrace{\textcolor{#2e7d32}{\hat X_i}}^{\mathclap{\text{release predicted by the judge}}} = \hat\pi_0 + \underbrace{0.772}_{\hat\pi_1} Z_i$
Second stage
$Y_i = \beta_0 + \beta_1 \overbrace{\textcolor{#2e7d32}{\hat X_i}}^{\mathclap{\text{no sorting on the case}}} + \varepsilon_i \quad\Longrightarrow\quad \hat\beta_1 = \mathbf{-0.19}$
One instrument: the second-stage slope equals the ratio. $\hat\beta_{2SLS} = \dfrac{-0.149}{0.772} = -0.19$
Instruments in practice · Instrument 2: lottery

Admission Lottery: Does the Charter School Work?

$\overbrace{\text{score}_i}^{\mathclap{\text{outcome}}} = \beta_0 + \beta_1 \overbrace{\text{charter}_i}^{\mathclap{\text{treatment}}} + \varepsilon_i$
Meaning
$\beta_1$: effect of attending the charter on test scores.
Instrument
$Z_i$ = won the admission lottery.
Relevance
Winners attend the charter far more often than losers.
Exogeneity
Passes: names are drawn at random, so $Z_i$ is unrelated to family motivation.
Naive (OLS): attendees are motivated families, so OLS mixes motivation with the school effect.
IV: about 0.4 standard deviations in math and 0.2 in reading per year of attendance.
Instruments in practice · Instrument 3: draft lottery

Vietnam Draft Lottery: Does Service Change Earnings?

$\overbrace{\text{earnings}_i}^{\mathclap{\text{outcome}}} = \beta_0 + \beta_1 \overbrace{\text{served}_i}^{\mathclap{\text{treatment}}} + \varepsilon_i$
Meaning
$\beta_1$: effect of military service on later earnings.
Instrument
$Z_i$ = low draft number (called up).
Relevance
Low numbers served more often, but the gap is far from 100%.
Exogeneity
Partly: numbers were random, but men may stay in school to avoid the draft.
Naive (OLS): veterans differ from non-veterans in health, ability, and family.
IV: in the early 1980s, white veterans earned about 15% less than comparable non-veterans.
Instruments in practice · Instrument 4: quarter of birth

Quarter of Birth: Returns to Schooling

$\overbrace{\text{earnings}_i}^{\mathclap{\text{outcome}}} = \beta_0 + \beta_1 \overbrace{\text{schooling}_i}^{\mathclap{\text{treatment}}} + \varepsilon_i$
Meaning
$\beta_1$: return to one more year of schooling.
Instrument
$Z_i$ = born early in the year.
Relevance
Weak: early births get about a tenth of a year less schooling.
Exogeneity
Mostly: birth date looks unrelated to ability, but small differences in health and family appear by season.
Naive (OLS): more able people get more schooling, so OLS may overstate the return.
IV: close to the OLS return, so little sign of ability bias.
Instruments in practice · Instrument 5: distance to college

Distance to College: Returns to Schooling

$\overbrace{\text{wage}_i}^{\mathclap{\text{outcome}}} = \beta_0 + \beta_1 \overbrace{\text{schooling}_i}^{\mathclap{\text{treatment}}} + \varepsilon_i$
Meaning
$\beta_1$: return to one more year of schooling.
Instrument
$Z_i$ = grew up near a college.
Relevance
Students near a college attend more often.
Exogeneity
Caveats: families choose where to live. Needs controls for region, race, and parents' education.
Naive (OLS): 0.074 per year of schooling (standard error 0.004).
IV: 0.132 (standard error 0.049): larger than OLS, and far less precise.
Instruments in practice · Summary

Five Instruments, From Fewest to Most Problems

InstrumentTreatmentRelevanceExogeneityMain issue
Admission lotteryCharter school✓✓Noncompliance
Draft lotteryMilitary service✓~Avoiding the draft by staying in school
Random judgeRelease✓~Judge also hears the full case
Quarter of birthSchooling~~Weak first stage
Distance to collegeSchooling✓~Families choose where to live
Relevance is checked in the data. Exogeneity needs an argument: the more marks of ~, the more argument the instrument needs.
2SLS · The question

Returns to Education: The Question and the OLS Estimate

$\overbrace{\ln(\text{wage}_i)}^{\mathclap{\text{wage}}} = \beta_1 + \beta_2 \overbrace{\text{educ}_i}^{\mathclap{\text{years of school}}} + \beta_3\,\text{exper}_i + \beta_4\,\text{exper}_i^2 + e_i$
How much does one more year of school raise wages?
OLS: $b_2 = 0.1075$   (s.e. $0.0141$, $N = 428$)
$\implies$ one more year of school, wages about 10.8% higher
Wage data: 428 married women in the labor force in 1975 (from the textbook).
Concern: ability, motivation, and family background are in $e_i$. They raise schooling and wages, so part of the 10.8% may not come from schooling.
$\implies$ We need an instrument for education.
2SLS · Two instruments

IV with Two Instruments: 2SLS Uses Both

OLS0.108, interval 0.08 to 0.14. Narrow, but biased upward by ability.
One instrument at a timemothereduc alone: 0.049. fathereduc alone: 0.070. Each throws away the other instrument ⇒ wide intervals.
2SLS: use both at onceStage 1 combines both instruments into one prediction of educ. Result: 0.061, the narrowest IV interval (std. error 0.031 vs. 0.037 and 0.034).
$\implies$ 2SLS gives one estimate that is more precise than either instrument alone. It is still less precise than OLS: the price of removing the bias.
2SLS · Stage 1

Two-Stage Least Squares: Stage 1

Regress
the endogenous variable on all exogenous variables
$\text{educ}_i = \gamma_1 + \gamma_2\,\text{exper}_i + \gamma_3\,\text{exper}_i^2 + \theta_1\,\text{mothereduc}_i + \theta_2\,\text{fathereduc}_i + v_i$
Stage 1, $N = 428$EstimateStd. error
mothereduc0.15760.0359
fathereduc0.18950.0338
Joint test $\theta_1 = \theta_2 = 0$: $F = 55.40$
  • $\hat\theta_1 = 0.158$: one more year of her mother’s schooling $\implies$ 0.16 more years of her own.
  • $\hat\theta_2 = 0.190$: one more year of her father’s schooling $\implies$ 0.19 more years of her own.
  • $F = 55.40 > 10$ $\implies$ the instruments strongly predict educ: relevant, not weak.
2SLS · Stage 2

Two-Stage Least Squares: Stage 2

$\widehat{\text{educ}}_i = \hat\gamma_1 + \hat\gamma_2\,\text{exper}_i + \hat\gamma_3\,\text{exper}_i^2 + \hat\theta_1\,\text{mothereduc}_i + \hat\theta_2\,\text{fathereduc}_i$
Save
the fitted values $\widehat{\text{educ}}_i$: the education we predict from the parents’ education and experience. It contains no ability, if the instruments are valid.
Stage 2
regress the outcome on $\widehat{\text{educ}}_i$ in place of $\text{educ}_i$, with the same exogenous variables
$\ln(\text{wage}_i) = \beta_1 + \beta_2\,\widehat{\text{educ}}_i + \beta_3\,\text{exper}_i + \beta_4\,\text{exper}_i^2 + e_i$
Result
$\hat\beta_2 = 0.0614$ $\implies$ one more year of education raises wages by about 6.1%, compared with 10.8% from OLS.
2SLS · Standard errors

Standard Errors: Use an IV Command

Estimate of $\beta_2$CoefficientStd. error
Stage 2 run by hand with lm()0.06140.0330
IV command, ivreg()0.06140.0313
Different residualsRun by hand, stage 2 computes the residuals with $\widehat{\text{educ}}_i$. The correct residuals use the actual $\text{educ}_i$: $\hat e_i = \ln(\text{wage}_i) - \hat\beta_1 - \hat\beta_2\,\text{educ}_i - \dots$
library(AER)
ivreg(log(wage) ~ educ + exper + I(exper^2) |
        mothereduc + fathereduc + exper + I(exper^2),
      data = mroz)
$\implies$ Same coefficient, wrong standard error: always use an IV command for inference.
2SLS · Standard errors

Standard Errors: A Weaker First Stage Widens the Interval

First stage0.268
F-statistic55.4
IV std. error0.0313
IV 95% CI[0.00, 0.12]
WeakStrong
$\text{se}(\hat\beta_{IV}) = \overbrace{\dfrac{\sigma}{\sqrt{n}\,\text{sd}(Z)}}^{\text{reduced-form noise}} \times \overbrace{\dfrac{1}{|\pi|}}^{\text{first stage}}$
$F \approx \left(\dfrac{\pi}{\text{se}(\pi)}\right)^2, \quad \text{se}(\pi) = \dfrac{\sigma_v}{\sqrt{n}\,\text{sd}(Z)}$
$\implies$ As $\pi \to 0$, the standard error blows up and the interval becomes useless.
2SLS · Relevance

Weak Instruments: The First-Stage F

Weak instrument$z$ moves $x$ only a little ($\pi$ near 0). Standard errors blow up, and the 2SLS estimate tends toward the OLS estimate.
First stage
$\text{educ}_i = \gamma_1 + \gamma_2\,\text{exper}_i + \gamma_3\,\text{exper}_i^2 + \overbrace{\theta_1\,\text{mothereduc}_i + \theta_2\,\text{fathereduc}_i}^{\text{excluded instruments}} + v_i$
The F-test
$H_0: \theta_1 = \theta_2 = 0$
Joint test that every instrument coefficient is zero. Rejecting says some instrument is relevant, not that the set is strong.
RULE OF THUMB$F > 10$ (Staiger and Stock 1997; Stock and Yogo 2005)
One endogenous regressorThis F test is valid with one endogenous regressor. With several, software handles it differently.
2SLS · Relevance

Weak Instruments: The F-Statistic in the Wage Data

Unrestricted
$\text{educ}_i = \gamma_1 + \gamma_2\,\text{exper}_i + \gamma_3\,\text{exper}_i^2 + \theta_1\,\text{mothereduc}_i + \theta_2\,\text{fathereduc}_i + v_i$
Restricted
$\text{educ}_i = \gamma_1 + \gamma_2\,\text{exper}_i + \gamma_3\,\text{exper}_i^2 + v_i \qquad (\theta_1 = \theta_2 = 0)$
$F = \dfrac{(SSE_R - SSE_U)\,/\,q}{SSE_U\,/\,(n - p)}$ ($q = 2$ instruments, $n = 428$, $p = 5$ in the unrestricted model)
$F = \dfrac{(2219.22 - 1758.58)\,/\,2}{1758.58\,/\,(428 - 5)} = 55.40$
STRONG$F = 55.40 > 10$: the two instruments are jointly relevant.
F > 10 is a minimum barmothereduc alone: $F = 73.95$. Stock and Yogo (2005) set a stricter bar, 16.38 for one instrument.
Identification

Identification: Good, Bad, and Lucky Variables

We can estimate the coefficients only if there are enough instruments for the endogenous regressors.
$y = \overbrace{\beta_1 + \dots + \beta_G x_G}^{G \text{ exogenous: Good}} + \overbrace{\beta_{G+1} x_{G+1} + \dots + \beta_K x_K}^{B \text{ endogenous: Bad}} + e$
$G$: Good
Exogenous regressors. They serve as their own instruments. Wage data: intercept, exper, exper$^2$ $\implies G = 3$.
$B$: Bad
Endogenous regressors. Each needs an instrument. Wage data: educ $\implies B = 1$.
$L$: Lucky
Instruments: outside the model, correlated with the Bad variables. Wage data: mothereduc, fathereduc $\implies L = 2$. Lucky because good instruments are hard to find.
Identification

Identification: Under, Exactly, and Over Identified

Under
$L < B$
Too few instruments to estimate $\beta_{G+1}, \dots, \beta_K$. You need more instruments.
Exactly
$L = B$
Just enough instruments. Wage data with mothereduc only: $L = 1 = B$.
Over
$L > B$
More instruments than needed. Wage data with both parents: $L = 2 > B = 1$.
$\implies$ Necessary condition: $L \geq B$, at least one instrument per endogenous regressor. The instruments must also be relevant: a count alone is not enough.
Specification tests

Specification Tests: Two Questions

HausmanIs $x$ endogenous?

$H_0: \operatorname{cov}(x_i, e_i) = 0$ $\implies$ OLS is fine, and more precise than IV.

SarganAre the extra instruments valid?

Needs more instruments than endogenous variables, $L > B$.

Wage data: is education endogenous, and are mothereduc and fathereduc valid?
Specification tests · Hausman

Hausman Test: The Education Example

Data: 428 married women in the labor force in 1975 (from the textbook).
Returns to education
$\ln(\text{wage}_i) = \beta_1 + \beta_2\,\overbrace{\text{educ}_i}^{\mathclap{\text{endogenous?}}} + \beta_3\,\text{exper}_i + \beta_4\,\text{exper}_i^2 + e_i$
The worryAbility is in $e_i$ and raises both education and wages $\implies$ $\operatorname{cov}(\text{educ}_i, e_i) > 0$.
The instrumentsmothereduc and fathereduc.
Question: is education really endogenous, so that we need IV?
Specification tests · Hausman

Hausman Test, Step 1: The First Stage

Regress educ on the exogenous variables and the instruments
$\text{educ}_i = \gamma_1 + \gamma_2\,\text{exper}_i + \gamma_3\,\text{exper}_i^2 + \theta_1\,\text{mothereduc}_i + \theta_2\,\text{fathereduc}_i + v_i$
Save the residual
$\hat v_i = \text{educ}_i - \widehat{\text{educ}}_i$
$\hat v_i$ is the part of education that the instruments and experience do not explain.
With several endogenous variables, run one first stage for each and save each residual.
Specification tests · Hausman

Hausman Test, Step 2: Add $\hat v$ to the Wage Equation

Step 1: first stage
$\text{educ}_i = \gamma_1 + \gamma_2\,\text{exper}_i + \gamma_3\,\text{exper}_i^2 + \theta_1\,\text{mothereduc}_i + \theta_2\,\text{fathereduc}_i + v_i$
save the residual $\hat v_i$
Step 2: wage equation plus $\hat v$
$\ln(\text{wage}_i) = \beta_1 + \beta_2\,\text{educ}_i + \beta_3\,\text{exper}_i + \beta_4\,\text{exper}_i^2 + \delta\,\overbrace{\hat v_i}^{\mathclap{\text{from step 1}}} + e_i$
Re-estimate by OLS. The coefficient we look at is $\delta$.
$\hat v$ is the part of education unrelated to the instruments. If it still predicts wages, it carries the correlation with $e_i$.
If $\delta$ is significant $\implies$ educ is endogenous: use IV (2SLS).
If $\delta$ is not significant $\implies$ no evidence that educ is endogenous: use OLS, which is more precise.
Specification tests · Hausman

Hausman Test, Step 3: A t-Test on $\hat v$

Hypotheses
$H_0: \delta = 0 \iff \text{educ is exogenous}$
$H_1: \delta \neq 0 \iff \text{educ is endogenous}$
REJECT $H_0$Education is endogenous $\implies$ use IV.
FAIL TO REJECTNo evidence of endogeneity $\implies$ use OLS, which is more precise.
If several variables are tested, use an F-test on all the residual coefficients.
Specification tests · Hausman

Hausman Test: Is Education Endogenous?

Step 2 regressionEstimateStd. errortp
educ0.06140.03101.980.048
$\hat v$0.05820.03481.670.095
also exper, exper$^2$, intercept; $N = 428$
REJECT AT 10%$p = 0.095 < 0.10$: some evidence that education is endogenous, though not at 5%.
DecisionWeak evidence, but enough concern to use IV. The first-stage F of 55.4 says the instruments are strong.
Specification tests · Sargan

Sargan Test: Requires Extra Instruments

Endogenous variables: $B = 1$educ
Instruments: $L = 2$mothereduc and fathereduc
Each instrument alonegives its own estimate of the return to education
If both are validthe two estimates should agree
$\implies$ With $L = B$ there is one estimate and nothing to compare. The test needs $L > B$.
Specification tests · Sargan

Sargan Test: The Idea

mothereduc alone0.049
fathereduc alone0.070
Gap: 0.021Is that more than sampling error?
$\implies$ The Sargan test answers this.
Specification tests · Sargan

Sargan Test: The Hypotheses

Null
$H_0$: all instruments are valid $\iff$ $\operatorname{cov}(z_j, e) = 0$ for every instrument
Alternative
$H_1$: at least one instrument is invalid
$\implies$ Reject $H_0$: at least one instrument is invalid.
Specification tests · Sargan

Sargan Test: The Three Steps

Step 1Estimate the 2SLS model
save the residuals $\hat e$
Step 2Regress $\hat e$ on all exogenous variables and all instruments
save the $R^2$
Step 3Compute $N R^2$ and compare with $\chi^2_{(L-B)}$
Specification tests · Sargan

Sargan Test, Step 1: Save the 2SLS Residuals

The model
$\ln(\text{wage}_i) = \beta_1 + \beta_2\,\text{educ}_i + \beta_3\,\text{exper}_i + \beta_4\,\text{exper}_i^2 + e_i$
Estimate by 2SLSinstruments: mothereduc and fathereduc
Save the residuals, using the actual educ
$\hat e_i = \ln(\text{wage}_i) - \hat\beta_1 - \hat\beta_2\,\text{educ}_i - \hat\beta_3\,\text{exper}_i - \hat\beta_4\,\text{exper}_i^2$
$\implies$ $\hat e_i$ estimates the error $e_i$.
Specification tests · Sargan

Sargan Test, Step 2: Regress $\hat e$ on Everything Exogenous

From Step 1the residuals $\hat e_i$
regress $\hat e$ on
$\hat e_i = \overbrace{\alpha_1 + \alpha_2\,\text{exper}_i + \alpha_3\,\text{exper}_i^2}^{\text{exogenous variables}} + \overbrace{\alpha_4\,\text{mothereduc}_i + \alpha_5\,\text{fathereduc}_i}^{\text{all instruments}} + u_i$
educ is left out: it is endogenous.
Save the $R^2$ of this regression.
$\implies$ Valid instruments cannot explain $\hat e$, so $R^2$ should be near 0.
Specification tests · Sargan

Sargan Test, Step 3: Compute $N R^2$ and Compare

Under $H_0$
$\overbrace{N \times R^2}^{\text{Sargan statistic}} \sim \chi^2_{(L-B)}$
Degrees of freedom
$\overbrace{L}^{\text{instruments}} - \overbrace{B}^{\text{endogenous variables}}$
Specification tests · Sargan

Sargan Test: The Decision Rule

Statistic above the critical valuereject $H_0$: at least one instrument is invalid
Statistic below the critical valuefail to reject: no evidence against validity
$\implies$ Reject means we must find the invalid instrument.
Software runs all three steps, also with many regressors.
Specification tests · Sargan

Sargan Test: The Education Numbers

Step 2 regression: $\hat e$ on exper, exper$^2$, mothereduc, fathereduc
$R^2 = 0.000883, \quad N = 428$
Step 3 statistic
$N \times R^2 = 428 \times 0.000883 = 0.378$
Degrees of freedom and critical value
$L - B = 2 - 1 = 1, \quad \chi^2_{(0.95,\,1)} = 3.84$
$\implies$ $0.378 < 3.84$
Specification tests · Sargan

Sargan Test: Are mothereduc and fathereduc Valid?

FAIL TO REJECT$0.378 < 3.84$, $p = 0.54$
Specification tests · Sargan

Sargan Test: Conclusion

In plain languageNo evidence that mothereduc or fathereduc is invalid.
The two separate estimates0.049 and 0.070: a gap no larger than chance.
DecisionKeep the 2SLS estimate: $\hat\beta_2 = 0.0614$.
Caution: passing the test does not prove the instruments are valid. It cannot detect instruments that are all invalid in the same way.
Specification tests · Summary

IV Diagnostic Tests: Summary

TestQuestionWage data
First-stage FAre the instruments strong?$F = 55.4$
HausmanIs $x$ endogenous?$p = 0.095$
SarganAre the instruments valid?$p = 0.54$
Specification tests · Summary

Specification Tests: Decisions After Each Test

ResultAction
First-stage $F < 10$Find stronger instruments
Hausman rejectsUse IV
Hausman fails to rejectUse OLS
Sargan rejectsDrop the suspect instrument and retest
Sargan fails to rejectKeep the IV estimates
Passing Sargan does not prove the instruments are valid.
Simultaneous equations

Simultaneous Equations: Two Outcomes Determined Together

So far
One dependent variable. The endogenous regressor came from an omitted variable such as ability.
Now
A system of two or more equations with two or more dependent variables, each a regressor in the other’s equation.
Consequence
OLS is no longer enough to estimate the system, and the instruments come from the system itself.
Simultaneous equations · Example 1: Labor

Simultaneity in Labor: Wages and Hours

Outcomes
Two outcomes for each worker: the wage and the hours worked.
Worker
$\text{Hours}_i = \alpha_1\,\text{Wage}_i + e_{i,h}$
Hours depend on the wage.
Firm
$\text{Wage}_i = \beta_1\,\text{Hours}_i + e_{i,w}$
The wage depends on hours.
Mechanism
A shock to $e_{i,h}$ changes hours, hours change the wage, so $\text{Wage}_i$ is correlated with $e_{i,h}$. The same argument applies to $\text{Hours}_i$ and $e_{i,w}$.
$\implies$ OLS on either equation is biased.
Simultaneous equations · Example 2: Industrial organization

Simultaneity in a Market: Price and Quantity

Outcomes
Two outcomes in each market: the price and the quantity sold.
Demand
$Q_i = \alpha_1\,P_i + e_{i,d}$
Buyers respond to price.
Supply
$Q_i = \beta_1\,P_i + e_{i,s}$
Firms respond to price.
Mechanism
A demand shock $e_{i,d}$ or a supply shock $e_{i,s}$ moves the price at which the market clears. The price is determined together with $Q_i$, so $P_i$ is correlated with each error.
$\implies$ OLS is biased.
Simultaneous equations · The model

Supply and Demand: A Look Back on ECON 2

Demand
$Q_i = \alpha_1 P_i + \alpha_2 X_i + e_{i,d}$
Supply
$Q_i = \beta_1 P_i + e_{i,s}$
Income
$X_i$ is income. Question: From ECON 2, which signs should $\alpha_1$ and $\beta_1$ have?
Signs
$\alpha_1 < 0$: demand slopes down.
$\beta_1 > 0$: supply slopes up.
Simultaneous equations · The model

Supply and Demand: Endogenous and Exogenous

Demand
$Q_i = \alpha_1 P_i + \alpha_2 X_i + e_{i,d}$
Supply
$Q_i = \beta_1 P_i + e_{i,s}$
Endogenous
$P$ and $Q$: their values are determined within the system, so they are random and both are dependent variables.
Exogenous
Income $X$: determined outside the system.
Simultaneous equations · Influence diagrams

Influence Diagrams: Separate Regressions vs. the System

$P$ and $Q$ affect each other, and both are affected by $e_d$ and $e_s$ $\implies$ $P$ is random and correlated with the errors.
Simultaneous equations · OLS bias

OLS Bias: The Data

Market: demand slope $-1$, supply slope $+1$, 80 periods with shocks to both curves.
Each period
Demand and supply both get a shock. We observe only where they cross.
Many periods
The crossing points trace out neither curve.
OLS fails
Regressing $Q$ on $P$ gives slope , not the supply slope 1.0.
Simultaneous equations · Reduced form

Reduced Form: Solve for $P$

Reduced form
Write each endogenous variable in terms of the exogenous variables only.
Set supply equal to demand
$\beta_1 P_i + e_{i,s} = \alpha_1 P_i + \alpha_2 X_i + e_{i,d}$
Solve
$P_i = \overbrace{\dfrac{\alpha_2}{\beta_1 - \alpha_1}}^{\pi_1} X_i + \overbrace{\dfrac{e_{i,d} - e_{i,s}}{\beta_1 - \alpha_1}}^{v_{i,1}}$
$\beta_1 - \alpha_1 > 0$, and $P$ contains $-e_{i,s}$: when supply gets a positive shock, the price falls.
Simultaneous equations · Reduced form

Reduced Form: Solve for $Q$

Substitute $P_i$ into the supply equation (the simpler one):
Substitute
$Q_i = \beta_1\left(\dfrac{\alpha_2}{\beta_1 - \alpha_1} X_i + \dfrac{e_{i,d} - e_{i,s}}{\beta_1 - \alpha_1}\right) + e_{i,s}$
Combine
$Q_i = \dfrac{\beta_1 \alpha_2}{\beta_1 - \alpha_1} X_i + \dfrac{\beta_1 e_{i,d} - \alpha_1 e_{i,s}}{\beta_1 - \alpha_1}$
Result
$Q_i = \overbrace{\dfrac{\beta_1 \alpha_2}{\beta_1 - \alpha_1}}^{\pi_2} X_i + \overbrace{\dfrac{\beta_1 e_{i,d} - \alpha_1 e_{i,s}}{\beta_1 - \alpha_1}}^{v_{i,2}}$
Simultaneous equations · Reduced form

Reduced Form: Parameters and Errors

$P_i = \pi_1 X_i + v_{i,1} \qquad Q_i = \pi_2 X_i + v_{i,2}$
Names
$\pi_1, \pi_2$: reduced-form parameters.
$v_{i,1}, v_{i,2}$: reduced-form errors.
Form
An endogenous variable on the left, exogenous variables on the right: the same form as the first-stage equations of Chapter 10.
OLS WORKS HERE$E(v_{i,1} \mid X_i) = 0$ and $E(v_{i,2} \mid X_i) = 0$, so OLS estimates of $\pi_1$ and $\pi_2$ are consistent.
Simultaneous equations · Interpretation

Reduced Form: Interpretation

Equilibrium
The reduced-form equations give the equilibrium values of $P$ and $Q$ for a given value of the exogenous variable. Suppose income $X$ rises by one unit.
$\pi_1$
The expected change in the equilibrium price, after the market adjusts to the new equilibrium of $P$ and $Q$.
$\pi_2$
The expected change in the equilibrium quantity.

Thank you!

jakeanderson@g.ucla.edu