Skip to content

Commit 7207eb7

Browse files
igerberclaude
andcommitted
Address CI codex R8 P3 on PR-A: 2020 review tuning-table API column
P3 (tuning-table API clarity): The 2020 review's Tuning Parameters table at L263-L271 mixed conceptual paper knobs (Treatment direction, Cluster level, Placebo lag) with real library knobs (L_max, n_bootstrap) without distinguishing the two. Some entries described user-settable parameters that the library does not actually expose: - "Treatment direction" was listed as an enum knob but is inferred from the fitted sample (joiners/leavers/both views are read off results.joiners_* / results.leavers_*). - "Cluster level" was listed as a column name but the library only accepts cluster=None. - "Placebo lag (L_pre)" was listed as an integer with default 1, but the library exposes a boolean gate (placebo: bool = True), and Phase 1 supports only the single-lag DID_M^pl. Rewrites the table with the same two-column "(paper concept) | Library API" structure used in the R7 fix to the 2022 review's tuning table, making the paper-vs-implementation correspondence explicit for every row. The actual library surface (L_max, n_bootstrap, cluster=None, placebo: bool, bootstrap_weights) is now documented row-by-row. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 6c468a4 commit 7207eb7

1 file changed

Lines changed: 8 additions & 7 deletions

File tree

docs/methodology/papers/dechaisemartin-dhaultfoeuille-2020-review.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -262,13 +262,14 @@ Footnote 15 cross-references Callaway and Sant'Anna (2018), later published 2021
262262

263263
### Tuning Parameters
264264

265-
| Parameter | Type | Default | Selection Method |
266-
|-----------|------|---------|-----------------|
267-
| Treatment direction | enum (joiners / leavers / both) | both | Driven by panel content; staggered-adoption designs auto-restrict to joiners. |
268-
| `L_max` (dynamic companion) | int / None | None | None gives Phase 1 per-period `DID_M`; `>= 1` activates `DID_l` event-study path (NBER WP 29873). |
269-
| `n_bootstrap` | int | 0 (analytical) | `>= 199` recommended for percentile / wild bootstrap CIs. |
270-
| Cluster level | column name | group | Paper applies bootstrap at the panel-unit level (county, worker). |
271-
| Placebo lag (`L_pre`) | int | 1 | Each additional lag drops observations - see Application 2 obs sequence. |
265+
| Parameter (paper concept) | Library API | Type | Default | Selection method |
266+
|---|---|---|---|---|
267+
| Treatment direction (joiners / leavers / both) | Not user-settable; inferred from the fitted sample. Joiners-only and leavers-only views are exposed as `results.joiners_*` / `results.leavers_*` alongside the aggregate `DID_M`. | n/a | n/a | Staggered-adoption designs auto-restrict to joiners. |
268+
| Max horizon (dynamic companion: `L`) | `L_max` on `fit()` | `Optional[int]` | `None` | `None` selects Phase 1 per-period `DID_M`; `>= 1` activates the Phase 2 dynamic `DID_l` event-study path (NBER WP 29873, revised July 2023). |
269+
| Bootstrap iteration count | `n_bootstrap` on `__init__` | `int` | `0` (analytical) | `>= 199` recommended for percentile bootstrap CIs; analytical SE remains the library default. |
270+
| Cluster level | `cluster` on `__init__` | `Optional[Any]` | `None` (only supported value) | Clustering is fixed at the group level (or PSU level under `survey_design`). User-specified cluster columns raise `NotImplementedError`; the paper's `DID_M` table SEs in Applications 1-2 are county- and worker-level cluster-robust respectively, which the library mirrors by clustering at the group level. |
271+
| Placebo gate | `placebo` on `__init__` | `bool` | `True` | Boolean gate, not an integer lag count. Library computes the single-lag `DID_M^pl` on Phase 1; longer backward placebos require the Phase 2 `DID^{pl}_l` path (`L_max >= 1`). Set `placebo=False` to skip computation for speed. |
272+
| Bootstrap weight distribution | `bootstrap_weights` on `__init__` | str | `"rademacher"` | `"rademacher"`, `"mammen"`, or `"webb"`. Ignored when `n_bootstrap = 0`. |
272273

273274
### Relation to Existing diff-diff Estimators
274275
- Already implemented as `diff_diff.ChaisemartinDHaultfoeuille` (8,783 LoC).

0 commit comments

Comments
 (0)