fisher.method: Perform Fisher's Method for combining p-values
Description
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 \sum^k \log p$$, which follows a $\chi^2$ distribution
with $2k$ degrees of freedom.
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
Value
This method returns a data.frame containing the following columns
SThe statistic
num.pThe number of p-values used to calculate S
p.valueThe overall p-value
p.adjThe adjusted p-value
Details
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.
References
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.
set.seed(123)
pp <- matrix(c(runif(20),c(0.001,0.02,0.03,0.001)), ncol=4)
pp[2,3] <- NAfisher.method(pp) #returns one NA rowfisher.method(pp, na.rm=TRUE) #ignore NA entry in that row