Skip to content

Commit e504df8

Browse files
igerberclaude
andcommitted
Fix: Clarify base_period interaction with anticipation in Tutorial 02
Updated 3 locations to correctly document that base_period="universal" uses g-anticipation-1 (not just g-1) when anticipation > 0: - Markdown explanation of base_period options - Code comment in comparison example - Print statement output Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 789b128 commit e504df8

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

docs/tutorials/02_staggered_did.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@
467467
"\n",
468468
"The `base_period` parameter controls how the reference period is selected:\n",
469469
"- `\"varying\"` (default): For pre-treatment periods, compares t to t-1 (consecutive comparisons)\n",
470-
"- `\"universal\"`: Always compares to g-1 (the period just before treatment)\n",
470+
"- `\"universal\"`: Always compares to g-1 (or g-anticipation-1 when anticipation > 0)\n",
471471
"\n",
472472
"Both produce identical post-treatment effects; they differ only for pre-treatment diagnostics."
473473
]
@@ -545,7 +545,7 @@
545545
"# Compare varying vs universal base period\n",
546546
"cs_universal = CallawaySantAnna(\n",
547547
" control_group=\"never_treated\",\n",
548-
" base_period=\"universal\" # Always use g-1 as base\n",
548+
" base_period=\"universal\" # Always use g-1 as base (g-anticipation-1 if anticipation > 0)\n",
549549
")\n",
550550
"\n",
551551
"results_universal = cs_universal.fit(\n",
@@ -570,7 +570,7 @@
570570
" print(f\"{event_time:>12} {varying_eff:>12.4f} {universal_eff:>12.4f} {diff:>12.4f}\")\n",
571571
"\n",
572572
"print(\"\\nNote: 'Varying' uses consecutive period comparisons (t vs t-1)\")\n",
573-
"print(\" 'Universal' compares all periods to g-1\")"
573+
"print(\" 'Universal' compares all periods to g-1 (g-anticipation-1 if anticipation > 0)\")"
574574
]
575575
},
576576
{

0 commit comments

Comments
 (0)