| p_fisher | R Documentation |
Fisher's method for combining p-values across studies. The method transforms the individual study p-values using the natural logarithm and evaluates the sum against a chi-squared distribution.
p_fisher(
estimates,
SEs,
mu = 0,
heterogeneity = "none",
phi = NULL,
tau2 = NULL,
check_inputs = TRUE,
input_p = "greater",
output_p = "two.sided"
)
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: |
The Fisher test statistic for k studies is defined as:
f = -2 \sum_{i=1}^k \log(p_i)
Under the global null hypothesis, each p_i is assumed to be
uniformly distributed on [0, 1]. The test statistic f therefore follows a
chi-squared distribution with 2k degrees of freedom: \chi^2_{2k}.
The combined p-value, p_F, is calculated as the probability of observing a
value strictly greater than f from this distribution:
p_F = \Pr(\chi^2_{2k} > f)
Important note on orientation: Unlike Edgington's method, Fisher's method
is not orientation-invariant. The combined p-value depends on
the direction of the one-sided p-values (controlled by the
input_p argument).
Specifically, Fisher's and Pearson's methods are mirrored. Computing the Fisher combined p-value for the "greater" alternative is equal to 1 minus the Pearson combined p-value for the "less" alternative.
A numeric vector of combined p-values corresponding
to each value of mu.
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.
Fisher R.A. Statistical Methods for Research Workers. 4th ed. Oliver & Boyd; 1932. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1093/oso/9780198522294.002.0003")}
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(),
p_edgington_w(),
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 Fisher's method to calculate the combined p-value
p_fisher(
estimates = estimates,
SEs = SEs,
mu = mu,
heterogeneity = "none",
output_p = "two.sided",
input_p = "greater"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.