Commit 7743b5c
Address thirty-fifth round of CI review findings on PR #318
P1 methodology (inconclusive PT prose missing). Rounds 33-34 made
the event-study PT schema emit ``verdict="inconclusive"`` whenever
pre-period inference is undefined (zero / negative SE, non-finite
per-period p-value). But neither ``BusinessReport.summary()`` nor
``DiagnosticReport.summary()`` / ``overall_interpretation`` had an
``elif verdict == "inconclusive"`` branch, so the PT sentence was
silently omitted from the primary prose output. A missing sentence
is indistinguishable from "PT did not run" and drops the
identifying-assumption diagnostic from stakeholder output.
Add explicit inconclusive branches on both surfaces. When
``n_dropped_undefined`` is available, the sentence quotes the
count ("3 pre-period rows had undefined inference"); otherwise
falls back to a generic "pre-period inference was undefined"
clause. Both surfaces now close with "Treat parallel trends as
unassessed" so the stakeholder takeaway is explicit.
P2 code quality (DEFF ``deff < 0.95`` directional bug). The
``is_trivial`` flag required ``0.95 <= deff <= 1.05`` while
``band_label`` treated anything ``< 1.05`` as trivial. BR's
summary keyed off ``not is_trivial`` and narrated "Survey design
reduces effective sample size" for ``deff < 0.95``, which is
directionally wrong — a precision-improving design has LARGER
effective N than nominal N. Two fixes:
* Add a dedicated ``band_label="improves_precision"`` enum
value for ``deff < 0.95`` so the schema carries the direction
explicitly;
* Split BR's summary rendering: ``deff < 1.0`` -> "improves
effective sample size"; ``deff >= 1.0`` -> "reduces effective
sample size".
``is_trivial`` stays at ``0.95 <= deff <= 1.05`` (the tight
"effectively no effect" window).
P2 coverage. Round-33/34 regressions only asserted absence of
false-clean "do not reject" wording; that assertion still passes
even when the PT sentence disappears entirely. Added positive
regressions:
* ``test_summary_prose_surfaces_inconclusive_pt_explicitly``
asserts both ``DiagnosticReport.summary()`` and
``BusinessReport.summary()`` contain the word "inconclusive"
on a Bonferroni-only surface with a NaN per-period p-value;
* ``test_design_effect_deff_below_95_uses_improves_precision_wording``
pins the new ``band_label`` enum value AND the BR summary
"improves effective sample size" wording.
332 BR / DR / practitioner / pretrends tests pass.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 94e9110 commit 7743b5c
3 files changed
Lines changed: 164 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1758 | 1758 | | |
1759 | 1759 | | |
1760 | 1760 | | |
| 1761 | + | |
| 1762 | + | |
| 1763 | + | |
| 1764 | + | |
| 1765 | + | |
| 1766 | + | |
| 1767 | + | |
| 1768 | + | |
| 1769 | + | |
| 1770 | + | |
| 1771 | + | |
| 1772 | + | |
| 1773 | + | |
| 1774 | + | |
| 1775 | + | |
| 1776 | + | |
| 1777 | + | |
| 1778 | + | |
| 1779 | + | |
| 1780 | + | |
| 1781 | + | |
| 1782 | + | |
| 1783 | + | |
| 1784 | + | |
| 1785 | + | |
| 1786 | + | |
| 1787 | + | |
1761 | 1788 | | |
1762 | 1789 | | |
1763 | 1790 | | |
| |||
1877 | 1904 | | |
1878 | 1905 | | |
1879 | 1906 | | |
1880 | | - | |
1881 | | - | |
1882 | | - | |
1883 | | - | |
| 1907 | + | |
| 1908 | + | |
| 1909 | + | |
| 1910 | + | |
| 1911 | + | |
| 1912 | + | |
| 1913 | + | |
| 1914 | + | |
| 1915 | + | |
| 1916 | + | |
| 1917 | + | |
| 1918 | + | |
| 1919 | + | |
| 1920 | + | |
| 1921 | + | |
1884 | 1922 | | |
1885 | 1923 | | |
1886 | 1924 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1585 | 1585 | | |
1586 | 1586 | | |
1587 | 1587 | | |
| 1588 | + | |
| 1589 | + | |
| 1590 | + | |
| 1591 | + | |
| 1592 | + | |
| 1593 | + | |
| 1594 | + | |
| 1595 | + | |
| 1596 | + | |
| 1597 | + | |
| 1598 | + | |
1588 | 1599 | | |
1589 | 1600 | | |
1590 | 1601 | | |
| 1602 | + | |
| 1603 | + | |
1591 | 1604 | | |
1592 | 1605 | | |
1593 | 1606 | | |
| |||
2846 | 2859 | | |
2847 | 2860 | | |
2848 | 2861 | | |
| 2862 | + | |
| 2863 | + | |
| 2864 | + | |
| 2865 | + | |
| 2866 | + | |
| 2867 | + | |
| 2868 | + | |
| 2869 | + | |
| 2870 | + | |
| 2871 | + | |
| 2872 | + | |
| 2873 | + | |
| 2874 | + | |
| 2875 | + | |
| 2876 | + | |
| 2877 | + | |
| 2878 | + | |
| 2879 | + | |
| 2880 | + | |
| 2881 | + | |
| 2882 | + | |
| 2883 | + | |
| 2884 | + | |
| 2885 | + | |
2849 | 2886 | | |
2850 | 2887 | | |
2851 | 2888 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1168 | 1168 | | |
1169 | 1169 | | |
1170 | 1170 | | |
| 1171 | + | |
| 1172 | + | |
| 1173 | + | |
| 1174 | + | |
| 1175 | + | |
| 1176 | + | |
| 1177 | + | |
| 1178 | + | |
| 1179 | + | |
| 1180 | + | |
| 1181 | + | |
| 1182 | + | |
| 1183 | + | |
| 1184 | + | |
| 1185 | + | |
| 1186 | + | |
| 1187 | + | |
| 1188 | + | |
| 1189 | + | |
| 1190 | + | |
| 1191 | + | |
| 1192 | + | |
| 1193 | + | |
| 1194 | + | |
| 1195 | + | |
| 1196 | + | |
| 1197 | + | |
| 1198 | + | |
| 1199 | + | |
| 1200 | + | |
| 1201 | + | |
| 1202 | + | |
| 1203 | + | |
| 1204 | + | |
| 1205 | + | |
| 1206 | + | |
| 1207 | + | |
| 1208 | + | |
| 1209 | + | |
| 1210 | + | |
| 1211 | + | |
| 1212 | + | |
| 1213 | + | |
| 1214 | + | |
| 1215 | + | |
| 1216 | + | |
| 1217 | + | |
| 1218 | + | |
| 1219 | + | |
| 1220 | + | |
| 1221 | + | |
| 1222 | + | |
| 1223 | + | |
| 1224 | + | |
| 1225 | + | |
| 1226 | + | |
| 1227 | + | |
| 1228 | + | |
| 1229 | + | |
| 1230 | + | |
| 1231 | + | |
| 1232 | + | |
| 1233 | + | |
| 1234 | + | |
| 1235 | + | |
| 1236 | + | |
| 1237 | + | |
| 1238 | + | |
| 1239 | + | |
| 1240 | + | |
| 1241 | + | |
| 1242 | + | |
| 1243 | + | |
| 1244 | + | |
| 1245 | + | |
| 1246 | + | |
| 1247 | + | |
| 1248 | + | |
| 1249 | + | |
| 1250 | + | |
| 1251 | + | |
| 1252 | + | |
| 1253 | + | |
| 1254 | + | |
| 1255 | + | |
1171 | 1256 | | |
1172 | 1257 | | |
1173 | 1258 | | |
| |||
0 commit comments