Repository navigation
Conversation
This was referenced Oct 27, 2026
This branch has not been deployed
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.
Changing only the common units of valid sampling weights can change
aggte()standard errors in the slower estimation path. For example, scaling weights by1e307preserves ATT(g,t) and its influence function, but changes a single-cohort aggregate SE from0.1630024to0.1909288. In this case every aggregate must reproduce the original cell IF. The faster path normalizes weights earlier and remains correct.wif()formspg / sum(pg)^2. Squaring the cohort masses can overflow, underflow, or enter the subnormal range and silently corrupt the derivative of estimated aggregation weights. This uses an equivalent ratio formula in those cases and also handles overflow in sums of repeated selected masses. Ordinary arithmetic and existing malformed-input behavior are preserved.Validation:
NOT_CRAN=true), and zero failures, warnings, errors or skips. The focused aggregation/IF subset also passes all 2,446 assertions.1e-200through1e307, including finite subnormal squared masses at1e-160. They compare complete aggregate influence vectors and inference.wif()into these tests produces 332 assertion failures, identifying the corrected arithmetic rather than a change in estimator or sample.This was found while checking alignment with Python CSDID and standalone Python DRDID PR #21. The coordinated Python correction is CSDID #88; 552 strict complete-output cross-language/mode/unit comparisons pass against this reviewed R source. No reference tolerances or statistical methods are changed.
All GitHub checks pass at
7516845: R-CMD-check succeeds on macOS, Windows, Linux release, Linux old-release and Linux devel; build-check also succeeds. R-devel reportsStatus: OK.