Skip to content

Commit 27fcc17

Browse files
authored
Merge pull request #176 from igerber/fix-stacked-did-tutorial
Fix stacked DiD tutorial: remove warning from trimming fix cell
2 parents 7f19f29 + bf642e0 commit 27fcc17

File tree

1 file changed

+2
-13
lines changed

1 file changed

+2
-13
lines changed

docs/tutorials/13_stacked_did.ipynb

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -244,18 +244,7 @@
244244
"execution_count": null,
245245
"metadata": {},
246246
"outputs": [],
247-
"source": [
248-
"# Symmetric kappa=3 trims cohort 7\n",
249-
"r_sym = StackedDiD(kappa_pre=3, kappa_post=3).fit(\n",
250-
" data, outcome='outcome', unit='unit', time='period', first_treat='first_treat')\n",
251-
"print(f\"Symmetric [-3, 3]: groups={r_sym.groups}, trimmed={r_sym.trimmed_groups}\")\n",
252-
"\n",
253-
"# Asymmetric window recovers cohort 7 — no warning this time\n",
254-
"r_asym = StackedDiD(kappa_pre=3, kappa_post=2).fit(\n",
255-
" data, outcome='outcome', unit='unit', time='period', first_treat='first_treat')\n",
256-
"print(f\"Asymmetric [-3, 2]: groups={r_asym.groups}, trimmed={r_asym.trimmed_groups}\")\n",
257-
"print(f\"\\nAll 3 cohorts included. ATT={r_asym.overall_att:.3f} (SE={r_asym.overall_se:.3f})\")"
258-
]
247+
"source": "# Asymmetric window recovers cohort 7 — no warning this time\nr_asym = StackedDiD(kappa_pre=3, kappa_post=2).fit(\n data, outcome='outcome', unit='unit', time='period', first_treat='first_treat')\nprint(f\"Asymmetric [-3, 2]: groups={r_asym.groups}, trimmed={r_asym.trimmed_groups}\")\nprint(f\"\\nAll 3 cohorts included. ATT={r_asym.overall_att:.3f} (SE={r_asym.overall_se:.3f})\")"
259248
},
260249
{
261250
"cell_type": "markdown",
@@ -461,4 +450,4 @@
461450
},
462451
"nbformat": 4,
463452
"nbformat_minor": 4
464-
}
453+
}

0 commit comments

Comments
 (0)