fix(callaway): IF-based per-cell SE for no-covariate doubly-robust#627
Merged
Conversation
CallawaySantAnna's no-covariate doubly-robust (dr, the default estimation_method) per-cell (g,t) SE used the ddof=1 plug-in sqrt(var_t/n_t + var_c/n_c) — the last per-cell SE not on the influence-function form sqrt(sum(phi^2)) that the reg/ipw branches and R's DRDID::drdid_panel use (O(1/n) deviation, method-dependent on the default path). Without covariates DR reduces to difference in means, so the per-cell SE is now bit-identical to the vectorized reg path. Point estimates, aggregated SEs, and event-study SEs are unchanged: the returned influence function is left byte-identical and aggregation/bootstrap already consumed it. Closes the CS-scaling Actionable TODO row. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LHDijzf8zHXk5T8ahS2mKi
|
Overall Assessment ✅ Looks good. No unmitigated P0/P1 findings. Executive Summary
Methodology
Code Quality
Performance
Maintainability
Tech Debt
Security
Documentation/Tests
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
CallawaySantAnnano-covariateestimation_method="dr"(the default method) per-cell (g,t) SE now uses the influence-function formsqrt(sum(phi^2))instead of the ddof=1 plug-insqrt(var_t/n_t + var_c/n_c)— the last per-cell SE not on the IF convention already used by the reg/ipw branches and R'sDRDID::drdid_panel(anO(1/n)deviation, and method-dependent on the default path).Methodology references (required if estimator / math changes)
DRDID::drdid_panel).docs/methodology/REGISTRY.md"CallawaySantAnna" section (DRDID IF-parity note).Validation
tests/test_methodology_callaway.py— newTestDRNoCovariateSEUniformity: reg-vs-dr per-cell effect+SE parity (atol=1e-12), a hand-calculated IF SE with a plug-in-direction sentinel, and aggregate + event-study SE invariance.overall_se, and event-study SEs unchanged. reg / ipw / DR-covariate / RCS paths byte-stable (160 tests acrosstest_methodology_callaway,test_csdid_ported,test_staggered_rc).Security / privacy
🤖 Generated with Claude Code
https://claude.ai/code/session_01LHDijzf8zHXk5T8ahS2mKi