feat(mbco_mi): fixed-branch ARIV option + branch-mixing diagnostics - #44
Merged
Conversation
- medsim_method_mbco_mi(ariv = c('own','fixed')): always emits indirect_p_fixed,
branch_mix, p_branch_a, stacked_branch, r4, r4_fixed (additive to the contract;
indirect_p unchanged unless ariv='fixed')
- .medsim_d4_mbco(fixed_branch=): d_k recomputed on the stacked fit's branch;
returns stacked_branch; numerator d_S shared
- tests: 4 new (contract+diagnostics, routing, r4_fixed >= r4, K=1 coincidence);
full suite 1137 pass / 0 fail / 1 skip
- NEWS: dev-version entry
Motivation: Missing Effect ms:check 2026-08-16 (Fable KO #2) + comparator pilot:
own-branch r4 < fixed-branch r4 in every cell -> interior-null D4 liberal.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ARIV .medsim_d4_mbco() gains an lls_S passthrough; medsim_method_mbco_mi() computes the stacked log-likelihood triple once and passes it to both the own-branch and fixed-branch calls (was refit twice per replication). No numeric change. Addresses /code-review 44 finding. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Data-Wise
pushed a commit
that referenced
this pull request
Aug 17, 2026
…note Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Merged
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.
Summary
medsim_method_mbco_mi()gainsariv = c("own", "fixed")and always emits additive diagnostics next to the method contract:indirect_p_fixed,branch_mix,p_branch_a,stacked_branch,r4,r4_fixed.indirect_pis unchanged unlessariv = "fixed"(default"own"= legacy Chan–Meng)..medsim_d4_mbco(fixed_branch = ): per-imputation statistics recomputed on the branch the stacked constrained fit selected; numeratord_Sshared; returnsstacked_branch.medsim_analyze_*,cluster.Rcollapse audit, and existing consumers are untouched (branch_switchsemantics unchanged).Why
Standard
r4averages per-imputation MBCO statistics each computed on its own winning branch. When imputations disagree on the branch (Missing Effect pilot: 21–91% of replicates near the null), that average is pulled down, the ARIV is under-estimated, and D4 is inflated. Missing Effectms:check2026-08-16 (Fable KO #2) +code/pilot-comparators-2026-08-16.R: own-branchr4< fixed-branchr4in every cell; interior-null D4 .062–.096 vs .020–.070 fixed.Tests (run in this worktree)
devtools::test()→ 1137 passed / 0 failed / 1 skipped (baseline dev: same skip). 4 new tests intest-methods-missing.R: contract + diagnostics present;ariv="fixed"routesindirect_p_fixedintoindirect_pwith identical point estimate;r4_fixed >= r4with shared numerator; K=1 (complete data) → both p-values coincide,branch_mix = 0.E2E (live,
devtools::load_all(), interior null a=.39 b=0, n=120, 25% MAR on M and Y, m=20)Mixing case: own-branch r4 under-estimates (0.278 vs 0.884) and p moves from .083 to .156; no-mixing case: identical, as required.
Follow-up
Release as 0.5.1 so Missing Effect can bump its
config.Rguard and run the queued fixed-branch Hopper re-run (.STATUSQUEUED-2026-08-17).🤖 Generated with Claude Code