Skip to content

docs(methodology): Bellégo, Benatia & Dortet-Bernadet (2025) chained difference-in-differences paper review - #909

Merged
igerber merged 1 commit into
mainfrom
docs/bellego-2025-paper-review
Nov 25, 2026
Merged

igerber merged 1 commit into
mainfrom
docs/bellego-2025-paper-review

Conversation

@igerber

@igerber igerber commented Nov 25, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add 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.
  • 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 14 printed inconsistencies an implementation must resolve (including the sign of the influence function and the denominator of the propensity-score correction) and 12 points the paper leaves open: pre-treatment periods and the reference period, variance under non-optimal weighting of an overidentified stack, thinly observed pairs of periods, the propensity-score estimation sample, clustering, anticipation, and others.
  • Docs only. This is the source audit for evaluating a contributed chained-DiD estimator; no estimator or public API is introduced.

Methodology references (required if estimator / math changes)

  • Method name(s): chained difference-in-differences (paper review only; no estimator change)
  • Paper / source link(s): https://doi.org/10.1016/j.jeconom.2024.105783 ; reviewed PDF https://arxiv.org/pdf/2301.01085v4 (SHA-256 recorded in the review header)
  • Any intentional deviations from the source (and why): None. Passages that are the review's own algebra or arithmetic are labelled "[Reviewer check - not in paper]"; literal transcriptions of apparent typos are labelled "[as printed]".

Validation

  • Tests added/updated: No test changes. tests/test_naming_guard.py, tests/test_docs_ia.py, tests/test_changelog_fragments.py and tests/test_tracking_files.py pass on this branch.
  • Backtest / simulation / notebook evidence (if applicable): N/A. The review's equations, quotations and absence claims were checked against the PDF page images and a full-text dump; every cell of the transcribed Tables 3, 4 and B.1 was compared with the paper. The source PDF is not committed.

Security / privacy

  • Confirm no secrets/PII in this PR: Yes

Changelog

  • changelog.d/ fragment added (or N/A - no user-visible change): Yes

@github-actions

Copy link
Copy Markdown

✅ Looks good

No confirmed P0/P1 findings. Two nonblocking P2 issues remain.

Executive summary

  • The review documents prospective chained DiD methodology; no estimator or public API changes.
  • Checked the registry, relevant CallawaySantAnna docstrings, and the review’s GMM sandwich and simulation arithmetic; no contradiction found.
  • The diff also removes existing tutorial validation unrelated to the paper review.
  • Verification limits: the source PDF could not be retrieved because DNS failed, and pytest is unavailable. Paper transcriptions and reported test results remain independently unverified.

Methodology

No 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 CallawaySantAnna unbalanced-panel routing agrees with docs/methodology/REGISTRY.md:L1171-L1196 and its parameter docstring.

Code Quality

No additional findings.

Performance

No material runtime impact identified.

Maintainability

No additional findings.

Tech Debt

The tutorial-validation removal below is not covered by a corresponding entry in TODO.md or DEFERRED.md.

Security

No secrets or security defects identified in the diff.

Documentation/Tests

D1 — P2: Preserve the existing tutorial validation

Location: .github/workflows/notebooks.yml:L89-L97; deleted tests/test_tutorial_conventions.py; .github/workflows/docs-tests.yml:L127-L135.

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 nbmake checks execution without validating prose or committed outputs. Read the Docs renders those committed outputs with nbsphinx_execute = "never". Deleting the conventions guard also removes checks for committed tracebacks and newly introduced convention violations.

Concrete fix: Restore the conventions guard, its documentation and CI wiring, and the pytest tests/test_t*_drift.py invocation with its wildcard/helper path triggers. Keep this paper audit’s changes separate from any intentional retirement of tutorial checks.

D2 — P2: Correct the advertised Python requirement

Location: docs/tutorials/README.md:L220-L226.

Impact: The new “Python 3.8+” requirement contradicts pyproject.toml:L11, which requires >=3.9,<3.16. Readers following it on Python 3.8 cannot install the current package.

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.
@igerber
igerber force-pushed the docs/bellego-2025-paper-review branch from 9938a1e to ebe064b Compare November 25, 2026 21:46
@github-actions

Copy link
Copy Markdown

🔁 AI review rerun (requested by @igerber)

Head SHA: ebe064b41e83d0d95a924c1e7dd0db8ebfc7a433


Overall assessment: ✅ Looks good

No confirmed P0/P1 findings. Both previous P2 findings are resolved.

Executive summary

  • The revised diff adds only the paper review and a changelog fragment.
  • Tutorial conventions checks, drift-test execution, and CI triggers are present, resolving D1.
  • The tutorial README now specifies Python 3.9+, resolving D2’s incorrect minimum requirement.
  • Independent algebra checks passed. Source transcriptions remain unverified because the cited PDF could not be retrieved.

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 docs/methodology/papers/bellego-2025-review.md:L181, :L345, and :L775.

The existing-estimator comparison agrees with docs/methodology/REGISTRY.md:L1182 and the allow_unbalanced_panel docstring in diff_diff/staggered.py:L610. Apparent paper errors are explicitly distinguished from reviewer derivations.

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.

  • D1 resolved: wildcard drift-test execution exists at .github/workflows/notebooks.yml:L108; conventions validation exists at .github/workflows/docs-tests.yml:L147, with the guard and documentation present.
  • D2 resolved: docs/tutorials/README.md:L24 states the correct Python minimum and retains the MMM requirements.
  • changelog_compile.py check passed.
  • Pytest is unavailable in this environment, so the reported test results could not be independently reproduced.

@igerber igerber added the ready-for-ci Triggers CI test workflows label Nov 25, 2026
@igerber
igerber merged commit d770e89 into main Nov 25, 2026
14 of 15 checks passed
@igerber
igerber deleted the docs/bellego-2025-paper-review branch November 25, 2026 22:10
shawcharles pushed a commit to shawcharles/diff-diff that referenced this pull request Dec 1, 2026
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>
shawcharles added a commit to shawcharles/diff-diff that referenced this pull request Dec 3, 2026
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-ci Triggers CI test workflows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant