Skip to content

Commit 9dfd151

Browse files
committed
CI review R1: record _gclsst.ado provenance (egenmore_gclsst key); scope the paper-review suest bullets to joint tests with the measured pooled construction
1 parent 72e6ee2 commit 9dfd151

5 files changed

Lines changed: 21 additions & 11 deletions

File tree

benchmarks/data/lpdid_nonabsorbing_stata_golden.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
"require": "version 1.3.1 19sep2023 [checksum:1262842970 len:34415]",
1818
"boottest": "boottest 4.5.3 5 June 2026 [checksum:2334657244 len:63528]",
1919
"listreg": "version 1.0.3 26apr2025 Ben Jann [checksum:1074534106 len:23815]",
20-
"egenmore": "1.1.1 NJC 19 March 2006 [checksum:2753673312 len:1164]"
20+
"egenmore": "1.1.1 NJC 19 March 2006 [checksum:2753673312 len:1164]",
21+
"egenmore_gclsst": "1.0.0 NJC 11 January 2000 [checksum:885642367 len:916]"
2122
},
2223
"dropped_units": [24, 25, 27, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40],
2324
"stata_edition": "SE",

benchmarks/stata/README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -175,10 +175,11 @@ python -m json.tool benchmarks/data/lpdid_nonabsorbing_stata_golden.json > /dev/
175175
```
176176

177177
The generator fails closed (`exit 111`) if any run-time dependency is missing and
178-
records every one in `meta.ssc_versions` (guard set == version set; egenmore is
179-
probed and versioned via `_gfilter.ado`, the file the pooled spec executes). Each
180-
version string also embeds the ado file's `checksum:`/`len:` so a same-version-string
181-
upstream replacement still moves the drift metadata.
178+
records every one in `meta.ssc_versions` (guard set == version set; both guarded
179+
egenmore files carry their own entry — `egenmore` via `_gfilter.ado`, the file the
180+
pooled spec executes, and `egenmore_gclsst` via `_gclsst.ado`, lpdid's startup
181+
which-check). Each version string also embeds the ado file's `checksum:`/`len:` so
182+
a same-version-string upstream replacement still moves the drift metadata.
182183

183184
## JSON schema
184185

benchmarks/stata/generate_lpdid_nonabsorbing_golden.do

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,14 +175,18 @@ foreach p in lpdid reghdfe ftools require boottest listreg _gfilter _gclsst {
175175
}
176176

177177
* Record installed SSC versions for every fail-closed dependency (guard set ==
178-
* version set, matching the ETWFE-arm contract). egenmore is recorded via the
179-
* _gfilter.ado file this arm actually executes.
178+
* version set, matching the ETWFE-arm contract). Both guarded egenmore files are
179+
* recorded: `egenmore` via _gfilter.ado (executed by the pooled spec) and
180+
* `egenmore_gclsst` via _gclsst.ado (lpdid's startup which-check) - a change to
181+
* either file must move the drift metadata.
180182
foreach p in lpdid reghdfe ftools require boottest listreg {
181183
_adover `p'
182184
local v_`p' = r(v)
183185
}
184186
_adover _gfilter
185187
local v_egenmore = r(v)
188+
_adover _gclsst
189+
local v_egenmore_gclsst = r(v)
186190

187191
* ------------------------------------------------------------------------------
188192
* Informational in-.do point pins (fatal asserts at reldif < 1e-6, loose enough
@@ -335,7 +339,8 @@ file write `fh' `" "ftools": "`v_ftools'","' _n
335339
file write `fh' `" "require": "`v_require'","' _n
336340
file write `fh' `" "boottest": "`v_boottest'","' _n
337341
file write `fh' `" "listreg": "`v_listreg'","' _n
338-
file write `fh' `" "egenmore": "`v_egenmore'""' _n
342+
file write `fh' `" "egenmore": "`v_egenmore'","' _n
343+
file write `fh' `" "egenmore_gclsst": "`v_egenmore_gclsst'""' _n
339344
file write `fh' " }," _n
340345
file write `fh' `" "dropped_units": [24, 25, 27, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40],"' _n
341346
file write `fh' `" "stata_edition": "`sedition'","' _n

docs/methodology/papers/dube-2025-review.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ Single overall ATT over the posttreatment window `h in {0..H}` by using the post
9797
*Standard errors (Section 1 - NOT specified by the paper):*
9898
- **The paper deliberately gives no SE formula.** Section 1: "all the estimators ... allow for standard statistical inference using well-understood techniques ... For this reason, we do not discuss statistical inference here."
9999
- Default in the reference Stata implementation: **cluster-robust at the unit level** (`vce(cluster unit)`, footnote 9).
100-
- Pooled / joint tests across horizons: stack the per-horizon regressions (Stata `suest`).
100+
- Joint tests across horizons: stack the per-horizon regressions (Stata `suest`). (Pooled pre/post inference is a different object - the shipped package v1.0.3 computes it by a separate unit-clustered regression on a pooled long-difference outcome, NOT by stacking; measured by this repo's non-absorbing Stata arm, see REGISTRY `## LPDiD` Standard Errors + Note 6.)
101101
- Bootstrap: not discussed in the paper.
102102
- => Any analytical SE we ship (and especially the influence-function variance for the RA path) is an **implementation choice to be validated against the reference package**, not against the paper. Document under "Deviations from the paper".
103103

@@ -201,4 +201,4 @@ The paper *proves* numerical equivalences we can exploit for **internal cross-va
201201
3. **Non-absorbing extension (Section 4.2)** is presented as illustrative, not exhaustive ("a comprehensive discussion ... would indeed require a whole article", p.751). The effect-stabilization window `L` (Assumption 9, Equation 13) and the "first-time entry" estimand (Equation 12) are two distinct estimands; a Phase C design will need to choose/expose both deliberately. The contributor's scaffold rejects non-absorbing entirely.
202202
4. **PMD multi-cohort vs BJS** are "very similar (although not identical)" (p.747) - do not assert exact equality in tests except in the single-cohort `k=t-1` case.
203203
5. **`pmd="max"` semantics:** the paper's `k=t-1` "use all pretreatment periods" is per-observation (expanding window). The contributor implemented `pmd="max"` as the expanding mean of all prior periods and integer `pmd=k` as the trailing-`k` mean - verify this matches the package's `pmd` option exactly (the paper fixes the formula but not the option's edge behavior at the panel start).
204-
6. **Pooled SE / joint tests** use stacking (`suest`); the variance of the pooled estimand under clustering should be cross-checked against the package rather than assembled ad hoc.
204+
6. **Joint tests** use stacking (`suest`); pooled inference is separate. ~~The variance of the pooled estimand under clustering should be cross-checked against the package rather than assembled ad hoc.~~ **PARTIALLY RESOLVED** - the shipped package computes pooled pre/post inference as a separate unit-clustered regression on a pooled long-difference outcome, and this repo's non-absorbing Stata arm cross-checked the library's pooled SEs against it end-to-end (Eq. 12 both pooled windows; Eq. 13 pooled post; see REGISTRY `## LPDiD` Standard Errors). Eq. 13 pooled-pre remains outside that anchor (placebo-window convention difference).

tests/test_lpdid_nonabsorbing_stata_parity.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,9 @@
134134
ALWAYS_TREATED_UNITS = list(range(31, 41)) # convention class 1
135135
EXACT_L_RESPELL_UNITS = [24, 25, 27] # convention class 2
136136
SUBSAMPLE_N_ROWS = 658
137-
# Every fail-closed generator dependency (guard set == version set).
137+
# Every fail-closed generator dependency (guard set == version set; both guarded
138+
# egenmore files carry their own drift signal - _gfilter under "egenmore",
139+
# _gclsst under "egenmore_gclsst").
138140
SSC_VERSION_KEYS = {
139141
"lpdid",
140142
"reghdfe",
@@ -143,6 +145,7 @@
143145
"boottest",
144146
"listreg",
145147
"egenmore",
148+
"egenmore_gclsst",
146149
}
147150

148151

0 commit comments

Comments
 (0)