karoliskoncevicius / matrixTests

R package for computing multiple hypothesis tests on rows/columns of a matrix or a data.frame
https://cran.r-project.org/web/packages/matrixTests/index.html
36 stars 5 forks source link

multiple test correction options? #23

Closed MADscientist314 closed 3 years ago

MADscientist314 commented 3 years ago

Is there anyway to include a padj for multiple test correction using Bonferroni correction or Benjamini-Hochberg procedure?

karoliskoncevicius commented 3 years ago

Good question. I have thought about it and decided against including automatic p-value adjustments for two reasons:

1) While it is true that the package is mostly used in -omics, where the p-values have to be adjusted, it is not the only possible use case. And, based on user feedbacks, the package sometimes ends up being used in quite different circumstances where adjustment doesn't make sense. Like, for example, doing faster simulation-based power analyses.

2) There are many p-value adjustment methods, each with their own goals, and so one method is not better than the other. This means that the users will have to select the most appropriate adjustment method based on their specific needs.

Luckily, adjusting p-values is very easy in R:

res <- col_waerden(iris[,-5], iris[,5])
res$pbonf <- p.adjust(res$pvalue, "bonferroni")

Let me know if this answers the question.

MADscientist314 commented 3 years ago

Thanks for the feedback and the guidance regarding p adjustment. This package has been super helpful!