sorry, we can't preview this file
Mantel test - Matlab implementation
[out pval]=bramila_mantel(matrix1,matrix2,iter,type)
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'
e.g.:
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