fix: review findings for stata_r3d/mata/r3d_mata.mata#22
Open
Davidvandijcke wants to merge 3 commits intomainfrom
Open
fix: review findings for stata_r3d/mata/r3d_mata.mata#22Davidvandijcke wants to merge 3 commits intomainfrom
Davidvandijcke wants to merge 3 commits intomainfrom
Conversation
…scope, saving CI)
S1: Fix double-dereference ``fuzzy'' / ``weights'' -> `fuzzy' / `weights'
S7: Read r(pilot_den) and r(h_den) into locals immediately after Mata call
before intervening commands can clear r() results
S8: Track Mata loading success via local mata_loaded instead of ambient _rc
S18: Remove redundant tempvar drops in r3d_bwselect.ado
S21: saving() now writes bootstrap CB bounds instead of pointwise normal CI
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
F1: replace det()!=0 with abs(det())>1e-10 in r3d_locpoly and
r3d_fit_global_poly to catch near-singular matrices
F2: fix fuzzy bootstrap to use treatment-side kernel weights
(w_t_plus/w_t_minus) for e2 delta-method linearization instead
of outcome-side weights; add w_t_plus_name/w_t_minus_name params
to r3d_bootstrap and update r3d_bootstrap.ado caller
F3: replace r3d_test_gini stub body with explicit error() call;
previously silently returned p-value=0.5 regardless of data
F4: add assert(cols(T)==1) after T view load and assert(pilot_h_den>0)
after fallback assignment in r3d_bandwidth_select
F5: rewrite _r3d_load_csv with two-pass pre-allocation to avoid
O(n^2) matrix growth via repeated row-append
F6: add linear interpolation to weighted quantile path mirroring
the unweighted type-7 logic for consistency
F7: emit errprintf warning when multiple test ranges are supplied
and only the first is used
F8: add optional seed_val parameter to r3d_bootstrap for
reproducible bootstrap draws via rseed(); update .ado to pass seed
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.
Automated fixes from code review pipeline.