Repository navigation
Align shared Python kernels with R DRDID and CSDID - #21
Merged
Merged
Conversation
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
This was referenced Oct 27, 2026
Collaborator
Author
|
@TJhon @alexanderquispe @anzonyquispe Can you put me as maintainer of the package so I have full control? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Python DRDID 1.1.6 can return the correct repeated-cross-section ATT with an incorrect influence vector and inference. An observed example differs from R by 5.35 in the IF. Omitted default weights also crash three functions, and missing propensity trimming changes estimates.
This corrects the six existing traditional DR, normalized IPW and regression kernels for panel and repeated-cross-section data. It repairs RC pre-period nuisance signs, R-compatible control trimming and final-probability propensity Hessians, default weights/covariates, input shapes, weighted designs and finite-weight normalization. Function names, tuple returns, the historical OLS helper and Python's automatic-intercept convention are preserved.
The coordinated candidates are DRDID 1.1.7 and CSDID 0.4.4. CSDID #88 requires exactly
drdid==1.1.7and records the reviewed source commit; a future backend version requires an explicit coordinated upgrade. CSDID uses local DR/IPW implementations with cached-fit support and imports DRDID for regression, so both copies are compared directly.Validation:
eaac3b49comparisons check ATT, every IF contribution, analytical SE and intervals, including zero/varying weights, trimming and outcome scales. Both raw and original-unit comparisons retainatol=1e-7, rtol=1e-6.53a6b76pass: Python 3.8/3.12, downstream CSDID integration and current official R parity. The exporter rebuilds native R code and binds the complete reviewed R tree and inputs; any upstream tree change requires review.An unused orphan R gitlink without a
.gitmodulesURL was removed after GitHub checkout credential cleanup exposed it. All Python source bytes and fixtures remain identical to the full local installed proof; the final CI reruns the corrected repository tree.Publication now requires a successful trusted same-repository main-push test workflow and builds that exact tested revision into both sdist and wheel. This PR is now merged. All four checks are mandatory on main under ruleset 25992066, with strict freshness and no bypass actors.
Scope is the six shared methods needed for CSDID. R's high-level default is improved/IPT; select traditional DR when comparing. Equivalent sample, design/intercept, weights, trimming and inference settings are required. R-only pushes are inspected on the next Python run and do not automatically port changes. CSDID's retained extreme-outcome raw aggregate-IF tolerance failures are disclosed in its compatibility record; this is not a universal numerical-equivalence claim.
See alignment/release notes, CSDID #88 and the companion aggregation correction R did #280.
Delivery update: merged as
c238f57eee260565d5cd2a38526e2e6805aa9284. All four post-merge main CI jobs pass. The automatic release passed its source/CI gate, build and distribution checks, but PyPI rejected the upload with HTTP 403 Forbidden. Release 1.1.7 remains unpublished until publishing authentication/permissions are corrected. Mandatory CI is enforced by ruleset 25992066.