Calculate statistics for multiple GFisher tests with different degrees of freedom and weights, along with their combination via Cauchy combination test (CCT) or minimum p-value.

stat.oGFisher(
  p,
  DF,
  W,
  M,
  p.type = "two",
  method = "HYB",
  nsim = NULL,
  seed = NULL
)

Arguments

p

A numeric vector of input p-values for the oGFisher test.

DF

A matrix of degrees of freedom for inverse chi-square transformation for each p-value. Each row represents a GFisher test. It can be a matrix with one column, indicating the same degrees of freedom for all p-values's chi-square transformations across different tests.

W

A matrix of non-negative weights. Each row represents a GFisher test. Must have the same dimensions as DF.

M

Correlation matrix of the input Z-scores from which the input p-values were obtained.

p.type

Character string: "two" for two-sided (default), "one" for one-sided input p-values.

method

Character string specifying calculation method:

  • "MR": Simulation-assisted moment ratio matching

  • "HYB": Moment ratio matching by quadratic approximation (default)

  • "GB": Brown's method with calculated variance

nsim

Number of simulations used in the "MR" method. Default is 5e4.

seed

Optional seed for random number generation. Default is NULL.

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

Compute the oGFisher Test Statistics

The oGFisher (omnibus GFisher) test evaluates multiple GFisher statistics simultaneously, each with potentially different degrees of freedom and weighting schemes. This allows for a flexible and powerful approach to combining p-values.

The function computes:

  1. Individual GFisher statistics for each row of DF and W

  2. Corresponding p-values for each statistic

  3. Minimum p-value across all tests

  4. Cauchy combination statistic (CCT) for robust aggregation

Cauchy Combination:

The CCT statistic is computed as \(\bar{T} = \frac{1}{m}\sum_{i=1}^m \tan[\pi(0.5 - P_i)]\), where \(P_i\) are the individual GFisher p-values. This approach is robust to dependence and handles very small p-values through a special transformation.

P-values larger than 0.9 are capped at 0.9 to improve stability. Very small p-values (< 1e-15) are handled using a special 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.

Liu, Y., & Xie, J. (2020). Cauchy combination test: a powerful test with analytic p-value calculation under arbitrary dependency structures. Journal of the American Statistical Association, 115(529), 393-402.

Author

Hong Zhang, Zheyang Wu

Examples

# Example: Multiple GFisher tests with different df and weights
set.seed(123)
n <- 10
M <- matrix(0.3, n, n) + diag(0.7, n, n)
zscore <- matrix(rnorm(n), nrow = 1) %*% chol(M)
pval <- 2 * (1 - pnorm(abs(zscore)))

# Define two GFisher tests
DF <- rbind(rep(1, n), rep(2, n))
W <- rbind(rep(1, n), 1:10)

# Calculate oGFisher statistics
result <- stat.oGFisher(pval, DF, W, M, p.type = "two", method = "HYB")
print(result)
#> $STAT
#> [1] 0.5928568 1.3687900
#> 
#> $PVAL
#> [1] 0.7410839 0.7313432
#> 
#> $minp
#> [1] 0.7313432
#> 
#> $cct
#> [1] -0.9173186
#> 

# Alternative: single df per test (expanded internally)
DF_short <- rbind(1, 2)
result2 <- stat.oGFisher(pval, DF = DF_short, W, M, p.type = "two", method = "HYB")