Repository navigation
docs(methodology): Bellégo, Benatia & Dortet-Bernadet (2025) chained difference-in-differences paper review - #909
Conversation
✅ Looks goodNo confirmed P0/P1 findings. Two nonblocking P2 issues remain. Executive summary
MethodologyNo confirmed findings. Apparent source errors are explicitly distinguished from reviewer derivations. No new estimation, aggregation, control-group, or inference execution paths require edge-case review. The comparison with existing Code QualityNo additional findings. PerformanceNo material runtime impact identified. MaintainabilityNo additional findings. Tech DebtThe tutorial-validation removal below is not covered by a corresponding entry in SecurityNo secrets or security defects identified in the diff. Documentation/TestsD1 — P2: Preserve the existing tutorial validationLocation: Impact: Narrowing the drift step leaves 13 existing drift-test modules outside notebook-only validation. The main test workflow does not trigger on notebook-only changes, and Concrete fix: Restore the conventions guard, its documentation and CI wiring, and the D2 — P2: Correct the advertised Python requirementLocation: Impact: The new “Python 3.8+” requirement contradicts Concrete fix: State Python 3.9–3.15, retaining the stricter Python 3.12 requirements already documented for the MMM tutorials. |
…difference-in-differences paper review Add docs/methodology/papers/bellego-2025-review.md, a source audit of "The chained difference-in-differences" (Journal of Econometrics 248, 105783), reviewed from arXiv:2301.01085v4. The review covers the identifying assumptions for incomplete panels, the pairwise inverse-probability-weighted building blocks, the GMM combination with its optimal and identity weighting variants, the influence functions and multiplier bootstrap, the summary parameters, the sample selection corrections, and simulation Tables 3 and 4. It lists the printed inconsistencies an implementation must resolve and the points the paper leaves open (pre-treatment periods and the reference period, variance under non-optimal weighting, thinly observed pairs, the propensity-score estimation sample, clustering). Docs only: no estimator, public API, or test change. Adds a changelog fragment.
9938a1e to
ebe064b
Compare
|
🔁 AI review rerun (requested by @igerber) Head SHA: Overall assessment: ✅ Looks good No confirmed P0/P1 findings. Both previous P2 findings are resolved. Executive summary
Methodology No confirmed findings. The affected method is prospective chained DiD; no estimator, identification check, weighting implementation, or inference behavior changes. The pairwise normalization, GMM sandwich derivation, bootstrap scaling correction, and efficiency-inequality arithmetic are internally consistent. See The existing-estimator comparison agrees with DNS failure prevented independent comparison with arXiv v4, including verification of quotations, table transcriptions, and absence claims. Code Quality No findings. No executable code changes or new edge-case paths. Performance No findings. No runtime impact. Maintainability No findings. The review pins its source version and separates transcriptions, derivations, inconsistencies, and unresolved implementation choices. Tech Debt No findings. The review’s prospective implementation checklist does not introduce an incomplete production feature. Security No secrets or security defects identified in the added files. Documentation/Tests No findings.
|
Context: - The maintainer fixed the target for PR igerber#887 in issue comment 7175894148, specified against the formal paper review merged in igerber#909. - The estimator kept thin pairs with a warning and aborted the whole fit when one pair's propensity logit failed. Its result API also differed from the other staggered estimators. - Two independent reviews ran before this commit. Their corrections are included. Changes: - Pair eligibility: exclude pairs with fewer than 20 observed units in either arm or control effective sample size below 20. The previous rule required two units and warned below 20. - Failure handling: a failed pair propensity fit excludes that pair with a recorded reason and detail, and the fit continues on the remaining paths. Only propensity-model failures are local. Outcome overflow still raises, with or without covariates. Warning categories other than UserWarning from the logit helper pass to the caller. - EPV: expose epv_threshold (default 10), enable the shared check and report per-cell epv_diagnostics from contributing pairs. A fit issues one summary warning for retained low-EPV pairs. - Result API, unreleased and without a compatibility alias: plain-dict cells with effect, se, t_stat, p_value, conf_int, n_treated, n_control and skip_reason; to_dataframe() uses effect and skip_reason; get_aggregation_weights_df(level) replaces aggregation_weights(level); add groups, time_periods, n_obs, cluster_name and n_clusters. - Table skip_reason columns have object dtype, so estimable cells hold None on pandas 2 and 3. n_obs counts observed outcomes. to_dict() returns a detached structure. - Documentation: identity GMM as the paper's named variant; the per-pair propensity fit as a deviation from the paper and from R under REGISTRY labels; the reference period, free pre-period parameters, identity sandwich and clustering as library choices; dispositions of the review's fourteen printed inconsistencies. - Evidence: cdid comparison re-run at 1.4.0.0 (R 4.5.2, did 2.5.1, DRDID 1.4.0) and a new sparse-policy report. Historical 1.1.0.0 records are unchanged. Limits: - Sparse grid, 2,000 replications per case: coverage is 0.9395 and 0.9345 in two of ten cases, so the literal 0.94 acceptance flag is false. This is consistent with the maintainer's bar of about 0.94, not a literal pass. - The incomplete continuous-covariate R fixture still differs, because the per-pair propensity criterion differs from cdid's by design. - Identity GMM ignores pair precision, so retained thin pairs cost precision. - The estimator predates docs/input-contract.md. It treats NaN outcomes as unobserved (IC-03 refuses them) and requires 0 as the never-treated marker (IC-15 also allows +inf). Both are left for the maintainer to rule on. - The reference image was upgraded in place; the tracked Dockerfile has not been built from clean. Verification: - Focused chained, methodology, doc-dependency and changelog tests: 477 passed on pandas 2.3.3. - Chained tests on pandas 3.0.3, NumPy 2.4.5 and SciPy 1.17.1: 139 passed. - ruff 0.17.1, black 26.10.1 and mypy 2.4.0 pass. - cdid 1.4.0.0 comparison: eight of nine fixtures pass, with the expected mismatch. Both reports were regenerated from this source. - Tutorial code cells executed. - Not run: hosted CI, the complete suite, the Python version matrix, the native backend, a clean rebuild of the reference image, and a simulation of the covariate path under the new policy. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Context: - The maintainer fixed the target for PR igerber#887 in issue comment 7175894148, specified against the formal paper review merged in igerber#909. - The estimator kept thin pairs with a warning and aborted the whole fit when one pair's propensity logit failed. Its result API also differed from the other staggered estimators. - Two independent reviews ran before this commit. Their corrections are included. Changes: - Pair eligibility: exclude pairs with fewer than 20 observed units in either arm or control effective sample size below 20. The previous rule required two units and warned below 20. - Failure handling: a failed pair propensity fit excludes that pair with a recorded reason and detail, and the fit continues on the remaining paths. Only propensity-model failures are local. Outcome overflow still raises, with or without covariates. Warning categories other than UserWarning from the logit helper pass to the caller. - EPV: expose epv_threshold (default 10), enable the shared check and report per-cell epv_diagnostics from contributing pairs. A fit issues one summary warning for retained low-EPV pairs. - Result API, unreleased and without a compatibility alias: plain-dict cells with effect, se, t_stat, p_value, conf_int, n_treated, n_control and skip_reason; to_dataframe() uses effect and skip_reason; get_aggregation_weights_df(level) replaces aggregation_weights(level); add groups, time_periods, n_obs, cluster_name and n_clusters. - Table skip_reason columns have object dtype, so estimable cells hold None on pandas 2 and 3. n_obs counts observed outcomes. to_dict() returns a detached structure. - Documentation: identity GMM as the paper's named variant; the per-pair propensity fit as a deviation from the paper and from R under REGISTRY labels; the reference period, free pre-period parameters, identity sandwich and clustering as library choices; dispositions of the review's fourteen printed inconsistencies. - Evidence: cdid comparison re-run at 1.4.0.0 (R 4.5.2, did 2.5.1, DRDID 1.4.0) and a new sparse-policy report. Historical 1.1.0.0 records are unchanged. Limits: - Sparse grid, 2,000 replications per case: coverage is 0.9395 and 0.9345 in two of ten cases, so the literal 0.94 acceptance flag is false. This is consistent with the maintainer's bar of about 0.94, not a literal pass. - The incomplete continuous-covariate R fixture still differs, because the per-pair propensity criterion differs from cdid's by design. - Identity GMM ignores pair precision, so retained thin pairs cost precision. - The estimator predates docs/input-contract.md. It treats NaN outcomes as unobserved (IC-03 refuses them) and requires 0 as the never-treated marker (IC-15 also allows +inf). Both are left for the maintainer to rule on. - The reference image was upgraded in place; the tracked Dockerfile has not been built from clean. Verification: - Focused chained, methodology, doc-dependency and changelog tests: 477 passed on pandas 2.3.3. - Chained tests on pandas 3.0.3, NumPy 2.4.5 and SciPy 1.17.1: 139 passed. - ruff 0.17.1, black 26.10.1 and mypy 2.4.0 pass. - cdid 1.4.0.0 comparison: eight of nine fixtures pass, with the expected mismatch. Both reports were regenerated from this source. - Tutorial code cells executed. - Not run: hosted CI, the complete suite, the Python version matrix, the native backend, a clean rebuild of the reference image, and a simulation of the covariate path under the new policy. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Summary
docs/methodology/papers/bellego-2025-review.md, a paper review of Bellégo, Benatia and Dortet-Bernadet (2025), "The chained difference-in-differences" (Journal of Econometrics 248, 105783), reviewed from arXiv:2301.01085v4.Methodology references (required if estimator / math changes)
Validation
tests/test_naming_guard.py,tests/test_docs_ia.py,tests/test_changelog_fragments.pyandtests/test_tracking_files.pypass on this branch.Security / privacy
Changelog