|
65 | 65 | "placebo", |
66 | 66 | ) |
67 | 67 |
|
68 | | -# Type-level applicability: which checks are *ever* applicable for each of the |
69 | | -# 16 result types. Instance-level applicability further filters by whether |
| 68 | +# Type-level applicability: which checks are *ever* applicable for each |
| 69 | +# registered result type. Instance-level applicability further filters by whether |
70 | 70 | # required attributes are present (e.g. ``survey_metadata`` for DEFF) and by |
71 | 71 | # whether the user disabled a check via ``run_*=False``. |
72 | 72 | # See ``docs/methodology/REPORTING.md`` for the full matrix and rationale. |
73 | 73 | # |
74 | 74 | # Implementation note: The keys are result-class names looked up via |
75 | 75 | # ``type(results).__name__``. This string-based dispatch mirrors the |
76 | 76 | # ``_HANDLERS`` pattern in ``diff_diff/practitioner.py`` and avoids circular |
77 | | -# imports across the 16 result modules. Renaming or aliasing any result class |
| 77 | +# imports across the result modules. Renaming or aliasing any result class |
78 | 78 | # requires updating both this table and ``_PT_METHOD`` below; the |
79 | 79 | # applicability-matrix test parametrized over all result types serves as the |
80 | 80 | # regression guard. |
|
131 | 131 | "heterogeneity", |
132 | 132 | } |
133 | 133 | ), |
| 134 | + "SpilloverDiDResults": frozenset( |
| 135 | + # Butts (2021) ring-indicator spillover DiD is a two-stage-GMM |
| 136 | + # estimator, so it inherits TwoStage's diagnostic set MINUS |
| 137 | + # ``bacon``. ``bacon`` is excluded because SpilloverDiD identifies |
| 138 | + # the direct effect off FAR-AWAY units (Butts Assumption 5), not |
| 139 | + # off the TWFE 2x2 comparisons a Goodman-Bacon decomposition |
| 140 | + # enumerates: ``bacon_decompose`` on the raw binary treatment |
| 141 | + # ignores the ring/distance structure and would pool spillover- |
| 142 | + # contaminated in-ring units into the control group — the exact |
| 143 | + # SUTVA violation the estimator exists to handle (same rationale |
| 144 | + # that excludes bacon for SyntheticControl / TROP / Continuous). |
| 145 | + # ``parallel_trends`` routes to ``event_study`` on the per-event- |
| 146 | + # time DIRECT-effect dynamics (populated when ``event_study=True``); |
| 147 | + # ``design_effect`` is instance-gated on ``survey_metadata`` (Wave |
| 148 | + # E.1); ``heterogeneity`` reads ``event_study_effects``. |
| 149 | + { |
| 150 | + "parallel_trends", |
| 151 | + "design_effect", |
| 152 | + "heterogeneity", |
| 153 | + } |
| 154 | + ), |
134 | 155 | "StackedDiDResults": frozenset( |
135 | 156 | { |
136 | 157 | "parallel_trends", |
|
218 | 239 | "SunAbrahamResults": "event_study", |
219 | 240 | "ImputationDiDResults": "event_study", |
220 | 241 | "TwoStageDiDResults": "event_study", |
| 242 | + "SpilloverDiDResults": "event_study", |
221 | 243 | "StackedDiDResults": "event_study", |
222 | 244 | "EfficientDiDResults": "hausman", |
223 | 245 | "ContinuousDiDResults": "event_study", |
@@ -263,7 +285,7 @@ class DiagnosticReport: |
263 | 285 | ---------- |
264 | 286 | results : Any |
265 | 287 | A fitted diff-diff results object (e.g. ``CallawaySantAnnaResults``, |
266 | | - ``DiDResults``, ``SyntheticDiDResults``). Any of the 16 result types |
| 288 | + ``DiDResults``, ``SyntheticDiDResults``). Any registered result type |
267 | 289 | in the library is accepted. |
268 | 290 | data : pandas.DataFrame, optional |
269 | 291 | The underlying panel. Required for checks that need raw data |
@@ -703,6 +725,19 @@ def _instance_skip_reason(self, check: str) -> Optional[str]: |
703 | 725 | # summary emits the "inconclusive" identifying- |
704 | 726 | # assumption warning rather than silently dropping PT. |
705 | 727 | if not pre_coefs and n_dropped_undefined == 0: |
| 728 | + # SpilloverDiD's event-study switch is the |
| 729 | + # ``SpilloverDiD(..., event_study=True)`` constructor |
| 730 | + # kwarg, not the ``aggregate='event_study'`` argument |
| 731 | + # the generic staggered-estimator message points at |
| 732 | + # (SpilloverDiD has no ``aggregate`` kwarg). Emit an |
| 733 | + # estimator-accurate remediation for this family. |
| 734 | + if name == "SpilloverDiDResults": |
| 735 | + return ( |
| 736 | + "No pre-period event-study coefficients are exposed " |
| 737 | + "on this fit. Re-fit with " |
| 738 | + "SpilloverDiD(..., event_study=True) to populate the " |
| 739 | + "per-event-time direct-effect output." |
| 740 | + ) |
706 | 741 | return ( |
707 | 742 | "No pre-period event-study coefficients are exposed on " |
708 | 743 | "this fit. For staggered estimators, re-fit with " |
|
0 commit comments