Skip to content

Stabilize SPA root finding and tail evaluation - #49

Merged
quattro merged 1 commit into
mainfrom
spa-root-finding
Sep 10, 2026
Merged

quattro merged 1 commit into
mainfrom
spa-root-finding

Conversation

@quattro

@quattro quattro commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Addresses #48 .

SPA’s Newton solver could stall at the cumulant-generating function’s domain boundary and silently fall back to an uncorrected normal p-value, producing large changes in ACAT results between nearly identical null fits.

To address this, we replaced Newton with bisection using finite, sign-changing brackets inside the valid domain. At the same time, we improved numerics overall by computing tail calculations in log space to avoid overflow.

Failed SPA attempts now return NaN rather than silently substituting the normal approximation. Regression tests and plasma chr22 scans confirm that the diagnosed failures are resolved without meaningful default-runtime overhead, although some tolerance dependence remains.

@quattro
quattro merged commit e7af621 into main Sep 10, 2026
8 checks passed
@quattro
quattro deleted the spa-root-finding branch September 10, 2026 17:01
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