Skip to content

fix: review findings for montecarlo/04_stata_coverage.R#26

Open
Davidvandijcke wants to merge 3 commits intomainfrom
fix/review-montecarlo-04_stata_coverage
Open

fix: review findings for montecarlo/04_stata_coverage.R#26
Davidvandijcke wants to merge 3 commits intomainfrom
fix/review-montecarlo-04_stata_coverage

Conversation

@Davidvandijcke
Copy link
Copy Markdown
Owner

Automated fixes from code review pipeline.

Davidvandijcke and others added 3 commits March 5, 2026 00:57
…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: move set.seed(99999) before the delta loop; cache y_below outside loop
- F2: replace column-1-only NA check with full-row validity across all matrices
- F3: add stopifnot(length(true_tau) == NQ) after true_tau assignment
- F4: derive NQ <- length(Q_GRID) instead of hardcoding 9 independently
- F5: use seq_len(N_SIMS) instead of 1:N_SIMS
- F6: add dir.exists(stata_dir) guard before loop; stop on empty results
- F7: track pval_valid mask separately; report n_pval_valid; use it for rejection rates

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant