Causal Inference 101

6 min read

Instrumental variables — a practical introduction

How IV methods isolate causal effects when treatment is confounded but a valid instrument exists.

An instrument is a variable that affects treatment, affects the outcome only through treatment, and is independent of unmeasured confounders. Random assignment to encouragement, distance to hospital, or eligibility rules can serve as instruments.

IV estimates the effect for compliers — units whose treatment status changes when the instrument changes — not necessarily for everyone.

When IV helps

Use IV when treatment is endogenous: people self-select into programs, doctors prescribe based on unmeasured prognosis, or compliance is partial. A valid instrument mimics partial randomization.

Validity is the hard part

  • Relevance: the instrument must shift treatment enough.
  • Exclusion: the instrument must not affect outcome except through treatment.
  • Independence: the instrument must not share unobserved causes with the outcome.

Run this method on your data — no Python

CausalLens runs matching, DiD, causal forests, DoWhy refutation, and more — with balance tables, sensitivity checks, and PDF export.