Skip to content

Commit c74e7ac

Browse files
igerberclaude
andcommitted
Inline DiD PT step without HonestDiD mention
Basic DiD handler now has its own PT step that doesn't mention HonestDiD (which DiDResults doesn't support). The shared _parallel_trends_step() is now only used by MultiPeriodDiD (where HonestDiD IS supported) and the generic fallback. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent b662a41 commit c74e7ac

1 file changed

Lines changed: 14 additions & 1 deletion

File tree

diff_diff/practitioner.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,20 @@ def _covariates_step() -> Dict[str, Any]:
282282
# ---------------------------------------------------------------------------
283283
def _handle_did(results: Any):
284284
steps = [
285-
_parallel_trends_step(),
285+
_step(
286+
baker_step=3,
287+
label="Test parallel trends assumption",
288+
why=(
289+
"Parallel trends is the core identifying assumption. "
290+
"Insignificant pre-trends do NOT prove it holds."
291+
),
292+
code=(
293+
"from diff_diff import check_parallel_trends\n"
294+
"pt = check_parallel_trends(data, outcome='y', time='period',\n"
295+
" treatment_group='treated')"
296+
),
297+
step_name="parallel_trends",
298+
),
286299
_placebo_step(), # valid: basic 2x2 DiD with binary time
287300
_step(
288301
baker_step=4,

0 commit comments

Comments
 (0)