fisher.method.perm(pvals, p.corr = c("bonferroni", "BH", "none"),
zero.sub = 1e-05, B = 10000, mc.cores = NULL, blinker = 1000)
NULL
the multicore
package is used for parallelization
with the given number of cores.=
" after each blinker
rows of
pvals
in order to follow the progress.NA
. We plan on extending this functionality
in upcoming versions.
For large data sets and/or large B
we strongly recommend using
the mc.cores
option as the calculation will otherwise be
computationally demanding. This will call the mclapply
function from the multicore package, which you will have to
install in that case. By default a blinker (a small string "=") is shown after each 1000
rows that were computed. This function allows you to assess the
progress of the analysis. If you don't want to see the blinker set
it to NA
.
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.
fisher.sum
, fisher.method
set.seed(123)
pp <- matrix(c(runif(20),c(0.001,0.02,0.03,0.001)), ncol=4)
fisher.method.perm(pp, B=10, blinker=1)
fisher.method.perm(pp, B=10000, mc.cores=3, blinker=1) #use multicore
Run the code above in your browser using DataLab