Conversation
Standard-error parity follow-ups, each independently verified against the canonical R implementation. - HonestDiD Delta^SD (`method="smoothness"`): stop gating the FLCI on the identified-set LP. When the observed pre-trend curvature exceeds M the estimated identified set is empty (`lb`/`ub` = NaN), but the optimal FLCI is well-defined given (Sigma, M); R's createSensitivityResults returns it. Previously fit() NaN-propagated the whole result, yielding no inference on any event study with non-trivial pre-trend curvature. FLCI matches R to ~1e-3 at M=0; a known optimizer/center divergence at intermediate M (CI width unaffected) is documented in REGISTRY.md and filed in TODO.md. - ChaisemartinDHaultfoeuille phase-1 placebo (DID_M^pl): correct the point estimate sign. The single-horizon path used the opposite (forward) difference order from the multi-horizon placebo path and R, so it was sign-flipped on pure-direction panels (magnitude bit-identical). Now uses the backward-difference x switch-direction convention; joiners_only / leavers_only match R to <1e-8. Mixed-direction magnitude retains the separately-documented period-vs-cohort control-set deviation. - Unweighted clustered CR2/Bell-McCaffrey per-coefficient Satterthwaite DOF: guard against non-physical values on high-leverage FE-dummy / collinear nuisance columns (float64 noise -> ~1e61, or finite-but-inflated above the cluster count). Adds the weighted path's noise-floor guard (batch-relative criterion computed on the scale-normalized max|B|/||c||^2 so it is invariant to contrast rescaling) plus a DOF <= G physical bound. The treatment / event-study / compound-average contrasts estimators consume are unchanged and match R clubSandwich. Each carries a regression test, a REGISTRY note, and a CHANGELOG entry. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0178r8ZK6VRiXbaBiknrWjQB
Overall Assessment⛔ Blocker — one P0 inference-consistency issue remains. Executive Summary
MethodologyFinding: P0 — CR2-BM
|
The CR2/Bell-McCaffrey guard added in the previous commit can surface a non-finite (NaN) Satterthwaite DOF for a high-leverage / collinear nuisance coefficient. Two inference paths did not treat that as undefined: - `safe_inference()` rejected `df <= 0` but let a NaN `df` through (`NaN <= 0` is False), computing a finite t-stat with a NaN p-value / CI - an inconsistent, partially-finite inference tuple. It now returns all-NaN for any non-finite `df`. - `MultiPeriodDiD(vcov_type="hc2_bm")` fell back to the shared residual `df` for a period effect whose per-coefficient BM DOF was non-finite, reporting finite t/p/CI for a coefficient whose DOF was declared unreliable. It now passes the BM DOF through unconditionally on the hc2_bm path, so a non-finite DOF fails closed via `safe_inference`. The post-period-average and SunAbraham contrast paths already route their DOF through `safe_inference`, so the central guard covers them too. Only coefficients whose BM DOF is non-finite are affected; well- conditioned treatment / event-study / average contrasts are unchanged. Also rewrites the REGISTRY `DID_M^pl` placebo formula to display the backward-difference x switch-direction convention (`stable0_avg - joiner_avg` / `leaver_avg - stable1_avg`) so it matches the code and the adjacent sign note. Regression tests: non-finite `df` in `safe_inference`; monkeypatched NaN BM DOF failing closed on user-facing MPD period and average contrasts. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0178r8ZK6VRiXbaBiknrWjQB
|
🔁 AI review rerun (requested by @igerber) Head SHA: Overall Assessment✅ Looks good — no unmitigated P0 or P1 findings. Executive Summary
MethodologyFinding: P3 — Prior CR2-BM Non-Finite DOF Blocker Is ResolvedSeverity: P3 informational Finding: P3 — Documented dCDH
|
Summary
method="smoothness"): return a finite FLCI when the estimated identified set is empty (pre-trend curvature exceeds M) instead of NaN-propagating all inference. Matches RcreateSensitivityResults; previously smoothness sensitivity yielded no inference on any event study with non-trivial pre-trend curvature.ChaisemartinDHaultfoeuillephase-1 placebo (DID_M^pl): correct the point-estimate sign. The single-horizon path used the opposite (forward) difference order from the multi-horizon placebo path and R, so it was sign-flipped on pure-direction panels (magnitude bit-identical). Now uses the backward-difference × switch-direction convention.DOF ≤ Gbound.Methodology references
DID_M^pl; Bell-McCaffrey / Pustejovsky-Tipton (2018) CR2 Satterthwaite DOF.HonestDiD::createSensitivityResults; RDIDmultiplegtDYN::did_multiplegt_dyn; RclubSandwich::vcovCR/coef_test. Each fix verified against the live R implementation (HonestDiD FLCI ~1e-3 at M=0; dCDH pure-direction placebo <1e-8; CR2 treatment/event-study/compound-average contrasts match clubSandwich).Validation
tests/test_methodology_honest_did.py(empty-id-set FLCI, finite-across-M grid),tests/test_chaisemartin_dhaultfoeuille_parity.py(pure-direction placebo parity),tests/test_estimators_vcov_type.py(no-non-physical DOF, scale-invariant guard).Security / privacy
🤖 Generated with Claude Code