File Exchange

image thumbnail

fakenmc/pval_adjust

version 1.2.0.2 (5.14 KB) by Nuno Fachada
Adjust p-values for multiple comparisons

6 Downloads

Updated 27 Aug 2019

GitHub view license on GitHub

A MATLAB/Octave function for adjusting p-values for multiple comparisons. Given a set of p-values, returns p-values adjusted using one of several methods: 'holm', 'hochberg', 'hommel', 'bonferroni', 'BH', 'BY', 'fdr', 'sidak' or 'none'.

This is an implementation of the p.adjust R function, the documentation of which can be found at http://www.inside-r.org/r-doc/stats/p.adjust. Contrary to the R function, this function does not handle missing values, and adds one additional correction method, 'sidak', as described in https://en.wikipedia.org/wiki/%C5%A0id%C3%A1k_correction.

If you use this script in your research please cite the following paper:

* Fachada N, Rosa AC. (2018). micompm: A MATLAB/Octave toolbox for multivariate independent comparison of observations. Journal of Open Source Software. 3(23):430. https://doi.org/10.21105/joss.00430

Cite As

Fachada N, Rosa AC. (2018). micompm: A MATLAB/Octave toolbox for multivariate independent comparison of observations. Journal of Open Source Software. 3(23):430. https://doi.org/10.21105/joss.00430

Comments and Ratings (2)

Nuno Fachada

Dear Giuseppe, thank you for the feedback. I've uploaded a corrected version. Best regards.

This is a very good idea.
However ... it is an error in the Holm's algorithm.
Try it with these test values:
rawpval=[0.0020 0.0045 0.0060 0.0080 0.0085 ...
0.0090 0.0175 0.0250 0.1055 0.5350];
fwer=0.05;

Regards.

Updates

1.2.0.2

Fix paper reference

1.2.0.1

- Add paper reference

1.2.0.0

Fix bug in Holm method (acknowledgements to Giuseppe Altieri for finding bug)

1.1.0.0

Update description, add Sidak method.

1.0.0.0

Fix typo in description.

MATLAB Release Compatibility
Created with R2019a
Compatible with any release
Platform Compatibility
Windows macOS Linux