Stephane.Buhler at anthro.unige.ch
2007-May-25 10:02 UTC
[R] testing difference (or similarities) between two distance matrices (not independent)
Hi, i'm looking to test if two distance matrices are statistically different from each others. These two matrices have been computed on the same set of data (several population samples) 1. using a particular genetic distance 2. weighting that genetic distance with an extra factor (we can look at this as one set is computed before applying a treatment and the second one after applying that particular treatment ... kind of a similar situation) 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)? I did check the mailing lists but did not find anything on that problem i'm trying to solve thanks for your help and insights on that problem St?phane Buhler
Tyler Smith
2007-May-26 19:26 UTC
[R] testing difference (or similarities) between two distance matrices (not independent)
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. Tyler