p_stouffer: Stouffer's method

View source: R/pfun_stouffer.R

p_stoufferR Documentation

Stouffer's method

Description

Stouffer's method for combining p-values across studies

Usage

p_stouffer(
  estimates,
  SEs,
  mu = 0,
  heterogeneity = "none",
  phi = NULL,
  tau2 = NULL,
  check_inputs = TRUE,
  w = 1/SEs,
  output_p = "two.sided"
)

Arguments

estimates

Numeric vector of study-level effect estimates.

SEs

Numeric vector of corresponding standard errors.

mu

Numeric scalar or vector of null values for the overall effect (default: 0).

heterogeneity

One of c("none", "additive", "multiplicative"). If heterogeneity = "none", p-values are returned for the passed SEs without any adaptation. If heterogeneity = "additive", the standard errors are reassigned the value \sqrt{SEs^2 + \text{tau2}} before computation of the p-values. If heterogeneity = "multiplicative", the standard errors SEs are multiplied by \sqrt{\text{phi}} before computation of the p-values. Defaults to "none".

phi

A numeric vector of length 1. Must be finite and larger than 0. The square root of the argument is used to scale the standard errors.

tau2

A numeric vector of length 1. Additive heterogeneity parameter.

check_inputs

Either TRUE (default) or FALSE. Indicates whether or not to check the input arguments. The idea of this argument is that if the function is called a large amount of times in an automated manner as for example in simulations, performance might be increased by not checking inputs in every single iteration. However, setting the argument to FALSE might be dangerous.

w

Numeric vector of study weights. Defaults to 1/SEs producing the same p-value as meta-analysis

output_p

Character string specifying the combined p-value type: "two.sided" (default) or "one.sided". This controls whether the final combined p-value is symmetrized. Note: To construct valid p-value functions, the confMeta

Details

Stouffer's z-statistic for k studies is defined as

z = \frac{\sum_{i=1}^k w_i z_i}{\sqrt{\sum_{i=1}^k w_i^2}},

where z_i and {w_i} are individual study z-values and weights, respectively. Under the global null hypothesis, each z_i is assumed to follow a standard normal distribution. Stouffer's z-statistic then also follows a standard normal distribution. The combined p-value is calculated as the probability of observing a value equal or greater than z from this distribution:

p_S = \Pr(Z > z)

Value

A numeric vector of combined p-values corresponding to each value of mu.

References

Stouffer SA, et al. The American Soldier. Princeton University Press, 1949. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.2307/2572105")}

Held, L, Hofmann, F, Pawel, S. (2025). A comparison of combined p-value functions for meta-analysis. Research Synthesis Methods, 16:758-785. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1017/rsm.2025.26")}

See Also

Other p-value combination functions: p_edgington(), p_edgington_w(), p_fisher(), p_hmean(), p_pearson(), p_tippett(), p_wilkinson()

Examples

estimates <- c(0.1, 0.2, 0.3)
SEs <- c(0.05, 0.05, 0.1)
p_stouffer(estimates, SEs, mu = 0, heterogeneity = "none")

confMeta documentation built on June 10, 2026, 1:06 a.m.