FAQ/Rfishp - CBU statistics Wiki

Upload page content

You can upload content for the page named below. If you change the page name, you can also upload content for another page. If the page name is empty, we derive the page name from the file name.

File to load page content from
Page name
Type the odd letters out: scieNce GATHeRS knowledge fAster tHAN SOCIeTY GATHErS wisdom

location: FAQ / Rfishp

R code for combining p-values using Bailey and Gribskov (1998) method

pfish <- function(p) {

t <- prod(p)
x <- -log(prod(p))
n <- length(p)
v <- c(1:n-1)
a <- t*(x^v)/factorial(v)
pf <- sum(a)
pvals <- NA
pf <- function(pl) {
{ if (any(is.na(pl))) { res <- "There was an empty array of p-values"}
res <- pfish(pvals) }

Running this inputting a list of pvalues on vector pvals

pvals <- c(0.1,0.01,0.01,0.7,0.3,0.1)

we get

[1] 0.002148704