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
Address twenty-eighth round of CI review findings on PR #318
P2 code quality (TROP applicable_checks mismatch). TROP identification
is factor-model-based, not PT-based; the estimator-native
``_pt_factor()`` handler returns ``status="not_applicable"`` and
REPORTING.md routes TROP PT to factor-model diagnostics. Exposing
``parallel_trends`` in ``_APPLICABILITY["TROPResults"]`` advertised a
handler that never runs, leaving callers who gate workflows on
``applicable_checks`` with a contract mismatch. Remove PT from the
TROP applicability set.
P2 methodology (CS repeated-cross-section count labels).
``CallawaySantAnna(panel=False)`` stores treated / control counts as
OBSERVATIONS rather than units
(``staggered_results.py`` lines 183-184 render them as "obs:" in that
mode). BR previously labeled them "units" / "present in the panel",
which misstates the sample composition on RCS fits. Add a
``count_unit`` field to the BR sample schema (derived from
``results.panel``) and branch the summary / full-report rendering:
RCS fits render "never-treated observations" and "present in the
repeated cross-section sample" instead of the panel-mode phrasing.
P3 coverage (survey PT prose / replay propagation). The round-27 fix
added the ``_survey`` method suffix and ``df_denom`` schema field but
did not carry the provenance through the prose / replay helpers:
* ``_pt_method_subject`` and ``_pt_method_stat_label`` didn't
recognize ``joint_wald_survey`` / ``joint_wald_event_study_survey``,
so BR prose fell through to the generic "Pre-treatment data" /
"joint p" default;
* ``_lift_pre_trends`` didn't preserve ``df_denom`` in the BR schema,
so downstream consumers couldn't see the finite-sample correction
without re-consulting the DR schema;
* ``_format_precomputed_pt`` didn't carry ``df_denom`` on replay, so
a survey-aware DR block round-tripped as a chi-square-style
passthrough.
All three helpers now recognize / preserve the survey variants.
Tests: 7 new regressions.
* ``TestCSRepeatedCrossSectionCountLabels`` (3 tests): schema flag,
panel-mode wording, RCS-mode wording;
* ``TestTROPApplicableChecksExcludesParallelTrends`` (1 test):
TROP DR exposes no PT in applicable_checks;
* ``TestSurveyPTProsePropagation`` (2 tests): ``_lift_pre_trends``
preserves ``df_denom``, and method helpers return "joint p" +
event-study subject for both survey variants;
* ``test_precomputed_survey_pt_replay_preserves_df_denom`` (DR):
round-trip replay of a ``joint_wald_event_study_survey`` block
preserves ``method``, ``df_denom``, and ``df``.
249 BR / DR / practitioner tests pass.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments