sorry, we can't preview this file

...but you can still download bramila_mantel.m
bramila_mantel.m (2.26 kB)

Mantel test - Matlab implementation

Download (0 kB)
posted on 2014-04-30, 09:15 authored by Enrico GlereanEnrico 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


Usage metrics