Expand description
Mid-p z-score equivalents of hypergeometric deviates.
Pure-Rust port of limma’s zscoreHyper.R (zscore_hyper): the signed
standard-normal deviate matching the mid-p-value of a hypergeometric count.
Tail probabilities are accumulated in log space (via logsumexp) so the
result stays accurate deep into either tail, as in R’s log.p = TRUE path.
Functions§
- zscore_
hyper zscoreHyper(q, m, n, k): z-score equivalent of a hypergeometric deviateq(white balls drawn) for an urn ofmwhite andnblack withkdraws. Uses the mid-p-value — the full tail plus half the point mass atq— and maps the smaller tail through the normal quantile in log space.