Commit 9cb5f26
fix(staggered): rank-0 centered reg bread collapses to zero correction, not NaN
CI review P1: with a constant as the ONLY reg covariate the centered
estimation-effect Gram is rank-0, and _safe_inv's all-NaN sentinel
NaN-poisoned per-cell/aggregated SEs for cells whose intercept-only
projection is fully identified (pre-fix raw-Gram column-drop and the
no-covariate fit both give finite SEs). New _centered_or_bread helper
(shared by all three reg sites) maps the rank-0 sentinel to a zero
correction - proj collapses to 1/sum(W_c), equal to the no-covariate
fit - while partial deficiency and the aggregate rank-guard warning
are unchanged. ipw/dr breads are over [1, X] and keep NaN propagation
(true pathology); the rank-0 monkeypatch test is re-scoped to ipw/dr
with constant-only reg equivalence tests (unweighted + survey) added.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01X4AzrFUMqJxcUumSH31mSr1 parent ff3761c commit 9cb5f26
3 files changed
Lines changed: 111 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1437 | 1437 | | |
1438 | 1438 | | |
1439 | 1439 | | |
1440 | | - | |
1441 | | - | |
1442 | | - | |
1443 | | - | |
| 1440 | + | |
1444 | 1441 | | |
1445 | 1442 | | |
1446 | 1443 | | |
| |||
1604 | 1601 | | |
1605 | 1602 | | |
1606 | 1603 | | |
1607 | | - | |
1608 | | - | |
1609 | | - | |
1610 | | - | |
| 1604 | + | |
1611 | 1605 | | |
1612 | 1606 | | |
1613 | 1607 | | |
| |||
2616 | 2610 | | |
2617 | 2611 | | |
2618 | 2612 | | |
| 2613 | + | |
| 2614 | + | |
| 2615 | + | |
| 2616 | + | |
| 2617 | + | |
| 2618 | + | |
| 2619 | + | |
| 2620 | + | |
| 2621 | + | |
| 2622 | + | |
| 2623 | + | |
| 2624 | + | |
| 2625 | + | |
| 2626 | + | |
| 2627 | + | |
| 2628 | + | |
| 2629 | + | |
| 2630 | + | |
| 2631 | + | |
| 2632 | + | |
| 2633 | + | |
| 2634 | + | |
2619 | 2635 | | |
2620 | 2636 | | |
2621 | 2637 | | |
| |||
2704 | 2720 | | |
2705 | 2721 | | |
2706 | 2722 | | |
2707 | | - | |
2708 | | - | |
2709 | | - | |
2710 | | - | |
| 2723 | + | |
2711 | 2724 | | |
2712 | 2725 | | |
2713 | 2726 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
523 | 523 | | |
524 | 524 | | |
525 | 525 | | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
526 | 535 | | |
527 | 536 | | |
528 | 537 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1655 | 1655 | | |
1656 | 1656 | | |
1657 | 1657 | | |
1658 | | - | |
| 1658 | + | |
1659 | 1659 | | |
1660 | 1660 | | |
1661 | 1661 | | |
1662 | 1662 | | |
1663 | | - | |
1664 | | - | |
1665 | | - | |
1666 | | - | |
1667 | | - | |
| 1663 | + | |
| 1664 | + | |
| 1665 | + | |
| 1666 | + | |
| 1667 | + | |
| 1668 | + | |
| 1669 | + | |
| 1670 | + | |
| 1671 | + | |
1668 | 1672 | | |
1669 | 1673 | | |
1670 | 1674 | | |
| |||
2020 | 2024 | | |
2021 | 2025 | | |
2022 | 2026 | | |
| 2027 | + | |
| 2028 | + | |
| 2029 | + | |
| 2030 | + | |
| 2031 | + | |
| 2032 | + | |
| 2033 | + | |
| 2034 | + | |
| 2035 | + | |
| 2036 | + | |
| 2037 | + | |
| 2038 | + | |
| 2039 | + | |
| 2040 | + | |
| 2041 | + | |
| 2042 | + | |
| 2043 | + | |
| 2044 | + | |
| 2045 | + | |
| 2046 | + | |
| 2047 | + | |
| 2048 | + | |
| 2049 | + | |
| 2050 | + | |
| 2051 | + | |
| 2052 | + | |
| 2053 | + | |
| 2054 | + | |
| 2055 | + | |
| 2056 | + | |
| 2057 | + | |
| 2058 | + | |
| 2059 | + | |
| 2060 | + | |
| 2061 | + | |
| 2062 | + | |
| 2063 | + | |
| 2064 | + | |
| 2065 | + | |
| 2066 | + | |
| 2067 | + | |
| 2068 | + | |
| 2069 | + | |
| 2070 | + | |
| 2071 | + | |
| 2072 | + | |
| 2073 | + | |
| 2074 | + | |
| 2075 | + | |
| 2076 | + | |
| 2077 | + | |
| 2078 | + | |
| 2079 | + | |
| 2080 | + | |
| 2081 | + | |
| 2082 | + | |
| 2083 | + | |
| 2084 | + | |
| 2085 | + | |
| 2086 | + | |
| 2087 | + | |
| 2088 | + | |
| 2089 | + | |
| 2090 | + | |
| 2091 | + | |
| 2092 | + | |
| 2093 | + | |
2023 | 2094 | | |
2024 | 2095 | | |
2025 | 2096 | | |
| |||
0 commit comments