Skip to content

Commit 8ce4441

Browse files
igerberclaude
andcommitted
Fix SDiD handler: compare with CS, not TROP
SDiD robustness step was still suggesting TROP comparison because "both address few treated units" — but TROP is for factor confounding, not few treated units. Now suggests comparing with CS/SA instead, with a note that TROP is a different use case. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent a21845c commit 8ce4441

1 file changed

Lines changed: 8 additions & 7 deletions

File tree

diff_diff/practitioner.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -520,16 +520,17 @@ def _handle_synthetic(results: Any):
520520
),
521521
_step(
522522
baker_step=8,
523-
label="Compare with TROP or staggered estimators",
523+
label="Compare with staggered estimators (CS, SA)",
524524
why=(
525-
"SyntheticDiD and TROP address similar settings (few treated "
526-
"units). Agreement across both strengthens confidence."
525+
"SyntheticDiD is for few treated units; compare with "
526+
"staggered estimators if applicable. Use TROP only if "
527+
"factor confounding is suspected (different use case)."
527528
),
528529
code=(
529-
"from diff_diff import TROP\n"
530-
"trop = TROP()\n"
531-
"trop_result = trop.fit(data, ...)\n"
532-
"print(f'SDiD ATT: {results.att:.4f}, TROP ATT: {trop_result.att:.4f}')"
530+
"from diff_diff import CallawaySantAnna\n"
531+
"cs = CallawaySantAnna()\n"
532+
"cs_result = cs.fit(data, ...)\n"
533+
"print(f'SDiD ATT: {results.att:.4f}, CS ATT: {cs_result.overall_att:.4f}')"
533534
),
534535
step_name="robustness",
535536
),

0 commit comments

Comments
 (0)