Package 'GFisher'

Title: Generalized Fisher's Combination Tests Under Dependence
Description: Accurate and computationally efficient p-value calculation methods for a general family of Fisher type statistics (GFisher). The GFisher covers Fisher's combination, Good's statistic, Lancaster's statistic, weighted Z-score combination, etc. It allows a flexible weighting scheme, as well as an omnibus procedure that automatically adapts proper weights and degrees of freedom to a given data. The new p-value calculation methods are based on novel ideas of moment-ratio matching and joint-distribution approximation. The technical details can be found in Hong Zhang and Zheyang Wu (2020) <arXiv:2003.01286>.
Authors: Hong Zhang and Zheyang Wu
Maintainer: Hong Zhang <[email protected]>
License: GPL-2
Version: 0.2.0
Built: 2025-01-04 02:53:22 UTC
Source: https://github.com/cran/GFisher

Help Index


Survival function of the generalized Fisher's p-value combination statistic.

Description

Survival function of the generalized Fisher's p-value combination statistic.

Usage

p.GFisher(q, df, w, M, p.type = "two", method = "HYB", nsim = NULL)

Arguments

q

- observed GFisher statistic.

df

- vector of degrees of freedom for inverse chi-square transformation for each p-value. If all df's are equal, it can be defined by the constant.

w

- vector of weights.

M

- correlation matrix of the input statistics.

p.type

- "two" = two-sided p-values, "one" = one-sided p-values.

method

- "MR" = simulation-assisted moment ratio matching, "HYB" = moment ratio matching by quadratic approximation, "GB" = Brown's method with calculated variance. See details in the reference.

nsim

- number of simulation used in the "MR" method, default = 5e4.

Value

p-value of the observed GFisher statistic.

References

Hong Zhang and Zheyang Wu. "Accurate p-Value Calculation for Generalized Fisher's Combination Tests Under Dependence", <arXiv:2003.01286>.

Examples

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)))
gf1 = stat.GFisher(pval, df=2, w=1)
gf2 = stat.GFisher(pval, df=1:n, w=1:n)
p.GFisher(gf1, df=2, w=1, M=M, method="HYB")
p.GFisher(gf1, df=2, w=1, M=M, method="MR", nsim=5e4)
p.GFisher(gf2, df=1:n, w=1:n, M=M, method="HYB")
p.GFisher(gf2, df=1:n, w=1:n, M=M, method="MR", nsim=5e4)

P-value of the omnibus generalized Fisher's p-value combination test.

Description

P-value of the omnibus generalized Fisher's p-value combination test.

Usage

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

Arguments

p

- vector of input p-values.

DF

- matrix of degrees of freedom for inverse chi-square transformation for each p-value. Each row represents a GFisher test.

W

- matrix of weights. Each row represents a GFisher test.

M

- correlation matrix of the input statistics.

p.type

- "two" = two-sided p-values, "one" = one-sided p-values.

method

- "MR" = simulation-assisted moment ratio matching, "HYB" = moment ratio matching by quadratic approximation, "GB" = Brown's method with calculated variance. See details in the reference.

combine

- "cct" = oGFisher using the Cauchy combination method, "mvn" = oGFisher using multivariate normal distribution.

nsim

- number of simulation used in the "MR" method, default = 5e4.

Value

1. p-value of the oGFisher test. 2. individual p-value of each GFisher test.

References

Hong Zhang and Zheyang Wu. "Accurate p-Value Calculation for Generalized Fisher's Combination Tests Under Dependence", <arXiv:2003.01286>.

Examples

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)))
DF = rbind(rep(1,n),rep(2,n))
W = rbind(rep(1,n), 1:10)
p.oGFisher(pval, DF, W, M, p.type="two", method="HYB", combine="cct")

Generalized Fisher's p-value combination statistic.

Description

Generalized Fisher's p-value combination statistic.

Usage

stat.GFisher(p, df = 2, w = 1)

Arguments

p

- vector of input p-values.

df

- vector of degrees of freedom for inverse chi-square transformation for each p-value. If all df's are equal, it can be defined by the constant.

w

- vector of weights.

Value

GFisher statistic sum_i w_i*qchisq(1 - p_i, df_i).

References

Hong Zhang and Zheyang Wu. "Accurate p-Value Calculation for Generalized Fisher's Combination Tests Under Dependence", <arXiv:2003.01286>.

Examples

n = 10
pval = runif(n)
stat.GFisher(pval, df=2, w=1)
stat.GFisher(pval, df=rep(2,n), w=rep(1,n))
stat.GFisher(pval, df=1:n, w=1:n)