iv-estimation
Installation
SKILL.md
Instrumental Variables & Treatment Effects Skill
This skill covers IV/2SLS estimation and propensity score matching (PSM) for causal inference when treatment is endogenous. It helps identify valid instruments, run 2SLS, test instrument validity, and implement PSM.
When to Use IV vs PSM
| Method | Use When |
|---|---|
| IV / 2SLS | Treatment is endogenous; a valid instrument exists |
| PSM | Selection on observables assumption is credible; rich covariate data |
| OLS + controls | Selection on observables, limited instruments |
IV / 2SLS Framework
Conditions for a Valid Instrument Z for endogenous X
- Relevance: Cov(Z, X) ≠ 0 — Z must be correlated with the endogenous regressor
- Exclusion restriction: Cov(Z, ε) = 0 — Z affects Y only through X (cannot be tested directly)
- Independence: Z is as-good-as-randomly assigned (exogenous)