{{ message }}
Thread vcov_type="conley" through SunAbraham + WooldridgeDiD (defer StackedDiD)#503
Merged
Conversation
b05a57b to
5c378f5
Compare
|
🔁 AI review rerun (requested by @igerber) Head SHA: Overall Assessment ✅ Looks good Executive Summary
Methodology
Code Quality
Performance
Maintainability
Tech Debt
Security
Documentation/Tests
|
5c378f5 to
e6e1771
Compare
|
🔁 AI review rerun (requested by @igerber) Head SHA: Overall Assessment ✅ Looks good Executive Summary
Methodology
Code Quality
Performance
Maintainability
Tech Debt
Security
Documentation/Tests
|
… (defer StackedDiD) Thread Conley (1999) spatial-HAC variance through SunAbraham and WooldridgeDiD-OLS, mirroring the verified DiD/MPD/TWFE conley path. Pure threading — reuses the existing, already-conleyreg-validated solve_ols / conley.py machinery; no new variance code. Both estimators: - accept vcov_type="conley" + 5 conley_* constructor params (conley_coords, conley_cutoff_km, conley_metric, conley_kernel, conley_lag_cutoff) in __init__ + get_params/set_params - call the shared conley._validate_conley_estimator_inputs front-door gate (rejects conley + survey_design; checks coords/cutoff/unit/lag/cluster columns) with a literal inference="analytical" (neither estimator has a self.inference attr) - reject conley + n_bootstrap>0 (the multiplier/pairs bootstrap overrides the analytical sandwich; the shared validator only knows about wild_bootstrap) - route conley through the within-transform (FWL) path; build coord/time/unit arrays from the post-filter regression frame, row-aligned to the design - drop the unit auto-cluster on the conley path (an explicit cluster= enables the spatial+cluster product kernel) - carry conley_lag_cutoff on Results + a Conley variance-label line in summary() (SunAbrahamResults also gains cluster_name) WooldridgeDiD conley is OLS-path-only (the method != "ols" guard keeps it off logit/poisson). Existing SEs stay bit-identical (conley is purely additive). StackedDiD conley is NOT threaded — deferred for a methodology reason (the stacked design replicates units across sub-experiments, so Conley would see same-unit copies at distance 0; no conleyreg anchor; paper-gated). The prior "same shape as the SunAbraham follow-up" framing is corrected in the rejection message, REGISTRY, and TODO. Tests (tests/test_conley_vcov.py TestConleySunAbraham / TestConleyWooldridge): smoke (cross-sectional + panel finite SE, label, metadata), FWL-composability (the within-transform conley SE equals a full-dummy [intercept, treated*post, C(unit), C(time)] solve_ols conley SE at atol 1e-7 — the primary, non-tautological correctness anchor), conley+cluster product kernel, rejections (survey / n_bootstrap / weights / malformed validator inputs / logit), unbalanced-panel alignment, get/set_params round-trip. Docs: REGISTRY SA + WooldridgeDiD sections flipped to supported + a distinct non-survey OLS-sandwich entry in the Conley deferral-status note; CHANGELOG Added; TODO rows resolved + StackedDiD reclassified; llms-full.txt + param docstrings. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
e6e1771 to
2fa90f4
Compare
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
vcov_type="conley"(Conley 1999 spatial-HAC) through SunAbraham and WooldridgeDiD-OLS, mirroring the verified DiD/MPD/TWFE conley path. Pure threading — reuses the existing, already-conleyreg-validatedsolve_ols/conley.pymachinery (no new variance code).conley_*constructor params +get_params/set_params; the shared_validate_conley_estimator_inputsfront-door gate; rejectconley+survey_design/weights/n_bootstrap>0; route conley through the within-transform (FWL) path with row-aligned coord/time/unit arrays built from the post-filter regression frame; drop the unit auto-cluster on the conley path (an explicitcluster=enables the spatial+cluster product kernel); Results gainconley_lag_cutoff+ a Conley variance-label line insummary()(SunAbrahamResultsalso gainscluster_name). WooldridgeDiD conley is OLS-path-only (method ∈ {logit, poisson}stays rejected). Existing SEs are bit-identical (conley is purely additive on the math).conleyreganalogue; paper-gated). Its prior "same shape as the SunAbraham follow-up" framing is corrected in the rejection message, REGISTRY, and TODO.Methodology references (required if estimator / math changes)
conleyreg(Düsterhöft 2021, CRAN v0.1.9). Seedocs/methodology/REGISTRY.md§ConleySpatialHAC and the SunAbraham / WooldridgeDiD variance-family sections.Validation
tests/test_conley_vcov.py(TestConleySunAbraham/TestConleyWooldridge) — the FWL-composability anchor (estimator within-transform conley SE == a hand-built full-dummy[intercept, treated*post, C(unit), C(time)]solve_olsconley SE atatol≈1e-7), within-period-spatial vs panel-serial paths, spatial+cluster product kernel, every rejection (survey / weights /n_bootstrap/logit/ malformed validator inputs), unbalanced-panel alignment,cohort_trends=True(full-dummy), aggregations (group/calendar/event, incl. the cohort_trends combination), multi-cohort IW + delta-method event-study,control_group="never_treated", and get/set_params round-trip. Updated two stale conley-rejected-at-init tests (test_sun_abraham.py,test_wooldridge.py). 403 tests pass.--force-fresh) — ✅ approved and defect-free across 5 rounds; every finding was test-coverage or doc-wording (all addressed).Security / privacy
🤖 Generated with Claude Code