Instrumental variables: noncompliance, 2SLS and the local average treatment effect
Before this lesson: lesson 02 (potential outcomes, ATE, randomization), lesson 04 (backdoor paths, the do-operator), lesson 05 (adjustment). Helpful: projections and least squares (linear algebra 12) and regression standard errors (probability 13). Time: about 85 minutes, plus the notebook.
Why this matters #
- A/B tests with noncompliance. You randomize a notification that invites users to a new feature. Many users ignore it, and some find the feature by themselves. The random invitation is an instrument for using the feature. This is the standard way to estimate "the effect of seeing the feature" from an experiment where exposure was not forced.
- Medicine and epidemiology. In trials, patients do not always take the drug they were assigned. Mendelian randomization uses genetic variants, which are assigned at conception, as instruments for an exposure such as LDL cholesterol.
- Economics. Lottery numbers, distance to a college, the random assignment of judges or of case workers: many famous estimates of returns to schooling, of the effect of military service and of incarceration are IV estimates.
- Machine learning. Deep IV (Hartford et al., 2017) and kernel IV (Singh, Sahani and Gretton, 2019) replace the linear stages by neural networks or kernels, for counterfactual prediction with hidden confounding. Demand models use cost shocks as instruments for price.
1. Predict first #
2. The picture #
The problem. In lesson 04 we removed confounding by blocking every backdoor path from to . Here the only backdoor path is , and is not measured. No adjustment set exists. Regression of on mixes the effect of with the effect of .
The idea. Find a variable with three properties. moves . is "as good as random": it shares no common cause with . And reaches only through . In the graph: , with and , and no other arrow at .
Note on notation. In lessons 03–04, was a set of conditioning variables. In this lesson, is the instrument.
Two slopes and a ratio. Compare the units with and with . Because is as good as random, the two groups have the same distribution of . So every difference between them is caused by :
- the first stage : how much moves , ;
- the reduced form : how much moves , .
can move only by moving . If one unit of moves by , then moving by moves by . So , and
This is the Wald estimator (Wald, 1940). In the scatter of against , it is the slope of the line through the two group means and .
Move the sliders and watch three lines. Dots are units: blue for , orange for . The magenta OLS line is tilted by the hidden confounder (dashed violet node). The dark IV line goes through the two big dots, the group means; its slope is the Wald estimate. The dashed aqua line has the true slope . Set confounding to 0: OLS becomes right. Choose weak instrument: the big dots almost touch and the IV line jumps with each new sample. Choose exclusion broken: the IV line is wrong by , and nothing in the picture warns you.
In a randomized encouragement study, the encouraged group has mean treatment and mean outcome . The other group has mean treatment and mean outcome . What is the Wald estimate of the effect of on ?
Reduced form ; first stage ; Wald . The value 2.0 is the intention-to-treat effect of the encouragement, not of the treatment. Dividing raw means ignores the comparison group.
3. Definitions and main results #
3.1 The three IV conditions #
We use potential outcomes (lesson 02). Write for the treatment a unit would take if were set to , and for the outcome if were set to and to . A variable is an instrument for the effect of on if:
| Condition | In words | In symbols | In the graph | Testable? |
|---|---|---|---|---|
| Relevance | moves | arrow | yes: first stage | |
| Exclusion | changes only through | for all | no arrow , no path that avoids | no |
| Independence (exogeneity) | is as good as random | for all | no common cause of and | no (only partly, see below) |
Randomization makes independence true by design (the coin does not look at the units). It does not make exclusion true: a random letter can still change behavior by itself. Exclusion is an assumption about the world, and it is where most IV studies are attacked.
3.2 Linear model: the IV formula #
Theorem (IV in a linear model). Let , where collects everything else that affects (the hidden and noise). Assume relevance, , and (exclusion and independence: is not in and is not related to anything in ). Then
Proof.
- Take the covariance of both sides of with . Constants have zero covariance, so .
- Exclusion and independence give , so .
- Relevance lets us divide by .
Compare OLS. The OLS slope is . The second term is the omitted-variable bias: is correlated with the hidden part . IV replaces "the variation of " by "the variation of that comes from ", which is not related to .
Binary gives the Wald estimator. If with , then for any variable , . The factor cancels in the ratio, and .
A study uses a lottery as an instrument for winning a housing voucher () and measures later income (). Critics point out that lottery winners also receive a visit from a job counsellor, which losers do not get. Which IV condition is in danger?
The lottery reaches income by a second path (lottery → counsellor → income) that does not go through the voucher. That breaks exclusion. Independence still holds, because the lottery is random. Randomization protects independence, never exclusion.
3.3 Noncompliance, compliance types and the LATE #
Now let be a randomized encouragement (an invitation, an assignment) and the treatment actually taken. Both are binary. Each unit has two potential treatments and . They define four compliance types:
| Type | Behavior | ||
|---|---|---|---|
| complier | 0 | 1 | takes the treatment if and only if encouraged |
| always-taker | 1 | 1 | takes it in any case |
| never-taker | 0 | 0 | never takes it |
| defier | 1 | 0 | does the opposite of the encouragement |
We never see a unit's type: we see only one of . A treated unit with can be a complier or an always-taker.
The intention-to-treat (ITT) effect is the effect of the encouragement on : . It is the reduced form . It is what a randomized experiment always identifies, whatever people do with the encouragement.
Monotonicity means there are no defiers: for every unit . The encouragement never pushes anyone away from the treatment.
The local average treatment effect is the average effect for the compliers: .
Theorem (Imbens and Angrist, 1994; Angrist, Imbens and Rubin, 1996). Assume independence, exclusion, relevance () and monotonicity. Then
Proof. Write for the shares of the four types.
- Exclusion: . So the outcome of a unit with encouragement is .
- Independence: is independent of . With consistency, . So .
- Split this average by type. For always-takers , so the difference is . For never-takers it is . For compliers it is . For defiers it is . Hence .
- In the same way, .
- Monotonicity: . So and .
- Relevance: , so we can divide: .
Read step 3 again: always-takers and never-takers drop out because of exclusion. The encouragement does not change their treatment, so under exclusion it does not change their outcome. The only people who carry the effect of are the compliers. Step 4 also gives a useful fact: the first stage is the share of compliers.
Change the shares and switch the types on and off. Each circle is a person; filled means treated. Aqua compliers follow the coin, blue always-takers are always filled, orange never-takers are never filled, and magenta defiers do the opposite. Set the types to hidden to see what the data shows. With no defiers the Wald ratio equals the compliers' effect, whatever the always-takers' effect is. Add 10% defiers and give them a different effect: the ratio leaves the LATE.
In an experiment, 30% of the encouraged users take the treatment and no one else does. The Wald estimate is . Which statement is correct?
The Wald ratio identifies the LATE, the effect for compliers. Here noncompliance is one-sided, so it is also the effect on the treated. The other 70% (never-takers) may have a different effect, and the data contain no information about it. is the ITT effect of the encouragement. Low compliance makes the estimate noisier, not invalid.
3.4 Two-stage least squares (2SLS) #
Real studies have covariates and sometimes several instruments. Two-stage least squares handles this. In this subsection only, bold letters are matrices:
- is the -vector of outcomes;
- is the matrix of regressors: a column of ones, the treatment , and pre-treatment covariates ;
- is the matrix of instruments: a column of ones, the instruments, and the same covariates (each covariate is its own instrument). We need .
The model is with . Let , the projection onto the column space of (linear algebra 12).
- First stage. Regress each column of on : . For the columns that are already in (ones, ) nothing changes. The column is replaced by its fitted value : the part of explained by the instruments.
- Second stage. Regress on . Because is symmetric and ,
With exactly as many instruments as regressors (, just identified), is square and the formula simplifies to . With one instrument and no covariates this is the sample version of .
Why the just-identified formula simplifies
If is square and invertible, then . Multiply by : the middle factors and are identities, which leaves .
Standard errors. Under homoskedasticity, , with . The residuals use the real regressors (with the real ). The robust (sandwich) version is with and row of .
Why the two stages by hand give wrong standard errors. If you run the second stage with ordinary OLS software, it computes residuals , with the fitted . These are not the model's errors: they contain the extra term . So is wrong, and the standard error can be too large or too small. The point estimate is right; the uncertainty is not. Use a 2SLS routine, or compute with the real .
Covariates go in both stages. A covariate in the second stage must also be in the first stage (it is a column of ). Otherwise the first-stage residual is correlated with and the estimate is biased. Covariates must be pre-treatment: adjusting for a variable caused by or by breaks the design (lesson 04).
The forbidden regression. Suppose is binary and you fit the first stage with a logistic (or probit) model, then plug its fitted probabilities into an OLS second stage. This is not 2SLS. 2SLS works because the OLS first-stage residual is uncorrelated with the fitted values and the covariates by construction. A nonlinear first stage loses this property, and the estimate can be inconsistent when the nonlinear model is wrong (Angrist and Pischke call this the "forbidden regression"). If you want a nonlinear first stage, use its fitted values as an instrument for , not as a regressor.
More instruments than treatments. With the model is over-identified. 2SLS combines the instruments in the best linear way. A test of over-identifying restrictions (Sargan, Hansen) checks whether the instruments give the same answer. It needs at least one valid instrument to mean anything, and with heterogeneous effects two valid instruments can give different LATEs, so a rejection does not always mean that an instrument is invalid.
An analyst fits the first stage, saves , and then runs LinearRegression().fit(X=[T_hat, W], y). What is right and what is wrong?
The second stage is algebraically 2SLS, so the point estimate is right (if was also in the first stage). But OLS computes residuals with instead of , so and the standard error are wrong. Compute the residuals with the real .
3.5 Weak instruments #
An instrument is weak when it moves only a little. Then the first stage is close to 0, and in the ratio small noise in the denominator gives large changes in the estimate. Three things go wrong.
- The estimate is biased towards OLS. In a finite sample, contains some noise from the first-stage error, which is correlated with the confounding. With a weak instrument this noise is a large part of , and starts to behave like itself. At the limit , the 2SLS estimate is centered near the OLS value.
- The distribution has heavy tails. With one instrument, the 2SLS estimator has no finite mean. Single estimates can be far away from the truth. Report medians in simulations.
- The usual confidence interval is too short. The usual 95% interval covers the truth less often than 95% of the time.
The first-stage statistic measures strength. With one instrument it is the square of the -statistic of in the first-stage regression. Staiger and Stock (1997) proposed the rule of thumb ; Stock and Yogo (2005) gave tables of critical values. Always report the first stage.
Choose a strength and press Run 500 samples. Each run simulates 500 data sets of 200 units with a true effect of 1 (aqua line) and strong confounding. The magenta histogram is OLS: precise and wrong (dashed line: its population value). The dark histogram is IV. With it is centered on the truth. Lower the strength: the IV histogram widens, its center moves towards OLS, and the share of 95% intervals that contain the truth drops (about 70% at ).
Is enough?
The rule was designed to keep the bias of 2SLS small relative to OLS. It does not make the usual -test reliable. Lee, McCrary, Moreira and Porter (2022) showed that, with one instrument, a usual 5% -test has a true size of at most 5% only if the first-stage is above about 104.7. For smaller their "tF" procedure replaces 1.96 by a larger critical value that depends on . The Anderson–Rubin test is valid at any instrument strength in the just-identified case: it tests by regressing on . With heteroskedastic errors, use a robust first-stage (or the effective of Montiel Olea and Pflueger, 2013). The widget shows the problem: at the 2SLS median is almost exactly 1, but coverage is only about 91%.
A famous warning is Bound, Jaeger and Baker (1995). Angrist and Krueger (1991) used quarter of birth as an instrument for years of schooling, with many interactions. Bound, Jaeger and Baker replaced the real quarter of birth by randomly generated quarters and obtained estimates close to the original ones, with standard errors that looked small. Many weak instruments can produce a confident answer from noise.
Your first-stage is 3. What should you expect from the 2SLS estimate?
A weak first stage lets the confounded part of leak into , so 2SLS moves towards OLS, not towards zero. The estimator also has heavy tails, and the usual interval under-covers. Report the first stage, and use weak-instrument-robust inference (Anderson–Rubin) or find a stronger instrument.
3.6 Classic instruments and how they fail #
| Instrument | Treatment | Outcome | Main threat |
|---|---|---|---|
| draft lottery number (Angrist, 1990) | military service | later earnings | exclusion: men with low numbers may stay in school to avoid the draft |
| distance to a college (Card, 1995) | years of schooling | wages | independence: families and local labour markets near colleges differ |
| quarter of birth (Angrist and Krueger, 1991) | schooling (through school-leaving laws) | wages | weak instrument; season of birth may affect health |
| randomly assigned judge's leniency (e.g. Kling, 2006) | incarceration or detention | later employment, crime | exclusion: judges differ in more than one decision; monotonicity can fail |
| genetic variant (Mendelian randomization) | an exposure, e.g. LDL cholesterol | heart disease | pleiotropy: the gene affects the outcome by other paths (exclusion); population structure (independence) |
| randomized notification in an A/B test | using the feature | retention | exclusion: the notification itself reminds users of the app |
The pattern: randomization or "nature" gives independence; the argument for exclusion must come from knowledge of the mechanism.
3.7 What IV estimates, and what it does not #
- The Wald ratio estimates the effect for compliers. Compliers are defined by the instrument: the people a draft lottery moves are not the people a college nearby moves. Two valid instruments can give two different, correct answers when effects differ between people.
- The LATE equals the ATE only in special cases, for example when the effect is the same for everyone, or when everyone is a complier.
- We cannot list the compliers. But we can estimate how many there are () and their average pre-treatment covariates (Abadie, 2003). Comparing them with the whole population tells the reader whom the estimate describes.
- In a linear model with a constant effect, IV estimates the effect. The constant-effect assumption is what makes "the" possible; state it when you use it.
Answers to section 1. (1) More than 0.12. The ITT effect of the notification is , and the first stage is , so the Wald estimate is : the effect of using the feature for compliers. Section 4 works this out. (2) No. is a collider on the path . Conditioning on opens this path (lesson 03), so the coefficient of is not 0 even when exclusion holds. Exclusion cannot be tested this way.
4. Worked example #
The setting (simulated). An app randomizes a notification about a new feature among 2,000 users, 1,000 per group. if the user uses the feature in the next week; if the user is still active four weeks later. The data:
| used the feature () | retained () | ||
|---|---|---|---|
| notified () | 1,000 | 700 | 510 |
| not notified () | 1,000 | 100 | 390 |
Step 1: intention to treat. . Sending the notification raises retention by 12 percentage points. This number needs no assumption beyond the randomization.
Step 2: first stage. . So 60% of users are compliers. The 10% who use the feature without the notification are always-takers; the remaining are never-takers.
Step 3: Wald ratio. . Assuming exclusion (the notification changes retention only through feature use) and monotonicity (the notification makes no one stop using the feature), using the feature raises retention by 20 points for compliers.
Step 4: what the truth was. This is a simulation, so we know each type's potential outcomes (retention probabilities):
| Type | share | effect | ||
|---|---|---|---|---|
| always-takers | 0.10 | 0.50 | 0.90 | 0.40 |
| compliers | 0.60 | 0.40 | 0.60 | 0.20 |
| never-takers | 0.30 | 0.20 | 0.20 | 0.00 |
Check the observed means. In the group, always-takers and compliers are treated: ✓. In the group, only always-takers are treated: ✓. The always-takers and never-takers add the same amount () to both groups, and cancel in the ITT. That is step 3 of the proof, with numbers.
The true LATE is ✓. The ATE is . The IV estimate is right for compliers and wrong as an ATE.
Step 5: the naive "as-treated" comparison. Compare users who used the feature with users who did not, ignoring . Count in shares of the whole population ( for half of each type). The treated are all always-takers (share 0.10) and the compliers with (share 0.30). The untreated are all never-takers (share 0.30) and the compliers with (share 0.30).
The as-treated difference is , almost twice the LATE. Engaged users (always-takers) use the feature and stay; disengaged users (never-takers) do neither. That is confounding by engagement, the hidden of this example.
Step 6: the linear model of the track. Let , , , all noises independent with variance 1. Then and .
- OLS slope: . Biased by 0.758.
- IV: , so ✓.
5. In code #
NumPy checks the numbers of section 4 with simulated data. The notebook has these cells and the exercises.
import numpy as np
rng = np.random.default_rng(0)
# (a) linear model with a hidden confounder U and an instrument Z
n = 100_000
Z, U = rng.normal(size=n), rng.normal(size=n)
T = 0.8 * Z + U + rng.normal(size=n)
Y = 0.5 * T + 2 * U + rng.normal(size=n)
ols = np.cov(T, Y)[0, 1] / np.var(T, ddof=1)
iv = np.cov(Z, Y)[0, 1] / np.cov(Z, T)[0, 1]
print(f"OLS {ols:.3f} IV {iv:.3f} truth 0.5")
# OLS 1.256 IV 0.503 truth 0.5
# (b) 2SLS in matrix form, with the correct and the naive standard error
X = np.column_stack([np.ones(n), T]) # regressors
Zm = np.column_stack([np.ones(n), Z]) # instruments
Xhat = Zm @ np.linalg.lstsq(Zm, X, rcond=None)[0] # first stage: P_Z X
beta = np.linalg.lstsq(Xhat, Y, rcond=None)[0] # second stage
XtPX_inv = np.linalg.inv(Xhat.T @ Xhat)
s2_right = np.sum((Y - X @ beta) ** 2) / (n - 2) # residuals with the real T
s2_naive = np.sum((Y - Xhat @ beta) ** 2) / (n - 2) # residuals with the fitted T
print(f"2SLS {beta[1]:.3f} SE right {np.sqrt(s2_right * XtPX_inv[1, 1]):.4f}"
f" SE naive {np.sqrt(s2_naive * XtPX_inv[1, 1]):.4f}")
# 2SLS 0.503 SE right 0.0088 SE naive 0.0108
# (c) encouragement design with compliance types (shares 10% / 60% / 30%)
n = 200_000
kind = rng.choice(["always", "complier", "never"], size=n, p=[0.1, 0.6, 0.3])
Zb = rng.integers(0, 2, size=n)
Tb = np.where(kind == "always", 1, np.where(kind == "never", 0, Zb))
p0 = np.select([kind == "always", kind == "complier"], [0.5, 0.4], 0.2) # P(Y(0) = 1)
p1 = np.select([kind == "always", kind == "complier"], [0.9, 0.6], 0.2) # P(Y(1) = 1)
Yb = (rng.random(n) < np.where(Tb == 1, p1, p0)).astype(float)
itt = Yb[Zb == 1].mean() - Yb[Zb == 0].mean()
fs = Tb[Zb == 1].mean() - Tb[Zb == 0].mean()
as_treated = Yb[Tb == 1].mean() - Yb[Tb == 0].mean()
print(f"ITT {itt:.3f} first stage {fs:.3f} Wald {itt / fs:.3f} as-treated {as_treated:.3f}")
# ITT 0.123 first stage 0.601 Wald 0.204 as-treated 0.375
In (b), the naive standard error is about 20% too large here; in other designs it is too small. In (c), the Wald ratio is close to the true LATE 0.20, and the as-treated difference is close to the 0.375 of step 5.
6. Where it shows up #
- Online experiments. "Intent to treat" is the default analysis of an A/B test. When exposure is not forced (a banner can be ignored, an email unopened), the Wald ratio with assignment as the instrument gives the effect of exposure for compliers; with one-sided noncompliance it is the effect on the exposed users. Randomized recommendations or randomized ranking changes are instruments for exposure to an item.
- Medicine. Trials report ITT and often a complier average causal effect (CACE), which is the LATE. Mendelian randomization is a large field in genetic epidemiology; its main fights are about pleiotropy.
- Economics and policy. Returns to schooling, effects of military service, of class size (Angrist and Lavy, 1999, used a class-size rule, which is also a regression discontinuity: see lesson 07), of detention and of welfare programs.
- ML methods. Deep IV fits the first stage as a conditional density and the second stage as a network; kernel IV and dual IV do the same with kernels. They inherit every condition of this lesson: a flexible model does not repair a broken exclusion restriction or a weak instrument.
- Pricing and demand. Price is set in response to demand shocks, so regressing sales on price is confounded. Cost shocks (input prices, taxes) move price but not demand, and serve as instruments.
7. Common mistakes #
- Reporting a LATE as the ATE. The Wald ratio describes compliers. Say who they are (their share and their covariates) and do not generalize without an argument.
- "The instrument is random, so it is valid." Randomization gives independence only. Exclusion must be argued from the mechanism. Ask: by which other paths could reach ?
- Testing exclusion by controlling for . is a collider between and ; conditioning on it creates a – association even when exclusion holds.
- Running the second stage by hand and keeping its standard errors. The residuals must use the real . Use a 2SLS routine or compute yourself.
- The forbidden regression. Plugging logistic or probit fitted values into an OLS second stage is not 2SLS. Use them as instruments instead.
- Ignoring a weak first stage. Report the first stage, its , and the reduced form. With below about 10, the estimate is pulled towards OLS; even with around 10, use robust inference.
- Covariates in the second stage only. Every exogenous covariate must be in both stages.
- Forgetting monotonicity. If some units react against the encouragement (defiers), the Wald ratio is not a LATE unless defiers and compliers have the same effect.
8. Check yourself #
- Write the three IV conditions in words and say which one the data can check.
Answer
Relevance ( moves ): testable with the first stage. Exclusion ( changes only through ): not testable. Independence ( shares no common cause with , as good as random): not testable in general, but true by design when is randomized. With discrete data, the instrumental inequality can reject some invalid instruments. - A randomized encouragement raises take-up from 0.20 to 0.45 and the outcome mean from 3.0 to 3.5. Compute the ITT, the first stage and the Wald estimate.
Answer
ITT . First stage (25% compliers). Wald : under exclusion and monotonicity, the average effect for compliers. - Why do always-takers not affect the Wald ratio, even if their effect is large?
Answer
The encouragement does not change their treatment (). Under exclusion it then does not change their outcome either, so they add the same amount to and , and they do not change the first stage. Their effect is invisible to the instrument. - In with , the instrument has a direct effect: . What does the IV formula give?
Answer
, so IV . The bias is : a small violation of exclusion is divided by the first stage, so it is large when the instrument is weak. - Write the 2SLS estimator in matrix form and say what does.
Answer
with . projects each regressor onto the column space of the instruments: it keeps only the variation in that the instruments explain. - Two valid instruments for the effect of schooling on wages give 6% and 11% per year. Is one of them invalid?
Answer
Not necessarily. Each instrument moves a different group of people (its compliers). If the return to schooling differs between people, the two LATEs differ, and both can be correct.
What are the three conditions for an instrument ?
Relevance: moves . Exclusion: changes only through . Independence: shares no common cause with (as good as random).
Which IV condition can be checked with data?
Relevance, with the first-stage regression of on . Exclusion and independence are assumptions.
Give the IV formula in a linear model.
.
Compute the Wald estimate when the reduced form is and the first stage is .
.
What is the intention-to-treat (ITT) effect?
The effect of the assignment or encouragement on : , whatever treatment people actually took.
Define a complier, using potential treatments.
A unit with and : it takes the treatment if and only if encouraged.
What does monotonicity assume in an IV design?
No defiers: for every unit, so the instrument never pushes anyone away from the treatment.
What does the Wald ratio estimate under the four IV assumptions with heterogeneous effects?
The LATE: the average effect , not the ATE.
Why are the standard errors of a manual second stage wrong?
OLS computes residuals with the fitted instead of the real , so the error variance is wrong.
What happens to 2SLS when the instrument is weak?
It is pulled towards the OLS estimate, has heavy tails, and the usual 95% interval covers the truth too rarely.
9. Interview angle #
- "In an A/B test only 40% of the treated users saw the feature. How do you estimate the effect of seeing it?" — Keep the randomized comparison. Report the ITT. Divide it by the difference in exposure rates between the arms (Wald / 2SLS with assignment as the instrument). If control users cannot see the feature, this is the effect on users who saw it. State the exclusion assumption (assignment matters only through exposure) and check the first stage. Do not compare viewers with non-viewers: that is confounded by engagement.
- "What makes a good instrument?" — Strong first stage, a convincing reason that it touches the outcome only through the treatment, and as-good-as-random assignment. Then say who the compliers are.
- "Why not just control for confounders?" — Because the important ones are unobserved. IV trades the no-unmeasured-confounding assumption for exclusion and independence of .
- "Your first-stage is 8. What do you do?" — Expect bias towards OLS and bad coverage. Report the reduced form, use Anderson–Rubin intervals, look for a stronger instrument or more data.
10. Practice #
The notebook for this lesson has five exercises, each with a check cell and a folded solution:
iv_ratioandols_slope: compare OLS, IV and the truth onsimulate_ivdata with a hidden confounder.two_sls(y, T, Z, W): 2SLS in NumPy with homoskedastic and robust standard errors; compare with the naive two-step standard error.wald(df): ITT, first stage and LATE in an encouragement design with compliance types; compare with the true complier effect and the ATE.- Weak instruments: median, spread and 95% coverage of 2SLS for several first-stage strengths.
- A broken exclusion restriction: check by simulation that the bias is .
11. Watch and read #
- Scott Cunningham, Causal Inference: The Mixtape, ch. 7 "Instrumental Variables", free online: the Wald estimator, 2SLS, weak instruments, judge designs.
- Nick Huntington-Klein, The Effect, ch. 19 "Instrumental Variables", free online: the conditions explained with graphs.
- Brady Neal, Introduction to Causal Inference, course notes (free PDF), ch. 9: instrumental variables and the LATE proof.
- Imbens and Angrist (1994), "Identification and Estimation of Local Average Treatment Effects", Econometrica; Angrist, Imbens and Rubin (1996), "Identification of Causal Effects Using Instrumental Variables", JASA. The original LATE papers.
- Lee, McCrary, Moreira and Porter (2022), Valid t-ratio Inference for IV, American Economic Review (arXiv version): why is not enough for the -test.
- Angrist and Pischke, Mostly Harmless Econometrics (2009), ch. 4 (book): 2SLS, the forbidden regression, weak instruments.
Runs in your browser with nothing to install. The notebook repeats the key demos and has exercises with checks; solutions are inside, folded.
No Google account needed: Python runs inside your browser. The first start downloads about 40 MB; your changes are saved in this browser only.