Mantel test - Matlab implementation

2014-04-30T09:15:11Z (GMT) by Enrico Glerean

[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'


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 This function is part of the Brain and Mind Lab tools



CC BY 4.0