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)

Arguments

p

A numeric vector of input p-values.

DF

A matrix of degrees of freedom. Each row is the df vector for a GFisher test.

W

A matrix of weights. Each row is the weight vector for a GFisher test.

Value

A list with the following components:

STAT

Vector of GFisher test statistics, one for each row of DF

PVAL

Vector of individual p-values for each GFisher test

minp

Minimum p-value among all GFisher tests

cct

Cauchy combination test statistic for combining the p-values

Details

Calculate oGFisher Statistics Under Independence

This function is the gold standard for computing oGFisher statistics when inputs are independent.

It computes:

  1. Individual GFisher statistics using stat.GFisher

  2. P-values using p.GFisher_ind (fast independent method)

  3. 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)\).

References

Zhang, H., & Wu, Z. (2023). The generalized Fisher's combination and accurate p-value calculation under dependence. Biometrics, 79(2), 1159-1172.

Author

Hong Zhang, Zheyang Wu

Examples

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)
}
} # }