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

  1. Relevance: Cov(Z, X) ≠ 0 — Z must be correlated with the endogenous regressor
  2. Exclusion restriction: Cov(Z, ε) = 0 — Z affects Y only through X (cannot be tested directly)
  3. Independence: Z is as-good-as-randomly assigned (exogenous)
Installs
1
GitHub Stars
3.4K
First Seen
Jun 21, 2026
iv-estimation — brycewang-stanford/auto-empirical-research-skills