Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
5b5b3bd
spillover-tva: T23 SpilloverDiD tutorial + drift tests
igerber May 25, 2026
0dbdec5
spillover-tva: address codex P1+P2 — TWFE absorb + Conley §6 rewrite
igerber May 25, 2026
203e0f1
spillover-tva: address codex R2 P3 — §6 terminology (no-survey Conley)
igerber May 25, 2026
10b5400
spillover-tva: address codex R3 P2+P3 — warning hygiene + §4 wording
igerber May 25, 2026
6b10e7e
spillover-tva: address codex R4 P1+P2 — pairwise Conley + narrow warn…
igerber May 25, 2026
9d3df8d
spillover-tva: address codex R5 P2 — finish narrow-warning pass
igerber May 25, 2026
8b578d3
spillover-tva: address codex R6 P2 — §6 Conley<HC1 sign-agnostic prose
igerber May 25, 2026
eb5feae
spillover-tva: address codex R7 P2 — exact warning-surface contract
igerber May 25, 2026
f0dd836
spillover-tva: address codex R8 P2 — pin exact warning multiplicity
igerber May 25, 2026
df9250c
spillover-tva: address codex R9 P3 — geometry numbers + CHANGELOG count
igerber May 25, 2026
4ddecd2
spillover-tva: address CI codex P1 — platform-agnostic warning policy
igerber May 25, 2026
77bd3b1
spillover-tva: address CI codex R2 P3 — pin delta_1 identity in d_bar…
igerber May 25, 2026
25715ce
spillover-tva: address CI codex R3 P3s — README + CHANGELOG count
igerber May 25, 2026
28d7687
spillover-tva: address CI codex R4 P2+P3 — verbatim-sync + geometry pins
igerber May 25, 2026
ff0b655
spillover-tva: address CI codex R5 P3s — geometry prose + 2 pins + count
igerber May 25, 2026
f5381ad
spillover-tva: address CI codex R6 P2 — notebook constant-sync guard
igerber May 25, 2026
89ea929
spillover-tva: address CI codex R7 P2 — 2-decimal precision contract
igerber May 25, 2026
75508ea
spillover-tva: address CI codex R8 P3s — Conley prose + CHANGELOG pre…
igerber May 25, 2026
29d1e14
spillover-tva: address CI codex R9 P3 — split Butts §3.1 vs Wave E.2 …
igerber May 25, 2026
e16668f
spillover-tva: address CI codex R10 P3 — DGP-specific d_bar identity …
igerber May 25, 2026
eda04c0
spillover-tva: address CI codex R11 P3 — §7 Wave E.2 vs follow-up
igerber May 25, 2026
c3fd1de
spillover-tva: fix CI failure — skip notebook-loading guards when sou…
igerber May 25, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@ Deferred items from PR reviews that were not addressed before merge.
| `SpilloverDiD(vcov_type="conley", conley_lag_cutoff > 0, survey_design=...)` no-effective-PSU serial Bartlett HAC. Wave E.2 follow-up ships the panel-block composition when an effective PSU exists (explicit `survey_design.psu` OR injected via `cluster=<col>` per `_inject_cluster_as_psu`). Weights-only / strata-only survey designs WITHOUT a cluster fallback raise `NotImplementedError` at `SpilloverDiD.fit` post-resolution because under the pseudo-PSU = obs-index fallback each pseudo-PSU appears in exactly one period — the per-PSU serial cross-period loop would silently contribute zero. Fix would either derive a unit-level serial fallback for no-PSU designs (mixes IF allocators with the pseudo-PSU spatial term — needs methodology work) or route the serial loop through `conley_unit` with explicit documentation of the IF-allocator asymmetry. Regression goldens vs the effective-PSU shipped path. | `spillover.py::SpilloverDiD.fit`, `two_stage.py::_compute_stratified_serial_bartlett_meat` | follow-up (Wave E.2 follow-up tail) | Low |
| `SpilloverDiD(ring_method="count")` extension. Currently only the nearest-treated-ring specification is exposed. Count-of-treated-in-ring (paper Section 3.2 end) is methodologically supported by Butts but re-introduces functional-form dependence; expose with an explicit kwarg gate and documentation warning. | `spillover.py::SpilloverDiD.fit` | follow-up | Low |
| `SpilloverDiD` data-driven `d_bar` selection (Butts 2021b / Butts 2023 JUE Insight cross-validation). | `spillover.py::SpilloverDiD` | follow-up | Low |
| `SpilloverDiD` T22 TVA tutorial (`docs/tutorials/22_spillover_did.ipynb`): synthetic TVA-style DGP reproducing Butts (2021) Section 4 Table 1 Panel A bias-correction direction (~40% understatement). Split from the methodology PR per user-confirmed scope split (2026-05-15). | `docs/tutorials/`, `tests/test_t22_*_drift.py` | follow-up (Wave B) | Medium |
| Extend `TwoStageDiD` with Conley vcov as a first-class feature (mirrors Wave A's TWFE/MPD/DiD extension). Currently `TwoStageDiD.__init__` lacks `vcov_type` / `conley_*` kwargs; `SpilloverDiD` works around this by threading Conley directly via `solve_ols` at stage 2. Promoting Conley to TwoStageDiD's API removes the workaround and lets non-spillover users access Conley + Gardner two-stage. | `diff_diff/two_stage.py` | follow-up | Medium |
| `SpilloverDiD` sparse cKDTree path for the staggered nearest-treated-distance helper (mirrors the static helper's sparse branch). Currently `_compute_nearest_treated_distance_staggered` always builds dense `(n_units, n_treated_by_onset)` pairwise distance matrices per cohort; on large staggered panels with many cohorts this is avoidable memory/runtime. Add a sparse k-d-tree branch analogous to `_compute_nearest_treated_distance_sparse`, gated on `n > _CONLEY_SPARSE_N_THRESHOLD`. | `spillover.py::_compute_nearest_treated_distance_staggered` | follow-up (Wave B) | Low |
| `SpilloverDiDResults` in `DiagnosticReport` dispatch tables. Wave C event-study emits a TwoStageDiD-compatible `event_study_effects: Dict[int, Dict]` alias that `plot_event_study` consumes via the new `reference_period` attribute fallback in `_extract_plot_data`, but `SpilloverDiDResults` is NOT registered in `DiagnosticReport`'s `_APPLICABILITY` / `_PT_METHOD` tables — so `DiagnosticReport(spillover_result)` doesn't currently route to event-study diagnostics. Registering requires (a) deciding which diagnostics apply (parallel trends, pre-trends power, heterogeneity, design-effect) AND (b) adding an end-to-end test. | `diff_diff/diagnostic_report.py::_APPLICABILITY`, `_PT_METHOD` | follow-up (Wave C) | Low |
Expand Down
1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ Quick Links
tutorials/20_had_brand_campaign
tutorials/21_had_pretest_workflow
tutorials/22_had_survey_design
tutorials/23_spillover_tva

.. toctree::
:maxdepth: 1
Expand Down
2 changes: 1 addition & 1 deletion docs/methodology/papers/butts-2021-review.md
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ where `D^k_{it} := D_i * 1{K_it = k}` and `K_it` is years since treatment turned
- Agriculture employment: standard DiD = -5.1% per decade. With spillovers controlled, total effect = -7.4% per decade. **Spillover bias = +2.3 pp; canonical DiD UNDERESTIMATED the agricultural decline by ~40%.** Spillover-on-control coefficients are negative (-3.7%, -1.6%, -3.0%, -1.6% per decade across the 4 distance bins) — consistent with farm-worker out-migration to higher-paying TVA manufacturing jobs.
- Manufacturing employment: standard DiD = +5.6% per decade. With spillovers controlled, total effect = +3.5% per decade. **Spillover bias = +2.1 pp; canonical DiD OVERESTIMATED the manufacturing gain by ~40%.** Spillover coefficients are negative (-2.0%, -2.5%, -3.3%, -3.0%), consistent with "urban shadow" effects whereby firms relocate INTO the TVA from neighboring areas.
- Interpretation (page 21): "the long-run spillovers cause the original estimates to be about 40 percent too small for agriculture employment and 40 percent too large for manufacturing employment."
- Useful design choice for diff-diff T22 tutorial DGP: a TVA-style bias-correction percentage of ~40% is large enough to be visible without being implausible.
- Useful design choice for diff-diff T23 tutorial DGP: a TVA-style bias-correction percentage of ~40% is large enough to be visible without being implausible. (Tutorial slot 22 went to `22_had_survey_design.ipynb`; SpilloverDiD landed in slot 23 — `docs/tutorials/23_spillover_tva.ipynb`.)

### Empirical illustration — Opportunity Zones (Appendix B)
- Application: revisits Chen, Glaeser, and Wessel (2021) on the 2017 federal Opportunity Zone program's effect on home prices.
Expand Down
6 changes: 5 additions & 1 deletion docs/references.rst
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,11 @@ Multi-Period and Staggered Adoption

- **Butts, K. (2023).** "Difference-in-Differences with Spatial Spillovers." *arXiv:2105.03737v3* (originally posted 2021). https://arxiv.org/abs/2105.03737

Identifies the ring-indicator estimator implemented in our ``SpilloverDiD`` class. Section 2-3 covers non-staggered timing (Equations 5/6/8); Section 5 covers staggered timing via two-stage Gardner (Table 2). Section 3.1 (page 13) recommends Conley spatial-HAC for inference with cutoff = ``d_bar``.
Identifies the ring-indicator estimator implemented in our ``SpilloverDiD`` class. Section 2-3 covers non-staggered timing (Equations 5/6/8); Section 5 covers staggered timing via two-stage Gardner (Table 2). Section 3.1 (page 13) recommends Conley spatial-HAC for inference with cutoff = ``d_bar``. Section 4 Table 1 Panel A (TVA agriculture) is the empirical anchor for tutorial ``docs/tutorials/23_spillover_tva.ipynb`` (~40% understatement direction).

- **Kline, P., & Moretti, E. (2014).** "Local Economic Development, Agglomeration Economies, and the Big Push: 100 Years of Evidence from the Tennessee Valley Authority." *The Quarterly Journal of Economics*, 129(1), 275-331. https://doi.org/10.1093/qje/qjt034

Original Tennessee Valley Authority application that Butts (2021) §4 revisits to illustrate spillover bias in the canonical place-based-intervention DiD. Cited as the motivating real-world example in ``docs/tutorials/23_spillover_tva.ipynb``.

- **Conley, T. G. (1999).** "GMM Estimation with Cross Sectional Dependence." *Journal of Econometrics*, 92(1), 1-45. https://doi.org/10.1016/S0304-4076(98)00084-0

Expand Down
Loading
Loading