Commit 2fa90f4
feature: thread vcov_type="conley" through SunAbraham + WooldridgeDiD (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>1 parent d59039e commit 2fa90f4
12 files changed
Lines changed: 833 additions & 71 deletions
File tree
- diff_diff
- guides
- docs/methodology
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
106 | | - | |
107 | | - | |
108 | | - | |
| 106 | + | |
109 | 107 | | |
110 | 108 | | |
111 | 109 | | |
| |||
231 | 229 | | |
232 | 230 | | |
233 | 231 | | |
234 | | - | |
| 232 | + | |
235 | 233 | | |
236 | 234 | | |
237 | 235 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
212 | 212 | | |
213 | 213 | | |
214 | 214 | | |
215 | | - | |
| 215 | + | |
216 | 216 | | |
217 | 217 | | |
218 | 218 | | |
| |||
0 commit comments