This is an R package for global testing applying the heavy-tailed combination test. P-values are first transformed into heavy-tailed distributed variables and are then aggregated. Here we provide a function that users can perform heavy-tailed combination tests using a wide class of regularly varying tail distributions with different tail indexes. Specifically, distributions that we have implemented include t, left-truncated t, Pareto, Frechet, inverse Gamma, and Levy. We also allow users to provide pre-chosen weights and our method also include widely-applied Cauchy combination test and harmonic mean p-value. For details, please refer to our paper.
As a practical guidance, our default setting is to use left-truncated t with tail index 1 (which is a left-truncated Cauchy distribution) as the transformation for the combination test, with the truncation threshold
library(devtools)
install_github("gl-ybnbxb/heavytailcombtest")
The combination.test
takes in a base p-value vector and returns a global p-value.
As an example, we simulate an one-sided p-value vector with the number of base hypotheses
library(heavytailcombtest)
## Simulate a one-sided p-value vector of size 5 with 5 base hypotheses under the global null
data <- data_Gen(n = 1, p = 5, mu = rep(0,5), rho = -0.2, copula = 't', one_sided = T)
p.vec <- as.vector(data$p.mat)
By default, we recommend using the left-truncated t-distribution-based combination test. Denote the truncation threshold as
p.global <- combination.test(p.vec, method = 't', tail.idx = 1, truncate = T, truncate.threshold = 0.9)
We can also apply other distributions, for example, the inverse Gamma distribution for the combination test and provide a pre-chosen weight vector, proportional to the importance and efficiency of each individual hypothesis.
p.global <- combination.test(p.vec, weights = 1:5, method = 'Inverse Gamma', tail.idx = 1)
To apply the Cauchy combination test using our code, select the student t distribution, tail index
p.global <- combination.test(p.vec, weights = rep(1, 5)/5, method = 't', tail.idx = 1)
To apply the harmonic mean p-value using our code, select the Pareto distribution, tail index
p.global <- combination.test(p.vec, weights = rep(1, 5)/5, method = 'pareto', tail.idx = 1)