P-Value adjustment for multiple comparisons: Difference between revisions

From Powers Wiki
(Created page with "Having a set of p-valued and adjust them for multiple comparisons * Read the file in R: metab <- read.csv("sample.csv", header=F) <br> * Change the data to matrix and then...")
 
(Added to Category)
Line 14: Line 14:
For detailed information read:
For detailed information read:
https://stat.ethz.ch/R-manual/R-devel/library/stats/html/p.adjust.html
https://stat.ethz.ch/R-manual/R-devel/library/stats/html/p.adjust.html
[[category:Protocols]]
[[category:Metabolomics]]
[[category:Data_Processing_and_Analysis]]

Revision as of 03:56, 11 September 2021

Having a set of p-valued and adjust them for multiple comparisons

  • Read the file in R:
   metab <- read.csv("sample.csv", header=F) 
  • Change the data to matrix and then to vector (N.B the p.adjust function only works with vector)
   metab <- data.matrix(metab)
   metab <- as.vector(metab)
  • Adjust the p-value: load the p-value and decide the method
   padj <- p.adjust(metab, method= "fdr")

N.B: The adjustment methods include the Bonferroni correction ("bonferroni") in which the p-values are multiplied by the number of comparisons. Less conservative correction are also included by Holm (1979) ("holm"), Hochberg (1988) ("hochberg"), Hommel (1988) ("hommel"), Benjamini & Hochberg (1995) ("BH" or its alias "fdr"), and Benjamini & Yekutieli (2001) ("BY"), respectively. A pass-through option ("none") is also included. The set of methods are contained in the p.adjust.methods vector for the benefit of methods that need to have the method as an option and pass it on to p.adjust.

For detailed information read: https://stat.ethz.ch/R-manual/R-devel/library/stats/html/p.adjust.html