# Mantel test suffers of collinearity in the similarity matrices If mantel test is run on data that has collinearity, mantel results will be inflated. Reference: https://besjournals.onlinelibrary.wiley.com/doi/10.1111/2041-210x.12018 (see summary point 4) ```(matlab) clear all close all rng(0) features=randn(100,10); brain=randn(100,10); sim_f=corr(features); sim_b=corr(brain); [r p]=bramila_mantel(sim_f,sim_b,10000,'spearman') % output for rng(0) % r = 0.1324 % p = 0.1899 % this number might change a bit due to parpool % let's repeat it with some extra autocorrelation added by repeating the % same feature / brain map featuresAC=[features(:,1) features(:,1) features(:,1) features]; brainAC=[brain(:,1) brain(:,1) brain(:,1) brain]; % when the similarity matrix has too similar features, then the final % results are inflated sim_fAC=corr(featuresAC(:,1:13)); % you can use the same number of columns 10 if you want, it won't change sim_bAC=corr(brainAC(:,1:13)); [rAC pAC]=bramila_mantel(sim_fAC,sim_bAC,10000,'spearman') % output for rng(0) % rAC = 0.3965 % pAC = 0.0014 % this number might change a bit due to parpool ```