[R] testing difference (or similarities) between two distance matrices (not independent)

Tyler Smith tyler.smith at mail.mcgill.ca
Sat May 26 21:26:53 CEST 2007

On 2007-05-25, Stephane.Buhler at anthro.unige.ch
<Stephane.Buhler at anthro.unige.ch> wrote:

> i'm looking to test if two distance matrices are statistically  
> different from each others.
> both these matrices are obviously not independent from each others, so  
> Mantel test and others correlation tests do not apply here.
> I thought of testing the order of values between these matrices (if  
> distances are ordered the same way for both matrices, we have very  
> similar matrices and the additional factor has quite no effect on the  
> calculation). Is there any package or function in R allowing to do  
> that and statistically test it (with permutations or another approach)?

The mantel() function in the vegan library will do exactly this, with
the method="spearman" option. However, I don't think there is any
possible permutation test that will provide you with a valid test of
significance if the samples themselves are not independent.


More information about the R-help mailing list