| adjZ_moments | R Documentation |
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).
adjZ_moments(p, p_support, method = "fisher_mean")
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". |
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.
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. |
# 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.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.