Description Usage Arguments Value Examples
View source: R/enrichment_functions.R
This function applies the Stouffer method, the Edgington method or the Fisher\'s combined probability test to combine p-values of independent tests that are based on the same null hypothesis. The Stouffer method can also be applied in a weighted fashion.
1 | combinePvalues(df, method = "stouffer", weights = NULL)
|
df |
Data frame where rows represent a certain pathway or gene set and columns represent p-values derived from independent tests, e.g., different omics layer. |
method |
String that specifies the method to combine multiple p-values. Default: "stouffer" Options: "stouffer", "fisher", "edgington" |
weights |
List of weights that will be used in a weighted Stouffer method. |
Vector of length nrow(df)
with combined p-values.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | df <- cbind(runif(5), runif(5), runif(5))
colnames(df) <- c("trans.pval", "prot.pval", "meta.pval")
# run the unweighted summation of z values
combinePvalues(df)
# run the weighted variant
combinePvalues(df, weights = c(10, 5, 1))
# run the Fisher's combined probability test
combinePvalues(df, method = "fisher")
# run the Edgington's method
combinePvalues(df, method = "edgington")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.