fishersMethod: Fisher's method to combine multiple p-values

View source: R/fishersMethod.R

fishersMethodR Documentation

Fisher's method to combine multiple p-values

Description

Fisher's method to combine multiple p-values

Usage

fishersMethod(p, returnValiePvalues = FALSE)

Arguments

p

Numeric vector, p values to be combined

returnValiePvalues

Logical, whether the valid p-values used should be returned as part of the list

Value

A FisherMethodResult S3 object, a list of following elements

  1. chisq: Chi-square statistic

  2. df: Degree of freedom (which is twice the count of the valid p-values used for calculation)

  3. p: p-value

  4. validp (optional): valid p-values used for the calculation

The function returns the combined p-value using the sum of logs (Fisher's) method

Note

The function was adapted from metap::sumlog

Examples

ps <- c(0.05, 0.75)
fishersMethod(ps)
fishersMethod(ps, returnValiePvalues=TRUE)

bedapub/ribiosGSEA documentation built on March 30, 2023, 3:26 p.m.