Repository navigation
Fix estimation, inference and preprocessing edge cases - #279
Merged
Merged
Conversation
… keep them out of the pre-test With anticipation > 0, periods g - anticipation, ..., g - 1 are periods in which units may already respond to the treatment (Callaway and Sant'Anna, 2021). Under base_period = "varying" they used period t - 1 as the base, so with anticipation >= 2 the cells inside the window (other than the first) were changes between two anticipation periods; and they entered the Wald pre-test, which then rejected parallel trends because of the anticipation the user had declared (20 of 20 simulated samples with true parallel trends). Both compute paths now use the base period g - anticipation - 1 for every t >= g - anticipation, and the pre-test (and the pretest-only cell filter) uses only t < g - anticipation. anticipation = 0 and all post-treatment cells are unchanged. Docs updated (?att_gt anticipation/base_period/weights, ?MP W).
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.
Valid weighted cells could be discarded by unweighted feasibility checks, changing outcome units could remove standard errors and alter Wald restrictions, and
balance_ecould mix cohorts after missing cells were removed. This corrects those paths, restores pending fixes, and adds reproductions and performance measurements.Changes:
att_gt()still supports those estimators.master, and include Restore tiny-group RC coverage and reject undersized outcome fits #278's normalized tiny-group RC guards and restored tests. This incorporates the changes from Restore tiny-group RC coverage and reject undersized outcome fits #278; that PR remains open.Validation on the final source:
R CMD check --as-cran --no-manual: Status: OK, including rendered and rebuilt vignettes.Performance was compared with clean master
74b88ebunder the same DRDID 1.4.0, with warmups and 14 measurements per source/case in separate ABBA processes. No material end-to-end slowdown was detected across 28 main and 12 targeted workloads. Initial targeted regressions were investigated and optimized; their raw measurements are retained.The slow varying-weight timing ranges overlap. The corrected weighted rank guard and exceptional zero/underflow fallback paths have small isolated costs, disclosed rather than hidden. These timings are evidence for the tested workloads, not a universal performance bound. Reproducible scripts, raw timings, medians and IQRs are excluded from the built R package.
Cross-platform pre-PR validation on exact commit
04a1b09:Limits: retaining a positive computed variance does not establish that an extremely tiny nuisance-fit residual is statistically meaningful; extreme scales can still exceed floating-point range. The preliminary overlap diagnostic retains its existing unweighted policy on positive support. No new regression/DR conditional-test procedure is introduced.