Add LPDiD non-absorbing R-parity (independent feols Eq.12/13), Phase C2#587
Conversation
…hase C2 Pin the C1 non-absorbing modes (non_absorbing="first_entry"/"effect_stabilization") against an INDEPENDENT fixest::feols reconstruction of the paper's Eq. 12 / Eq. 13 clean-sample restrictions (explicit per-window indexing, derived from the paper). Variance-weighted point and SE match the library to ~1e-13/~1e-15; the reweighted point matches and its SE is pinned as a regression guard (a small weighted-cluster convention difference vs feols). The recipe's independence was demonstrated when an earlier draft's Eq. 12 control off-by-one diverged from the already-correct library and was corrected against the paper, plus a hand-computed Python micro-check. alexCardazzi/lpdid's nonabsorbing_lag is NOT a faithful Eq. 13 (it clamps treat_diff[<0]<-0 so its clean-control window blocks only turn-ons; it reuses a forward placebo window; it NA-excludes pre-panel-treated rows where the library clamps pre-min_t to untreated). It diverges ~0.01-0.05 from Eq. 13 even on a monotone no-off-switch panel, so it is recorded in the golden meta as a divergent third-party reference, not a parity gate (the alexCardazzi-pooled precedent). Verify-and-document PR, no estimator change. Separate non-absorbing panel + golden keep the B2 absorbing goldens byte-identical (verified). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Overall Assessment Executive Summary
Methodology
Code Quality
Performance
Maintainability
Tech Debt
Security
Documentation/Tests
|
…le notes - Pin the "alexCardazzi diverges even without off-switches" claim with committed evidence: the generator now records `meta.alex_monotone_post_divergence` (max |alex - Eq.13| over post horizons on the monotone no-off-switch sub-panel, 0.0344), and the test asserts it > 1e-3. The divergence is not only off-switch handling. - Generator header lists the two new non-absorbing output files. - Drop the now-stale "R-package parity (PR-C2) is a follow-up" wording from the C1 CHANGELOG entry and docs/api/lpdid.rst (this work adds it); exit-event dynamics, the Stata canonical SE, and survey support remain the deferred follow-ups. Absorbing B2 goldens remain byte-identical after regeneration. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
🔁 AI review rerun (requested by @igerber) Head SHA: Overall Assessment ✅ Looks good — no unmitigated P0/P1 findings. Executive Summary
Methodology
Code Quality No findings. Performance No findings. The new fixture is small, and the added parity tests fit a bounded set of event-study horizons. Maintainability No findings. The generator now documents both absorbing and non-absorbing outputs at Tech Debt
Security No findings. The added CSV fixture appears synthetic and contains no secrets or PII. Documentation/Tests
|
…review P3) REGISTRY's non-absorbing edge-case bullet said the pre-panel boundary convention was "an assumption to confirm against R in PR-C2"; PR-C2 has now documented it as a known divergence from alexCardazzi (which NA-excludes such first-rows). Point to Deviation #4 instead of the now-complete forward reference. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
🔁 AI review rerun (requested by @igerber) Head SHA: Overall Assessment ✅ Looks good — no unmitigated P0/P1 findings. Executive Summary
Methodology
Code Quality No findings. Performance No findings. The new committed fixture is small: 840 rows across 60 units. Maintainability No findings. The generator documents the separate absorbing/non-absorbing outputs at Tech Debt
Security No findings. The added CSV fixture appears synthetic and contains no secrets or PII. Documentation/Tests
|
Summary
non_absorbing="first_entry"Eq. 12 /"effect_stabilization"Eq. 13). Verify-and-document PR — no estimator change.fixest::feolsreconstruction of the paper's Eq. 12 and Eq. 13 clean-sample restrictions (explicit per-window indexing, derived from the paper). Variance-weighted point and SE match the library to ~1e-13 / ~1e-15; theeffect_stabilizationreweighted point matches and its SE is pinned as a regression guard (a small weighted-cluster convention difference vsfeols). The recipe's independence was demonstrated when an earlier draft's Eq. 12 control off-by-one diverged from the already-correct library and was corrected against the paper, plus a hand-computed Python micro-check.alexCardazzi/lpdid'snonabsorbing_lagis NOT a faithful Eq. 13 (it clamps off-switches viatreat_diff[<0]<-0, reuses a forward placebo window, and NA-excludes pre-panel-treated rows where the library clampspre-min_tto untreated). It diverges ~0.01-0.05 from Eq. 13 even on a monotone no-off-switch panel, so it is recorded in the goldenmetaas a divergent third-party reference, not a parity gate (the alexCardazzi-pooled precedent from B2). The library's "no treatment change" (both directions) and backward placebo window are the more paper-faithful choices.first_entry(Eq. 12) has no R-package analogue and is anchored on the independent feols recipe only.Methodology references
fixest::feolsreconstruction (primary anchor) +alexCardazzi/lpdid(pinnedba64563, recorded as a divergent reference).docs/methodology/REGISTRY.md## LPDiDDeviation Claude/setup pip install k2 m4j #4 + the goldenmeta):alexCardazzi nonabsorbing_lagdiverges from the paper's Eq. 13 (off-switch clamp + forward placebo window + boundary NA-exclude) → recorded as a divergent reference, not gated; the library is the more paper-faithful.effect_stabilizationSE: point matches feols; SE pinned (small weighted-cluster convention difference).first_entry(Eq. 12) has no R-package analogue → independent feols recipe + hand-computed Python micro-check.TODO.md).Validation
tests/test_methodology_lpdid.py— newTestLPDiDNonAbsorbingParityR(4 tests:first_entrypoint+SE,effect_stabilizationpoint+SE,effect_stabilizationreweighted point + pinned SE, and the alexCardazzi-divergence documentation check). 12 methodology tests total (8 absorbing unchanged + 4 new), green on both the pure-Python and Rust backends. Regenerate viaRscript benchmarks/R/generate_lpdid_golden.R(the absorbing B2 goldens are verified byte-identical after regeneration).Security / privacy
Generated with Claude Code