Causal Inference & ML

instrumental variables

Sometimes the thing nudging your treatment around also happens to be unrelated to everything else that drives the outcome. An instrumental variable is exactly such a nudge: a source of variation in the treatment that reaches the outcome only by way of the treatment, never through a back door. If you can find one, you can estimate a causal effect even when unobserved confounders make the raw treatment-outcome association hopeless.

A valid instrument Z must satisfy three conditions: relevance (Z genuinely shifts the treatment T), exclusion (Z affects the outcome Y only through T), and exogeneity or independence (Z shares no common cause with Y). Given these, the effect is recovered by scaling: the part of Y that moves with Z, divided by the part of T that moves with Z. With covariates this is implemented as two-stage least squares, first predicting T from Z, then regressing Y on the predicted T.

Two cautions dominate practice. Instruments are typically weak, meaning Z explains little of T, which inflates variance and bias; and under treatment-effect heterogeneity the IV estimand is not the population average effect but a local average treatment effect, the effect among the compliers whose treatment status actually responds to the instrument. Machine learning enters through nonparametric and deep IV methods that fit the two stages flexibly.

\hat\tau_{IV} = \frac{\operatorname{Cov}(Y,Z)}{\operatorname{Cov}(T,Z)}

In the single-instrument case the effect is the covariance of outcome with instrument over that of treatment with instrument.

The exclusion restriction is untestable by data: it is a substantive claim that the instrument has no other path to the outcome, and it must be defended by argument.

Also called
IV工具變數two-stage least squares