Mantel test - Matlab implementation
Mantel test for (dis)similarity matrices. The matrices must be squared, of same size, symmetrical and with ones in the main diagonal for the similarity case or zeros in the main diagonal for the distance (dissimilarity) matrix case. If distance matrix, then all values should be positive. Mantel test is performed by correlating the top triangle between the two matrices. P value is obtained with permutations. Input parameter "type" can only be 'pearson' or 'spearman'
a = corr(randn(100,10));
b = corr(randn(100,10));
[out pval] = bramila_mantel(a,b,5000,'spearman')
(c) Enrico Glerean 2013 - Brain and Mind Laboratory Aalto University http://becs.aalto.fi/bml/ This function is part of the Brain and Mind Lab tools http://git.becs.aalto.fi/bml/bramila