liveBook · Manning

Instrumental variable

As explained in Causal Inference for Data Science

An instrument is a variable that directly influences treatment while being unrelated to confounders and not directly influencing the outcome.

An instrumental variable (IV) estimates the causal effect of a treatment when important confounders are unobserved. The instrument supplies independent variation: it affects the treatment, is unrelated to confounders, and has no direct effect on the outcome. This makes IV useful when ordinary adjustment cannot remove treatment–outcome confounding. section 1.1.5 section 9.0

Figure 9.1 Basic instrumental variables diagram. Confounders are unobserved. Variable Z plays the role of an instrument. This structure lets you overcome the lack of information about confounders in estimating the effect of D into Y.
figure

Use the diagram to check the basic setup: Z changes treatment D, while unobserved confounders affect D and outcome Y; Z must not directly change Y. section 9.0

The key question is not whether assigning access changes an outcome, but whether actually taking the treatment changes it. IVs can address that distinction when assignment affects uptake but people’s characteristics also influence whether they take up the treatment. section 9.1 section 9.1.3

Applying IV requires structural and functional assumptions:

  • Relevance: the instrument changes the treatment. section 9.6
  • Exogeneity: the instrument is independent of confounders. section 1.1.5
  • Exclusion restriction: the instrument directly influences treatment, not outcome. section 1.1.5
  • A functional model is also needed; linear and partially linear forms support different estimators. section 9.6

With a linear model, estimate the effect of Z on D and the effect of Z on Y, then divide the latter by the former. Equivalently, the estimate can be written as covariance(Y, Z) divided by covariance(D, Z). A two-stage algorithm gives the same result as direct IV formulas. section 9.2.1 section 9.6

Chatbot uptake in an A/B test

Randomly offering a chatbot can serve as Z; chatbot usage is D and engagement is Y. Customer context may affect both usage and engagement but remain unobserved. Comparing users with nonusers is confounded, whereas the random offer provides variation for estimating the effect of usage. section 9.1 section 9.1.1

IV is not a generic fix for missing confounders. Additional assumptions are necessary, and weak instruments can inflate estimation variance. In a synthetic example, naive regression and difference in means were far from the known effect, while the IV estimate was much closer; R’s AER package provides an IV estimator and uncertainty estimate. section 9.2 section 9.3 section 9.6

How Causal Inference for Data Science covers it

How deep it goes
Develops assumptions, linear and partially linear models, formulas, two-stage estimation, software application, and weak-instrument limitations.
Examples
Uses chatbot uptake in an A/B test, noncompliant clinical trials, and a synthetic binary-treatment dataset.
What it assumes
Assumes familiarity with causal DAGs, confounders, treatment and outcome variables, while motivating IVs from an A/B-test example.
What you can do after
Apply it via R and Python packages to estimate causal effects and interpret IV results under stated assumptions.
How it connects
Connects causal DAGs, adjustment formula, confounders, randomized controlled trials, intention to treat, per-protocol effects, and potential outcomes.

Also explained in

Compare how 2 books explain instrumental variable →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Causal Inference for Data Science. The section links point to the parts of the book it draws on.