Skip to content

Implement MC-SIMEX method and enhance comparison notebooks - #33

Merged
hroskes merged 31 commits into
mainfrom
kombine-methods-comparison
Sep 16, 2026
Merged

hroskes merged 31 commits into
mainfrom
kombine-methods-comparison

Conversation

@hroskes

@hroskes hroskes commented Sep 16, 2026

Copy link
Copy Markdown
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.

hroskes and others added 30 commits August 11, 2026 14:27
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>
@hroskes
hroskes merged commit 44c2da3 into main Sep 16, 2026
12 checks passed
@hroskes
hroskes deleted the kombine-methods-comparison branch September 16, 2026 17:40
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