You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Guard non-finite original_effect in compute_effect_bootstrap_stats
Return all-NaN inference when the point estimate is NaN/Inf, preventing
finite SE/CI/p-value from a valid bootstrap distribution when the
estimate itself is undefined. Adds parametrized regression tests and
updates REGISTRY.md bootstrap notes for both CallawaySantAnna and
SunAbraham sections.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: docs/methodology/REGISTRY.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -347,7 +347,7 @@ The multiplier bootstrap uses random weights w_i with E[w]=0 and Var(w)=1:
347
347
- Parameter: `rank_deficient_action` controls behavior: "warn" (default), "error", or "silent"
348
348
- Non-finite inference values:
349
349
- Analytic SE: Returns NaN to signal invalid inference (not biased via zeroing)
350
-
- Bootstrap: Drops non-finite samples, warns, and adjusts p-value floor accordingly. SE, CI, and p-value are all NaN if SE is non-finite or zero (e.g., n_valid=1 with ddof=1, or identical samples)
350
+
- Bootstrap: Drops non-finite samples, warns, and adjusts p-value floor accordingly. SE, CI, and p-value are all NaN if the original point estimate is non-finite, SE is non-finite or zero (e.g., n_valid=1 with ddof=1, or identical samples)
351
351
- Threshold: Returns NaN if <50% of bootstrap samples are valid
352
352
- Per-effect t_stat: Uses NaN (not 0.0) when SE is non-finite or zero (consistent with overall_t_stat)
353
353
-**Note**: This is a defensive enhancement over reference implementations (R's `did::att_gt`, Stata's `csdid`) which may error or produce unhandled inf/nan in edge cases without informative warnings
@@ -488,7 +488,7 @@ where weights ŵ_{g,e} = n_{g,e} / Σ_g n_{g,e} (sample share of cohort g at eve
488
488
- NaN inference for undefined statistics:
489
489
- t_stat: Uses NaN (not 0.0) when SE is non-finite or zero
490
490
- Analytical inference: p_value and CI also NaN when t_stat is NaN (NaN propagates through `compute_p_value` and `compute_confidence_interval`)
491
-
- Bootstrap inference: p_value and CI computed from bootstrap distribution. SE, CI, and p-value are all NaN if SE is non-finite or zero, or if <50% of bootstrap samples are valid
491
+
- Bootstrap inference: p_value and CI computed from bootstrap distribution. SE, CI, and p-value are all NaN if the original point estimate is non-finite, SE is non-finite or zero, or if <50% of bootstrap samples are valid
492
492
- Applies to overall ATT, per-effect event study, and aggregated event study
493
493
-**Note**: Defensive enhancement matching CallawaySantAnna behavior; R's `fixest::sunab()` may produce Inf/NaN without warning
0 commit comments