File Exchange

## mult_comp_perm_corr

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

Updated 08 Mar 2016

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 (2021). mult_comp_perm_corr (https://www.mathworks.com/matlabcentral/fileexchange/34920-mult_comp_perm_corr), MATLAB Central File Exchange. Retrieved .

Shilpi Modi

I tried using the mult_comp_perm_corr.m code with a data of 23 subjects. Total neuropsych variables were 20.

As a result my dataX was a 23 X 20 matrix.
I duplicated my dataX matrix as dataY matrx.

On running the above program, I got corr_obs as a 1X20 vector.

As per my understanding since I want to see correlation of every variable with every other variable, it should have been a 20 X 20 matrix of all the pairwise correlations.

Please guide me where I am going wrong.

Thanks,

Shilpi Modi

Guillermo Gomez

I tried to use it but it requires the analysis of two matrices of the same size. Although the number of obervations beween the matrices has to be the same, this doe snot apply to variables. I did not undertand this requirement. Also, the script seemed that did not allow to include ['rows','pairwise'] or other options available usinf the corr function in Matlab.
Fixing these things would make the code great!

Chao Liu

ShaneS

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

Right Grievous

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?

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