Hello, I have SNP data from 20 populations which I've generated a covariance matrix for 10 times to act as a null model to test individual SNPs against environmental variables. I'd like to run a mantle test in R using the ade4 package to compare the matrices within and across independent runs of the program to ensure that the matrix is well estimated. I'm not sure how to do this correctly, however, and have been unsuccessful so far.
The manual for Package ‘ade4’ lists the following for mantle tests:
mantel.rtest(m1, m2, nrepet = 99, ...)
m1 an object of class dist,
m2 an object of class dist,
nrepet the number of permutations,
... further arguments passed to or from other methods
The example in the manual is:
data(yanomama) gen <- quasieuclid(as.dist(yanomama$gen)) geo <- quasieuclid(as.dist(yanomama$geo)) plot(r1 <- mantel.randtest(geo,gen), main = "Mantel's test") r1
I have txt files for
matrix 10. How would I correctly test them? Thanks for any suggestions, I'm a little new to these kinds of analyses!