Cauchy combination of p-values
acat_combine.RdCombines several p-values into one using the Cauchy combination test of Liu and Xie (2020). The p-values may be arbitrarily dependent on one another.
Arguments
- p
Numeric vector of p-values in \([0, 1]\). Supply this or the pair
log_pandlog_1mp.- weights
Numeric vector of nonnegative weights, the same length as the p-values. Rescaled to sum to 1. Defaults to equal weights.
- log_p
Numeric vector of \(\log(p_k)\).
- log_1mp
Numeric vector of \(\log(1 - p_k)\).
- log.p
If TRUE, return the log of the combined p-value rather than the p-value itself. Use this when the answer is small enough to round to 0.
Value
A single p-value, or its log when log.p is TRUE. A component
at exactly 0 gives 0 and one at exactly 1 gives 1, since either decides the
combination on its own. Components at both endpoints at once raise an
error, because the two disagree infinitely; supply the log-scale pair
instead, which usually shows neither was really at an endpoint.
Details
The statistic is a weighted sum of Cauchy-transformed p-values, $$T = \sum_k w_k \tan\{(0.5 - p_k)\pi\},$$ referred to a standard Cauchy distribution. The transform is what makes this work: when \(p_k\) is uniform on \((0,1)\) under the null, as a p-value must be, \(\tan\{(0.5 - p_k)\pi\}\) is standard Cauchy, and the Cauchy family is closed under averaging. The p-value supplied must therefore be the ordinary two-sided p-value on \((0,1)\), not a one-sided p-value on \((0, 0.5)\). If you hold a one-sided p-value \(q\), double it before passing it here.
Liu and Xie prove that the tail of the null distribution of \(T\) is well approximated by a standard Cauchy under any correlation structure among the p-values, with the ratio of the true size to the nominal level tending to 1 as the level tends to 0. Under independence, and under perfect dependence where every \(p_k\) is equal, the null distribution is exactly standard Cauchy, so the combination returns a uniform p-value.
The transform has poles at \(p = 0\) and \(p = 1\), so a component that
arrives already rounded to either endpoint carries infinite weight. Supply
log_p and log_1mp instead of p whenever you can compute
them, which for a test with a known reference distribution means asking for
both tails on the log scale rather than subtracting from 1. The arithmetic
below never forms \(\tan()\) of a saturated number and never overflows,
however extreme the components are.