iv-diagnostics
Diagnostics for instrumented specifications: first-stage strength at the design's inference level, reduced form, weak-instrument-robust inference, exclusion threats, and omitted-variable-bias sensitivity on the exclusion restriction. Invoke from `code-and-data` whenever any target specification uses an instrument. Strength is not exogeneity.
isitcredible · 已有静态检查记录
安装与使用
运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。
npx skills add isitcredible/research_skills --skill iv-diagnostics技能说明
name: iv-diagnostics
description: >-
Diagnostics for instrumented specifications: first-stage strength at the
design's inference level, reduced form, weak-instrument-robust inference,
exclusion threats, and omitted-variable-bias sensitivity on the exclusion
restriction. Invoke from code-and-data whenever any target
specification uses an instrument. Strength is not exogeneity.
IV diagnostics
Test the two claims an instrument makes — strength and exclusion — as separate claims. Papers lead with the first-stage F because it is easy to make large, but IV identification stands or falls on the exclusion restriction, and exclusion needs its own evidence: a large first-stage statistic proves nothing about it.
Trigger: any instrumented specification among the target results. If no
target specification is instrumented, this skill is NOT_APPLICABLE — do
not run IV diagnostics on an OLS paper to fill a checklist.
Core checks — run for every instrumented target
- First stage, with inference at the level the instrument actually
varies. An instrument that varies at the region level clustered at the
unit level has an overstated first stage; report the cluster count at the
instrument-variation level — nominal G AND the partial-leverage
effective count G* (
../../references/methods/mackinnon_nielsen_webb_2023_few_clusters.md), since leverage imbalance is what the F counts wrong. - Collapse the instrument to its genuine values (the point estimate, not
just the cluster count). Clustering at the instrument-variation level
repairs the first-stage's precision and leaves the estimate untouched.
Where the instrument is donor-substituted, interpolated, or otherwise
constant within a coarser unit, drop-to-source (or average genuine
replicates) and re-read the first-stage F and the 2SLS coefficient: an F
that collapses is lost identification, and the estimate bends toward OLS
under the weak instrument. See
../../references/design-matrix.md, "Collapse-test record". - The IV-precision sanity check. The analogous-OLS comparison is a free diagnostic: with homoskedastic SEs on the same sample, 2SLS cannot beat OLS on precision, so a 2SLS standard error below the comparable OLS SE under clustering suggests the clustered variance collapsing under leverage (a dominant cluster's residuals set the whole CV1 meat) rather than extra precision. Robust/clustered SEs carry no such ordering, so it is a tell, not proof: re-read both SEs under CV3/jackknife first, and escalate if the ordering survives only under CV1; do not let the table read "IV is more precise than OLS" (see the few-clusters crib's Hansen 2026 section).
- Reduced form. The outcome regressed on the instrument directly. If the reduced form is fragile, the IV estimate is fragile no matter what the two-stage output says. And probe confounding on the reduced form, not the structural equation: the exclusion restriction is about the instrument, so "is the IV confounded by X" is tested as instrument→outcome with X controlled — not endogenous→outcome.
- Weak-instrument-robust inference — an Anderson–Rubin confidence set or
equivalent, reported beside the conventional interval. If the robust set is
unbounded or much wider, that is the finding. Under a weak first stage
(MOP effective F below its critical value, or below the claim-matched
threshold in the weak-IV guides crib, whichever the claim needs) the 2SLS
point and t-interval are unstable under trivial spec changes: say what "the
IV does" from the AR/tF set, and quote a 2SLS point only from a column that
reproduces exactly. When clusters are few or
unequal in leverage, report the first-stage F under both the CV1 the
paper prints and the CV3/jackknife variance the leverage warrants — the
same instrument can read F ≈ 2,400 on CV1 and F ≈ 26 on CV3, and the
honest number is the second — then pair the AR set with a tF/VtF set:
critical values
are a function of the first-stage F̂ and, for VtF, the null-imposed
residual correlation r̂ — computed on cluster-robust inputs (CV3 SEs and a
cluster-consistent first-stage F);
see
../../references/methods/mackinnon_nielsen_webb_2023_few_clusters.md— the AR set inherits the cluster asymptotics that G* measures. - VtF on jackknife inputs — required, and not what
vtfdoes. In any design with few or unequal clusters or shocks, the VtF set is computed from the jackknife covariance of the reduced-form and first-stage coefficients (π̂, γ̂), built from the same leave-out fits as CV3 (and, for shift-share, from the delete-one-shock fits): F̂ = γ̂²/V̂_γγ and r̂(b₀) from that matrix, critical values looked up in the authors'vtf95.mmat, the set inverted over b₀. Stata'svtf.adocannot do this: it takes onlyrobustorcluster()and so always returns the CR1/HC1 set. Run it only as a companion row taggedVtF-CR1-robustness; a CR1 VtF that "barely widens" the printed interval is the CR1 variance agreeing with itself, not evidence of strength. With jackknife F̂ ≤ 3.84 the VtF set is unbounded; report it so. The tool lacking the option is never a reason to skip the computation or to log it as a limitation: build it by hand from the leave-out fits.check_inference.pyF6/F7 enforce this. - Null-imposed Anderson–Rubin sets — required, and not what
boottest …, ardoes. In Stata'sboottest(boottest.mata,ARubinbranch), thearoption sets the bootstrap DGP to the model constraints only (DGP.SetR(*pR1)), running an unrestricted wild bootstrap even though the output header prints "null imposed"; andboottest …, jkadds an(M_{gg}^{-1} − I)X_g t₁term to the jackknife residual that vanishes only atb₀ = 0, so any non-zero null or inverted confidence set fromboottest …, jkis not MNW's WCR-S. Build the AR set by hand: for each candidateb₀on a wide grid, form the transf