Calculate oGFisher statistics when input p-values are independent.
This is the gold standard for independent inputs and is substantially faster than
using stat.oGFisher with M = diag(n).
stat.oGFisher_ind(p, DF, W)A list with the following components:
Vector of GFisher test statistics, one for each row of DF
Vector of individual p-values for each GFisher test
Minimum p-value among all GFisher tests
Cauchy combination test statistic for combining the p-values
Calculate oGFisher Statistics Under Independence
This function is the gold standard for computing oGFisher statistics when inputs are independent.
It computes:
Individual GFisher statistics using stat.GFisher
P-values using p.GFisher_ind (fast independent method)
Minimum p-value and Cauchy combination statistic
The Cauchy combination statistic handles very small p-values (< 1e-15) using the approximation \(1/(P_i \cdot \pi)\).
Zhang, H., & Wu, Z. (2023). The generalized Fisher's combination and accurate p-value calculation under dependence. Biometrics, 79(2), 1159-1172.
if (FALSE) { # \dontrun{
# Requires coga package
if (requireNamespace("coga", quietly = TRUE)) {
set.seed(123)
n <- 10
nGF <- 3
# Create test configurations
DF <- matrix(runif(n * nGF, 0.5, 5), ncol = n) / 10
W <- abs(matrix(rnorm(n * nGF), ncol = n))
# Under H0
p <- runif(n)
result_null <- stat.oGFisher_ind(p = p, DF = DF, W = W)
print(result_null)
# With potential signal
p[1] <- 0.00001
result_signal <- stat.oGFisher_ind(p = p, DF = DF, W = W)
print(result_signal)
# Compare with general method (should be similar but slower)
result_general <- stat.oGFisher(p = p, DF = DF, W = W, M = diag(n), method = "HYB")
print(result_general)
}
} # }