R/fishersMethod.R

Defines functions fishersMethod

Documented in fishersMethod

#' Fisher's meta-analysis 
#'
#' This function allows you to calculate a meta-analysis P-value given a vector of P-values.
#' See https://en.wikipedia.org/wiki/Fisher%27s_method.
#' 
#' @param x A vector of numeric P values
#' @return A single meta-analysis P-value
#' @export
fishersMethod = function(x) {
  pchisq(-2 * sum(log(x)),df=2*length(x),lower=FALSE)
}
msxakk89/dat documentation built on Aug. 3, 2020, 6:39 p.m.