View source: R/pfun_edgington.R
| p_edgington | R Documentation |
Edgington’s method for combining p-values across studies. The method forms a sum of individual study p-values and evaluates it against the exact or approximate null distribution.
Under the global null hypothesis, the null distribution of the sum is given
by the Irwin–Hall distribution. For a weighted generalization of this
procedure, see p_edgington_w.
p_edgington(
estimates,
SEs,
mu = 0,
heterogeneity = "none",
phi = NULL,
tau2 = NULL,
check_inputs = TRUE,
input_p = "greater",
output_p = "two.sided",
approx = TRUE
)
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 |
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 |
input_p |
Type of study-level p-values used in the combination:
|
output_p |
Character string specifying the combined
p-value type: |
approx |
Logical (default |
The classical Edgington statistic is defined for k studies as
S = \sum_{i=1}^k p_i,
where p_i are individual study p-values. Under the global null
hypothesis, each p_i is assumed to be
uniformly distributed on [0, 1].
Important note on orientation: Edgington's method is orientation-invariant.
The combined p-value is symmetric with respect to the direction of the
one-sided p-values (controlled by the input_p argument).
Specifically, computing the Edgington combined p-value for the "greater" alternative results in 1 minus the Edgington combined p-value for the "less" alternative.
A numeric vector of combined p-values corresponding
to each value of mu.
The combined p-value, p_E, is the probability of observing a sum
less than or equal to S under the null hypothesis. This is computed in
one of two ways:
Exact Method: The function uses the exact Irwin-Hall distribution to compute the combined p-value:
p_E = \frac{1}{k!} \sum_{j=0}^{\lfloor S \rfloor} (-1)^j \binom{k}{j} (S - j)^k
Normal Approximation: For a large number of studies (k \geq 12),
the distribution of the sum is approximated by a Normal distribution with:
\mathrm{E}[S] = \frac{k}{2}
\mathrm{Var}(S) = \frac{k}{12}
The final output depends on the output_p and input_p arguments:
If output_p = "two.sided" (the default) and the inputs are
one-sided (input_p is "greater" or "less"), the function
combines the one-sided p-values to obtain the intermediate combined
p-value p_c, and returns a symmetrized, two-sided p-value:
p_{2s} = 2 \min(p_c, 1 - p_c).
If output_p = "one.sided", the function
returns the inherently one-sided combined p-value p_c
directly, without symmetrization.
If input_p is "two.sided", the input p_i
are already two-sided, and no further symmetrization is applied.
Edgington, E. S. (1972). An additive method for combining probability values from independent experiments. The Journal of Psychology, 80(2): 351-363. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1080/00223980.1972.9924813")}
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")}
Other p-value combination functions:
p_edgington_w(),
p_fisher(),
p_hmean(),
p_pearson(),
p_stouffer(),
p_tippett(),
p_wilkinson()
# Simulating estimates and standard errors
n <- 15
estimates <- rnorm(n)
SEs <- rgamma(n, 5, 5)
# Set up a vector of means under the null hypothesis
mu <- seq(
min(estimates) - 0.5 * max(SEs),
max(estimates) + 0.5 * max(SEs),
length.out = 100
)
# Using Edgington's method to calculate the combined p-value
p_edgington(
estimates = estimates,
SEs = SEs,
mu = mu,
heterogeneity = "none",
output_p = "two.sided",
input_p = "greater",
approx = TRUE
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.