Adjust p values ​​for multiple comparisons in matlab

I have an array of p-value cells that need to be adjusted for several comparisons. How can I do this in matlab? I can not find the built-in function.

In R, I would do:

data.pValue_adjusted = p.adjust(data.pValue, method='bonferroni') 

Is there a similar function for matlab? Ideal one that performs various tuning methods (Bonferroni, Benjamini-Hochberg, FDR ...)?

+8
statistics matlab
source share
6 answers

This view is probably what you are looking for, but it implements the Bonferroni-Holm method. You will need to look for FEX for similar solutions for other correction methods.

However, the Statistics Toolbox has the MULTCOMPARE method, which is intended for several comparative tests, although it does not return the corrected p-values. Here is an example:

 load fisheriris [pVal tbl stats] = kruskalwallis(meas(:,1), species) %# Kruskal-Wallis or ANOVA title('Sepal Length'), xlabel('Groups'), ylabel('Value') [c,m] = multcompare(stats, 'ctype','bonferroni', 'display','on'); 
0
source share

If you have the Bioinformatics Toolbox, you can use the MAFDR function to calculate p values ​​adjusted using the False Discovery Rate.

+5
source share

For people without the Bioinformatics Toolbox, the FDR (False Discovery Rate) method is also very well described here , it also provides a link to the fdr script.

+1
source share

Check out the T-test with Bonferroni correction and related files in the Matlab file exchange.

Hope this helps.

0
source share

The implementation of the R p.adjust MATLAB / Octave function is available here . He can adjust the p-value for several comparisons using the following methods equivalent to their R counterparts:

  • floodplain
  • Gohberg
  • Hommel
  • Bonferroni
  • Bh
  • FROM
  • Fdr
  • Sidak (this is not available in R function)

Disclaimer: I am the author of this package.

0
source share

All Articles