Commit c6d672e
Address thirtieth round of CI review findings on PR #318
P1 methodology (self-contradictory anticipation prose).
``_apply_anticipation_to_assumption`` previously only APPENDED an
anticipation-aware clause. Several base assumption descriptions in
``_describe_assumption`` hard-code a strict "plus no anticipation"
(CS / SA / Imputation / TwoStage / Wooldridge generic,
StackedDiD sub-experiment, dCDH, TripleDifference, SyntheticDiD,
TROP, ContinuousDiD) or "Also assumes no anticipation (Assumption
NA) ..." (EfficientDiD PT-All, PT-Post) clause. On an
anticipation-enabled fit BR would render both in the same paragraph,
contradicting REGISTRY.md's description of anticipation as a SHIFTED
effective treatment boundary rather than strict no-anticipation plus
an exception.
Add ``_strip_strict_no_anticipation`` that removes any of the
canonical strict phrasings from a description before the helper
appends the relaxed clause. Collapses dangling punctuation and
doubled whitespace left by the removal so the rewritten description
reads cleanly. The helper still flips ``no_anticipation = False`` and
records ``anticipation_periods`` on the block.
P3 docs drift. Round-29 added ``power_reason`` alongside
``power_status`` and updated one REPORTING.md reference, but a
second reference at line 142 still pointed at ``power_status`` for
the fallback explanation. Updated to name ``power_reason`` and note
that ``power_status`` carries the enum.
Tests: ``TestAnticipationStripsStrictNoAnticipationClause`` with
five regressions asserts that every anticipation-capable estimator's
rendered description under ``anticipation > 0`` drops both
"plus no anticipation" and "Also assumes no anticipation" AND still
carries the "Anticipation is allowed / not strict no-anticipation"
contract: generic group-time, EfficientDiD PT-All, EfficientDiD
PT-Post, StackedDiD sub-experiment, and an integration check of
``full_report()``'s rendered Identifying Assumption section.
249 BR / DR / practitioner tests pass.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 59d7df7 commit c6d672e
3 files changed
Lines changed: 148 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
| |||
822 | 823 | | |
823 | 824 | | |
824 | 825 | | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
825 | 867 | | |
826 | | - | |
827 | | - | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
828 | 871 | | |
829 | 872 | | |
830 | 873 | | |
831 | 874 | | |
832 | 875 | | |
833 | 876 | | |
834 | 877 | | |
835 | | - | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
836 | 882 | | |
837 | 883 | | |
838 | 884 | | |
| |||
849 | 895 | | |
850 | 896 | | |
851 | 897 | | |
852 | | - | |
| 898 | + | |
853 | 899 | | |
854 | 900 | | |
855 | 901 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
142 | | - | |
| 142 | + | |
| 143 | + | |
143 | 144 | | |
144 | 145 | | |
145 | 146 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1572 | 1572 | | |
1573 | 1573 | | |
1574 | 1574 | | |
| 1575 | + | |
| 1576 | + | |
| 1577 | + | |
| 1578 | + | |
| 1579 | + | |
| 1580 | + | |
| 1581 | + | |
| 1582 | + | |
| 1583 | + | |
| 1584 | + | |
| 1585 | + | |
| 1586 | + | |
| 1587 | + | |
| 1588 | + | |
| 1589 | + | |
| 1590 | + | |
| 1591 | + | |
| 1592 | + | |
| 1593 | + | |
| 1594 | + | |
| 1595 | + | |
| 1596 | + | |
| 1597 | + | |
| 1598 | + | |
| 1599 | + | |
| 1600 | + | |
| 1601 | + | |
| 1602 | + | |
| 1603 | + | |
| 1604 | + | |
| 1605 | + | |
| 1606 | + | |
| 1607 | + | |
| 1608 | + | |
| 1609 | + | |
| 1610 | + | |
| 1611 | + | |
| 1612 | + | |
| 1613 | + | |
| 1614 | + | |
| 1615 | + | |
| 1616 | + | |
| 1617 | + | |
| 1618 | + | |
| 1619 | + | |
| 1620 | + | |
| 1621 | + | |
| 1622 | + | |
| 1623 | + | |
| 1624 | + | |
| 1625 | + | |
| 1626 | + | |
| 1627 | + | |
| 1628 | + | |
| 1629 | + | |
| 1630 | + | |
| 1631 | + | |
| 1632 | + | |
| 1633 | + | |
| 1634 | + | |
| 1635 | + | |
| 1636 | + | |
| 1637 | + | |
| 1638 | + | |
| 1639 | + | |
| 1640 | + | |
| 1641 | + | |
| 1642 | + | |
| 1643 | + | |
| 1644 | + | |
| 1645 | + | |
| 1646 | + | |
| 1647 | + | |
| 1648 | + | |
| 1649 | + | |
| 1650 | + | |
| 1651 | + | |
| 1652 | + | |
| 1653 | + | |
| 1654 | + | |
| 1655 | + | |
| 1656 | + | |
| 1657 | + | |
| 1658 | + | |
| 1659 | + | |
| 1660 | + | |
| 1661 | + | |
| 1662 | + | |
| 1663 | + | |
| 1664 | + | |
| 1665 | + | |
| 1666 | + | |
| 1667 | + | |
| 1668 | + | |
| 1669 | + | |
| 1670 | + | |
1575 | 1671 | | |
1576 | 1672 | | |
1577 | 1673 | | |
| |||
0 commit comments