| computeZ | R Documentation |
This core function computes the combination method-related adjusted Z statistic for a given observed discrete p-value.
computeZ(f, f_prev, method)
f |
A given legitimate discrete p-value. It should be > 0 and <= 1. |
f_prev |
The next smaller p-value (i.e., the previous element in the p-value support vector). It is zero if |
method |
The combination method that the adjusted Z statistic is related to. One of "fisher_mean", "fisher_median", "pearson", "george", "stouffer", or "edgington". |
The following are the formulas for the adjusted Z statistic when the p-value P=F_i.
Notations: \overline{F_i} \equiv 1-F_i; K_i \equiv (2\pi)^{-1/2}\exp [-\Phi^{-1}(F_i)^2/2], where \Phi is the cumulative distribution function of the standard normal distribution.
| Method | Statistic | Value when P=F_i |
| Fisher | Z_F | 2-2(F_i-F_{i-1})^{-1}(F_i\log F_i -F_{i-1}\log F_{i-1}) |
| Pearson | Z_P | 2-2(F_i-F_{i-1})^{-1}(\overline{F_{i-1}}\log \overline{F_{i-1}}-\overline{F_i}\log \overline{F_i}) |
| George | Z_G | (Z_P-Z_F)/2 |
| Stouffer | Z_S | (F_i-F_{i-1})^{-1}\left[K_{i-1}-K_i\right] |
| Edgington | Z_E | (F_i+F_{i-1})/2 |
The adjusted Z statistic.
methods = c("fisher_mean", "fisher_median", "pearson", "george", "stouffer", "edgington")
sapply(methods, function(m) computeZ(0.1, 0.05, m))
sapply(methods, function(m) computeZ(0.1, 0, m)) # f_prev = 0
sapply(methods, function(m) computeZ(1, 0.9, m)) # f = 1
sapply(methods, function(m) computeZ(0.1, 0.1 - 1e-10, m)) # f - f_prev is small
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.