Commit e9bda71
Address PR #374 R1 P1 + P3: empty-state contract + bootstrap_weights wording
P1: `path_sup_t_bands` now returns `{}` (not `None`) when `by_path +
n_bootstrap > 0` is requested but `path_effects == {}` (no observed
path has a complete window). Mirrors the documented empty-state
contract used by `path_effects` and `path_placebo_event_study`.
The bug: `_collect_path_bootstrap_inputs` is gated on
`len(path_effects) > 0`, so when `path_effects == {}` the bootstrap
collector is skipped, `bootstrap_results.path_cband_crit_values` stays
`None`, and the result-class kwarg builder mapped `None` to
`path_sup_t_bands = None` — losing the requested-vs-empty distinction.
Fix: the kwarg builder now keys off `self.by_path is not None and
self.n_bootstrap > 0`. When that condition holds we always materialize
a dict (empty when no path passed both gates), reserving `None` only
for "feature not requested." When `path_cband_crit_values is None` we
treat it as the empty case for the dict comprehension.
P3: replaced "Hall-Mammen multiplier weight matrix" with neutral
"multiplier weight matrix (using the estimator's configured
`bootstrap_weights` — Rademacher / Mammen / Webb)" in CHANGELOG,
REGISTRY, helper docstring, and TestByPathSupTBands docstring. The
implementation honors `self.bootstrap_weights`, so the prose
shouldn't fix the family.
Regression test added: `test_path_sup_t_bands_empty_dict_when_no_complete_window`
on the same empty-window panel as the analytical sibling at
`test_empty_path_surface_when_no_complete_window` (`:4015+`),
asserting `path_effects == {}`, `path_sup_t_bands == {}`, and no
horizon writes a `cband_conf_int` key.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 14891c9 commit e9bda71
5 files changed
Lines changed: 100 additions & 13 deletions
File tree
- diff_diff
- docs/methodology
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3661 | 3661 | | |
3662 | 3662 | | |
3663 | 3663 | | |
| 3664 | + | |
| 3665 | + | |
| 3666 | + | |
| 3667 | + | |
| 3668 | + | |
| 3669 | + | |
| 3670 | + | |
| 3671 | + | |
| 3672 | + | |
| 3673 | + | |
| 3674 | + | |
| 3675 | + | |
| 3676 | + | |
3664 | 3677 | | |
3665 | 3678 | | |
3666 | 3679 | | |
| |||
3669 | 3682 | | |
3670 | 3683 | | |
3671 | 3684 | | |
3672 | | - | |
| 3685 | + | |
| 3686 | + | |
3673 | 3687 | | |
3674 | 3688 | | |
3675 | 3689 | | |
3676 | | - | |
| 3690 | + | |
| 3691 | + | |
| 3692 | + | |
| 3693 | + | |
| 3694 | + | |
| 3695 | + | |
3677 | 3696 | | |
3678 | 3697 | | |
3679 | | - | |
3680 | | - | |
3681 | | - | |
3682 | | - | |
| 3698 | + | |
3683 | 3699 | | |
3684 | 3700 | | |
3685 | 3701 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
782 | 782 | | |
783 | 783 | | |
784 | 784 | | |
785 | | - | |
| 785 | + | |
| 786 | + | |
786 | 787 | | |
787 | 788 | | |
788 | 789 | | |
| |||
0 commit comments