Learn R Programming

ActivePathways (version 1.0.1)

merge_p_values: Merge a list or matrix of p-values

Description

Merge a list or matrix of p-values

Usage

merge_p_values(scores, method = c("Fisher", "Brown", "logitp", "meanp",
  "sump", "sumz", "sumlog"))

Arguments

scores

Either a list of p-values or a matrix where each column is a test

method

Method to merge p-values. See 'methods' section below.

Value

If scores is a vector or list, returns a number. If scores is a matrix, returns a named list of p-values merged by row

Methods

There are multiple methods available that can be used to merge a list of p-values. The main methods encouraged by this package are:

Fisher or sumlog

Fisher's method assumes p-values are uniformly distributed and performs a chi-squared test on the statistic sum(-2 log(p)). This method is most appropriate when the columns in scores are independent.

Brown

Brown's method extends Fisher's method by accounting for the covariance in the columns of scores. It is more appropriate when the tests of significance used to create the columns in scores are not necessarily independent. Note that the "Brown" method cannot be used with a single list of p-values. However, in this case Brown's method is identical to Fisher's method.

Other methods are also available. See metap-package for more details

Examples

Run this code
# NOT RUN {
merge_p_values(c(0.05, 0.09, 0.01))
merge_p_values(list(a=0.01, b=1, c=0.0015, d=0.025), method='meanp')
merge_p_values(matrix(data=c(0.03, 0.061, 0.48, 0.052), nrow=2), method='Brown')

# }

Run the code above in your browser using DataLab