File Exchange

image thumbnail

Holm-Sidak t-test

version by Giuseppe Cardillo
Holm-Sidak t-test for multiple comparisons


Updated 13 Apr 2018

View Version History

GitHub view license on GitHub

As you know, the Student t-test can be used only to compare two groups. When you have k groups you can't use a t-test for each couple because, if you have fixed alpha=0.05 for each t-test, there is a probability of k*0.05 to find a difference when it isn't (Bonferroni inequality).
The Holm-Sidak test is a step-down "recursive reject", because it applies an accept/reject criterion on a sorted set of null hypothesis, starting from the lower p-value and going up to the acceptance of null hypothesis.
For each comparison, the alpha value is set according to Sidak correction of Bonferroni inequality.
Statistics Toolbox is required because this function use TCDF function.

Cite As

Giuseppe Cardillo (2020). Holm-Sidak t-test (, GitHub. Retrieved .

Comments and Ratings (6)

Right Grievous

Yes it is possible but quite incovenient, I'll have to look through this script to find the correct variables to output.

My point is simply that this script doesn't seem quite finished, the variables are there they are just not being output at the moment...

I thank you for the script, but I can't understand why it doesn't output the info everyone will clearly want.

Giuseppe Cardillo

I don't agree. If you are so able to write a script, it would not to be so difficult to write 1 line of code to obtain an output struct. You can modify my script as you want: it is open source.

Right Grievous

This code is useless if you want to incorporate it as part of a script... it doesn't really 'output' anything - just some info in the command screen.

Gilbert Norrell

This file is similar to multcompare matlab function, but provides much more clear outputs.

Giuseppe Cardillo

I think that my explanation is very simple and if "someone is crap at stats" he never will search this file.

nick from belgium

sorry but this does not explain anything to someone who is crap at stats.

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

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!