combinePvalVector: Combine P Values Using Fisher's Method or Stouffer's Method

View source: R/pipeline_functions.R

combinePvalVectorR Documentation

Combine P Values Using Fisher's Method or Stouffer's Method

Description

combinePvalVector is a function to combine multiple comparison's P values using Fisher's method or Stouffer's method.

Usage

combinePvalVector(pvals, method = "Stouffer", signed = TRUE, twosided = TRUE)

Arguments

pvals

a vector of numerics, the P values from multiple comparison need to be combined.

method

character, users can choose between "Stouffer" and "Fisher". Default is "Stouffer".

signed

logical, if TRUE, will give a sign to the P value to indicate the direction of testing. Default is TRUE.

twosided

logical, if TRUE, P value is calculated in a one-tailed test. If FALSE, P value is calculated in a two-tailed test, and it falls within the range 0 to 0.5. Default is TRUE.

Value

Return a vector contains the "Z-statistics" and "P.Value".

Examples

combinePvalVector(c(0.1,1e-3,1e-5))
combinePvalVector(c(0.1,1e-3,-1e-5))

jyyulab/NetBID documentation built on Dec. 23, 2024, 6:34 a.m.