Skip to content

fix(sensitivity): make the run-to-run noise window symmetric in the two refits - #216

Merged
MaartenMarsman merged 2 commits into
developfrom
fix/f5-symmetric-noise-window
Oct 22, 2026
Merged

MaartenMarsman merged 2 commits into
developfrom
fix/f5-symmetric-noise-window

Conversation

@MaartenMarsman

Copy link
Copy Markdown
Collaborator

Handoff finding F5 (dev/audit/2026-10-16-prior-sensitivity-review-handoff.md).

wobble_yardstick() selected threshold-relevant edges (|log BF| <= 3 log 10) on the first refit alone. An edge that saturated in the replicate but not in the first refit could carry the noise band up, and the reverse case was dropped without being counted. The band now pools the edges inside the window in both refits, and an edge inside it in only one of them, saturated or finite beyond the window, is counted as censored whichever refit that is. The tutorial's Appendix D already describes this rule.

Changes: R/prior_sensitivity.R (the function, its roxygen, the printed censored line), the regenerated Rd, one sentence in vignettes/prior-sensitivity.Rmd, two tests for the swapped-input symmetry, and a NEWS entry saying the band and the within-noise classification can change for edges near the thresholds.

Reproduction (dev/review-2026-08/repro/run-f5.sh, develop vs this branch):

  • the handoff's example, log(c(2, 2)) vs log(c(2000, 3)): develop gives a band of 6.58 one way and 0.41 the other, censored 0 both ways; this branch gives 0.41 both ways, censored 1.
  • an edge at |log BF| 2.30 in the first refit and 9.21 in the replicate: develop pools it (band 5.94); this branch censors it (band 0.46, censored 1).
  • a small Wenchuan check whose only censored edge saturates in the replicate: identical band, count and mover classification on both sides; only the printed wording of the censored line differs.

test-prior-sensitivity.R on the branch: 104 pass, 0 fail (every-run tier).

…wo refits

wobble_yardstick() selected threshold-relevant edges on the first refit
alone, so an edge that saturated in the replicate but not in the first
refit could carry the noise band up, and the reverse case was dropped
silently (handoff F5). The band now pools the edges inside the window in
both refits and counts an edge inside it in only one of them as censored,
whichever refit that is. Roxygen, the printed censored line, the vignette
and NEWS state the rule; two tests cover the swapped-input symmetry.
@MaartenMarsman
MaartenMarsman merged commit 674be3a into develop Oct 22, 2026
7 of 8 checks passed
@MaartenMarsman
MaartenMarsman deleted the fix/f5-symmetric-noise-window branch October 22, 2026 08:49
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