Skip to content

Commit 4eb7eb5

Browse files
igerberclaude
andcommitted
Delete dead staggered placebo helper, rewrite Step 6 prose
Remove the unused _placebo_step(staggered=True) branch that still contained CS/SA-specific control_group/anticipation advice. The function now only serves simple 2x2 designs. Rewrite the Step 6 section in llms-practitioner.txt to give estimator-family-specific falsification examples instead of generic staggered advice that doesn't match all estimator APIs. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 5d6b11c commit 4eb7eb5

2 files changed

Lines changed: 11 additions & 24 deletions

File tree

diff_diff/practitioner.py

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -188,27 +188,8 @@ def _honest_did_step() -> Dict[str, Any]:
188188
)
189189

190190

191-
def _placebo_step(staggered: bool = False) -> Dict[str, Any]:
192-
if staggered:
193-
return _step(
194-
baker_step=6,
195-
label="Run sensitivity/falsification checks",
196-
why=(
197-
"For staggered designs, run_all_placebo_tests() is not "
198-
"directly applicable (it refits a basic 2x2 DiD). Instead, "
199-
"compare results across control group choices "
200-
"(never_treated vs not_yet_treated), anticipation settings, "
201-
"and subsample restrictions as falsification checks."
202-
),
203-
code=(
204-
"# Staggered falsification: compare across specifications\n"
205-
"# - Re-estimate with control_group='never_treated' vs 'not_yet_treated'\n"
206-
"# - Re-estimate with anticipation=1 to check no-anticipation\n"
207-
"# - Drop one cohort at a time for leave-one-out sensitivity"
208-
),
209-
priority="medium",
210-
step_name="sensitivity",
211-
)
191+
def _placebo_step() -> Dict[str, Any]:
192+
"""Placebo tests for simple 2x2 DiD designs only."""
212193
return _step(
213194
baker_step=6,
214195
label="Run placebo tests",

docs/llms-practitioner.txt

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -259,9 +259,15 @@ honest_sd = compute_honest_did(results, method='smoothness', M=0.5)
259259

260260
### Placebo tests (simple 2x2 designs only)
261261
`run_all_placebo_tests()` refits a basic 2x2 DiD — it is valid for simple
262-
designs but NOT for staggered adoption. For staggered designs, use
263-
specification-based falsification: compare results across control group
264-
choices, anticipation settings, and cohort subsets.
262+
designs but NOT for staggered, synthetic control, or other advanced estimators.
263+
264+
**For non-2x2 estimators**, use specification-based falsification appropriate
265+
to your estimator's API. Examples:
266+
- **CS/SA**: compare `control_group='never_treated'` vs `'not_yet_treated'`
267+
- **StackedDiD**: vary `clean_control` definition
268+
- **EfficientDiD**: compare `control_group='never_treated'` vs `'last_cohort'`
269+
- **ImputationDiD/TwoStageDiD**: leave-one-cohort-out, cross-estimator comparison
270+
- **SyntheticDiD/TROP**: in-time or in-space placebo (fake treatment date, leave-one-unit-out)
265271

266272
```python
267273
from diff_diff import run_all_placebo_tests

0 commit comments

Comments
 (0)