computeZ: Compute Adjusted Z Statistic

View source: R/calcu_adjZ.R

computeZR Documentation

Compute Adjusted Z Statistic

Description

This core function computes the combination method-related adjusted Z statistic for a given observed discrete p-value.

Usage

computeZ(f, f_prev, method)

Arguments

f

A given legitimate discrete p-value. It should be > 0 and <= 1.

f_prev

The next smaller p-value (i.e., the previous element in the p-value support vector). It is zero if f is the smallest possible p-value in its support.

method

The combination method that the adjusted Z statistic is related to. One of "fisher_mean", "fisher_median", "pearson", "george", "stouffer", or "edgington".

Details

The following are the formulas for the adjusted Z statistic when the p-value P=F_i. Notations: \overline{F_i} \equiv 1-F_i; K_i \equiv (2\pi)^{-1/2}\exp [-\Phi^{-1}(F_i)^2/2], where \Phi is the cumulative distribution function of the standard normal distribution.

Method Statistic Value when P=F_i
Fisher Z_F 2-2(F_i-F_{i-1})^{-1}(F_i\log F_i -F_{i-1}\log F_{i-1})
Pearson Z_P 2-2(F_i-F_{i-1})^{-1}(\overline{F_{i-1}}\log \overline{F_{i-1}}-\overline{F_i}\log \overline{F_i})
George Z_G (Z_P-Z_F)/2
Stouffer Z_S (F_i-F_{i-1})^{-1}\left[K_{i-1}-K_i\right]
Edgington Z_E (F_i+F_{i-1})/2

Value

The adjusted Z statistic.

Examples

methods = c("fisher_mean", "fisher_median", "pearson", "george", "stouffer", "edgington")
sapply(methods, function(m) computeZ(0.1, 0.05, m))
sapply(methods, function(m) computeZ(0.1, 0, m)) # f_prev = 0
sapply(methods, function(m) computeZ(1, 0.9, m)) # f = 1
sapply(methods, function(m) computeZ(0.1, 0.1 - 1e-10, m)) # f - f_prev is small

DPComb documentation built on Aug. 22, 2026, 5:08 p.m.

Related to computeZ in DPComb...