Description Usage Arguments Details Value Author(s) References See Also Examples
Function for combining p-values by performing Fisher's method. The approach as described by Fisher's combines p-values to a statistic
S = -2 ∑^k \log p
, which follows a χ^2 distribution with 2k degrees of freedom.
1 2 | fisher.method(pvals, method = c("fisher"), p.corr = c("bonferroni",
"BH", "none"), zero.sub = 1e-05, na.rm = FALSE, mc.cores=NULL)
|
pvals |
A matrix or data.frame containing the p-values from the single tests |
method |
A string indicating how to combine the p-values for deriving a sumary p-value. Currently only the classical approach described by Fisher is implemented. |
p.corr |
Method for correcting the summary p-values. BH: Benjamini-Hochberg (default); Bonferroni's method or no ('none') correction are currently supported. |
zero.sub |
Replacement for p-values of 0 |
na.rm |
A flag indicating whether NA values should be removed from the analysis. |
mc.cores |
Currently ignored |
As log(0)
results in Inf
we replace p-values of 0 by default with a
small float. If you want to keep them as 0 you have to provide 0
as a parameter in zero.sub
.
Note that only p-values between 0 and 1 are allowed to be passed to this method.
This method returns a data.frame containing the following columns
S |
The statistic |
num.p |
The number of p-values used to calculate S |
p.value |
The overall p-value |
p.adj |
The adjusted p-value |
Karl Kugler <karl@eigenlab.net>
Fisher, R.A. (1925). Statistical Methods for Research Workers. Oliver and Boyd (Edinburgh). Moreau, Y.et al. (2003). Comparison and meta-analysis of microarray data: from the bench to the computer desk. Trends in Genetics, 19(10), 570-577.
fisher.sum
, fisher.method.perm
1 2 3 4 5 | set.seed(123)
pp <- matrix(c(runif(20),c(0.001,0.02,0.03,0.001)), ncol=4)
pp[2,3] <- NA
fisher.method(pp) #returns one NA row
fisher.method(pp, na.rm=TRUE) #ignore NA entry in that row
|
S num.p p.value p.adj
1 6.777894 4 0.560775005 0.560775005
2 NA 4 NA NA
3 21.341682 4 0.006293087 0.015732716
4 9.851807 4 0.275581603 0.344477004
5 10.028259 4 0.263048102 0.344477004
6 27.912704 4 0.000491135 0.002455675
S num.p p.value p.adj
1 6.7778939 4 0.560775005 0.67293001
2 0.7965067 3 0.992167008 0.99216701
3 21.3416818 4 0.006293087 0.01887926
4 9.8518073 4 0.275581603 0.41337240
5 10.0282590 4 0.263048102 0.41337240
6 27.9127045 4 0.000491135 0.00294681
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.