Combines \(K\) p-values from correlated or independent tests into a single meta-analysis p-value using the Cauchy combination test (Liu & Xie 2020). Unlike Fisher's method, the test remains valid under arbitrary dependency structures among p-values.

cauchy_combine(p_values, weights = NULL)

Arguments

p_values

Numeric vector of p-values (\(K \ge 2\)). Values must be in \((0, 1]\). Exact zeros are clipped to .Machine$double.eps.

weights

Optional non-negative numeric weight vector of the same length as p_values. Defaults to equal weights.

Value

A single numeric p-value in \((0, 1]\).

References

Liu, Y. and Xie, J. (2020). Cauchy Combination Test: A Powerful Test With Analytic p-Value Calculation Under Arbitrary Dependency Structures. J. Am. Stat. Assoc. 115(529), 393–402. doi:10.1080/01621459.2018.1554485

Examples

# Combine African-ancestry and European-ancestry p-values for one gene
cauchy_combine(c(0.01, 0.04))
#> [1] 0.01600759

# Three-population meta-analysis
cauchy_combine(c(0.01, 0.04, 0.20))
#> [1] 0.02318602

# Weighted combination (double weight on AFR)
cauchy_combine(c(0.01, 0.04), weights = c(2, 1))
#> [1] 0.01333724

# Apply across a results table (one gene per row)
# mapply(cauchy_combine, split(cbind(p_aa, p_ee), seq_len(nrow(res))))