adjZ_moments: Calculate Adjusted Z Statistic and Its Moments

View source: R/calcu_adjZ.R

adjZ_momentsR Documentation

Calculate Adjusted Z Statistic and Its Moments

Description

Calculates the adjusted Z statistic and its mean and variance corresponding to an observed p-value and the distribution of the p-value (which is fully characterized by its support vector).

Usage

adjZ_moments(p, p_support, method = "fisher_mean")

Arguments

p

An observed p-value.

p_support

A valid p-value support vector containing increasingly sorted possible p-values.

method

The p-value combination method, one of "fisher_mean" (default), "fisher_median", "pearson", "edgington", "stouffer", or "george".

Details

The input p should be in p_support. If not, the p_support element closest to p will be used to calculate Z, with a warning message. Zmean and Zvar are calculated based on p_support. The adjustment is made based on a specific p-value combination method.

Value

A list with the following elements:

Z

The adjusted Z statistic corresponding to the observed p-value.

Zmean

The mean of the adjusted Z statistic.

Zvar

The variance of the adjusted Z statistic.

Examples

# Example usage:
methods <- c("fisher_mean", "fisher_median", "pearson", "george", "stouffer", "edgington")
p_support <- seq(0.01, 1, length.out = 100)
sapply(methods, function(m) adjZ_moments(p_support[10], p_support, m))
sapply(methods, function(m) adjZ_moments(0.105, p_support, m)) # Warning if p is not in p_support.

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

Related to adjZ_moments in DPComb...