LWDiD validation suite: skip-gated methodology acceptance tests + replication goldens (precursor #2 for #588)#689
Conversation
…il PR #588 lands) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FZK3FD9jxWGxBrPDw5APSg
Overall Assessment✅ Looks good — no unmitigated P0/P1 findings. Executive Summary
MethodologyNo P0/P1 findings. P3 — Forward-looking xfail gates must be removed before LWDiD acceptanceLocation: Impact: Several methodology-critical checks are currently xfail-marked: IPW IF centering, composite-regression overall SE, Concrete fix: In the estimator PR, remove the relevant xfail marker in the same commit that implements each requirement. For the non-strict event-study SE golden marker, either make it strict or replace it with a deterministic tolerance/seed strategy before relying on it as a regression guard. Code QualityNo findings. The helper implementations are local, readable, and scoped to validation. The from-scratch references use direct formulas rather than estimator internals, which is appropriate for methodology tests. PerformanceNo blocking findings. P3 — Slow Monte Carlo is correctly markedLocation: Impact: The 200-rep Monte Carlo is excluded from default pytest via the existing Concrete fix: No action required. MaintainabilityNo findings. The REGISTRY note at Tech DebtNo blocking findings. P3 — Real-data canary is trackedLocation: Impact: Prop 99 and Walmart tests skip when loaders fall back to synthetic data, so a CI network/source issue could reduce coverage. This is explicitly tracked in TODO.md. Concrete fix: No PR-blocking action required; implement the TODO canary in a follow-up CI change. SecurityNo findings. The new committed CSV/JSON data appear to be public replication artifacts and contain no obvious secrets or private identifiers. Documentation/TestsNo blocking findings. Validation performed:
I could not run pytest end-to-end in this sandbox because pandas is not installed, and bytecode compilation could not write |
Summary
tests/test_methodology_lwdid.py: import-skip-gated ondiff_diff.lwdid- collects and skips cleanly on main (zero estimator code exists here); activates automatically when feat: add LWDiD estimator (Lee & Wooldridge 2025, 2026) #588's branch rebases onto main. xfail markers (first use in this codebase; semantics documented in the module docstring) encode feat: add LWDiD estimator (Lee & Wooldridge 2025, 2026) #588's agreed outstanding work as executable acceptance criteria: strict markers must be removed by the commits that fix each item.benchmarks/data/lwdid_walmart_eventstudy_golden.json: Tables A4/A5 (14 relative periods x 5 estimator columns, ATT + bootstrap SE), extracted from the June 8 2026 SSRN revision via dual-mode pdftotext with anchor cross-checks; provenance (incl. PDF SHA-256) embedded.benchmarks/data/real/castle_lw_subset.csv: the real Cheng & Hoekstra (2013) panel (Cunningham 2021 packaging; 50 states, 2000-2010, cohorts {2005:1, 2006:13, 2007:4, 2008:2, 2009:1},lhomicideoutcome), following thebenchmarks/data/real/precedent. Committed because thecausaldata/causal_datasetsrepo backingload_castle_doctrineis dead (404) - that silent-synthetic loader defect is now tracked as a Medium TODO row for a follow-up source PR.Methodology references (required if estimator / math changes)
lwdid, ri.Validation
tests/test_methodology_lwdid.py(10 classes, 49 tests). On main: 1 module skip (verified). Against feat: add LWDiD estimator (Lee & Wooldridge 2025, 2026) #588's current head (calibration graft): 30 passed, 18 xfailed, slow Monte Carlo passes. Every xfail was calibrated against actual behavior, not assumed.Security / privacy
Generated with Claude Code