[adegenet-forum] confusing p value in mantel test

Kelly Bennett kelly.bennett at manchester.ac.uk
Wed Jun 18 13:45:00 CEST 2014



Hello,

I have run a mantel test with the following code

dna <- read.dna(file = "dna_manteltest.fasta", format = "fasta")
dna.dists <- dist(dna, method = "euclidean")
as.matrix(dna.dists)[1:5, 1:5]
geo <- read.csv(file = "geo_matrix.csv")
geo[1:2, 1:2]
geo.dists <- dist(geo, method = "euclidean")
as.matrix(geo.dists)[1:5, 1:5]
mantelresult<-mantel.rtest(dna.dists, geo.dists, nrepet = 9999)
cor.test(geo.dists, dna.dists)
plot(mantelresult <- mantel.rtest(dna.dists, geo.dists), main = "Mantel's test")
mantelresult

>From my plot it looks like there should be isolation by distance and a correlation test shows a significant association but my p value for the Monte Carlo test = 1

Does anyone have any ideas about this contradiction? I have attached the plot to this email

Thank you very much,

Kelly


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/adegenet-forum/attachments/20140618/b2a7dc44/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Mantelplot.pdf
Type: application/pdf
Size: 4508 bytes
Desc: Mantelplot.pdf
URL: <http://lists.r-forge.r-project.org/pipermail/adegenet-forum/attachments/20140618/b2a7dc44/attachment.pdf>


More information about the adegenet-forum mailing list