File Exchange

image thumbnail


version (13.7 KB) by David Groppe
Permutation test of null hypothesis of no correlation between one more pairs of variables.


Updated 08 Mar 2016

View License

Permutation test based on Pearson's linear correlation coefficient (r) or Spearman's rank correlation coefficient (rho). This function can perform the test on one or more pairs of variables. When applying the test to multiple pairs of variables, the "max statistic" method is used for adjusting the p-values of each variable for multiple comparisons (Groppe, Urbach, & Kutas, 2011). Like Bonferroni correction, this method adjusts p-values in a way that controls the family-wise error rate. However, the permutation method will be more powerful than Bonferroni correction when different variables in the test are correlated.

Cite As

David Groppe (2020). mult_comp_perm_corr (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (3)

Chao Liu


Hi, can I use this on 3 data points? Sorry for the beginner question.

I'm trying to test the relationship between two variables and this test seems to be exactly what I'm looking for, however, when I run the test on my data it says the familywise alpha level is 0, the p value it returns is also 0, why is this?


RandStream now called correctly for most recent versions of MATLAB when seed state is needed.

Minimal change to command line output.

Now runs even if unable to set seed state (due to 2014+ version of Matlab)

Comments updated

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