stouffer_zscore: Stouffer

View source: R/stouffer_Z_score.R

stouffer_zscoreR Documentation

Stouffer

Description

Stouffer's Z-score method

Usage

stouffer_zscore(pvals, weights = rep(1, seq_along(pvals)), side = "two")

Arguments

pvals

A vector of p-values

weights

A vector of weights

side

How the p-values were generated. One of 'right', 'left' or 'two'.

Details

Given a set of i.i.d p-values and associated weights, it combines the p-values p_i. Letting φ be the standard normal cumulative distribution function and Z_i =φ^{-1} (1-p_i), the meta-analysis Z-score is

Z = (∑ w_i Z_i) * (∑ (w_i)^2)^(-1/2)

Value

A list containing the following components:

  • statistic the value of the test statistic.

  • p.value the p-value of the test.

References

Samuel Andrew Stouffer. Adjustment during army life. Princeton University Press, 1949.

Examples

 pvals <- runif(100, 0, 1)
 weights <- runif(100, 0, 1)
 stouffer_zscore(pvals, weights)

HectorRDB/Ecume documentation built on June 21, 2022, 7:13 a.m.