View source: R/enrichment_functions.R

combinePvalues | R Documentation |

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.

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.

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")

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.