Repository navigation
Implement MC-SIMEX method and enhance comparison notebooks - #33
Merged
Merged
Conversation
hroskes
commented
Sep 16, 2026
Collaborator
- Added MC-SIMEX method
- Notebook now compares to both Yi and MC-SIMEX.
- p value is calculated correctly - by permuting the patients to compare to null, rather than assuming a chi^2 with 1 DOF
- Optimizations to speed up likelihood scans without hurting the results - we only need to know whether there is a solution above or below 1 or 3.84, not necessarily what the optimal solution is.
A group-to-group flip was billed twice, and exclusion used the other group's cost instead of the tail NLL. Co-authored-by: Cursor <cursoragent@cursor.com>
Chi-squared with 1 df ignores assignment search, so p fell as measurement error grew. Cox-only still uses chi-squared. Co-authored-by: Cursor <cursoragent@cursor.com>
… discrete-e ladder to 0.20/0.25/0.40 after the flip-cost fix. Co-authored-by: Cursor <cursoragent@cursor.com>
…lve budgets. Use shared n=50 HR=6 methods_comparison_* datacards with e=0.05/0.10/0.25, and set N_PERMUTATIONS=19, N_HR_SCAN=25, SIMEX_B=20 plus a 3600s nbconvert timeout so CI can finish. Co-authored-by: Cursor <cursoragent@cursor.com>
…nts in place. Outcome permutations keep the death-time grid size fixed, so rebuild r/d incidence on the existing Gurobi model instead of constructing a new calculator and model for every shuffle. Co-authored-by: Cursor <cursoragent@cursor.com>
…ison. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Keep CI on small hr_example cards; gate n=50 methods_comparison behind KOMBINE_FULL_COMPARISON, restore pip Gurobi, and dedupe brentq hazard-ratio CI into utilities. Co-authored-by: Cursor <cursoragent@cursor.com>
Makes full local comparison (KOMBINE_FULL_COMPARISON) tractable while keeping significant p-values; include the rebin script used to regenerate the cards. Co-authored-by: Cursor <cursoragent@cursor.com>
Restore fine-grained source cards, write K=4 copies under a gitignored rebinned/ directory from ensure_rebinned(), and call that from notebook 07 full-comparison mode. Co-authored-by: Cursor <cursoragent@cursor.com>
Import ensure_rebinned via docs.kombine so pylint and nbconvert work without installing test/ or path-hacking the datacards directory. Co-authored-by: Cursor <cursoragent@cursor.com>
Add missing docstrings and silence too-many-arguments on rewrite_card so docs lint stays at 10/10. Co-authored-by: Cursor <cursoragent@cursor.com>
Drop KOMBINE_SKIP_SLOW_ANALYSES and invert the mode switch so local runs use rebinned methods_comparison cards unless the quick n=20 hr_example path is requested. Co-authored-by: Cursor <cursoragent@cursor.com>
Use excess_at_most sign tests to bracket profile-likelihood band edges without full OPTIMAL solves at every trial p, with brentq polish and full-min fallback on unknown. Default crossing_mode stays full; notebook 07 enables feasibility for KM bands. Co-authored-by: Cursor <cursoragent@cursor.com>
Accumulate Work across excess_at_most and run_MINLP fallback chains so benchmarks can compare effort without wall-clock sleep contamination. Co-authored-by: Cursor <cursoragent@cursor.com>
Record outer-oracle status during level crossing search so endpoint clipping skips redundant full minimizes when outside is already proven. Add OracleCostTracker for Work-based probe biasing. Co-authored-by: Cursor <cursoragent@cursor.com>
Report oracle/minimize/total Work, speedup vs full baseline, and add skip-full plus optional time-limit flags for long Poisson runs. Co-authored-by: Cursor <cursoragent@cursor.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.