| mantel.rtest {ade4} | R Documentation |
Performs a Mantel test between two distance matrices.
mantel.rtest(m1, m2, nrepet = 99)
m1 |
an object of class dist |
m2 |
an object of class dist |
nrepet |
the number of permutations |
an object of class rtest (randomization tests)
Daniel Chessel
Stéphane Dray dray@biomserv.univ-lyon1.fr
Mantel, N. (1967) The detection of disease clustering and a generalized regression approach. Cancer Research, 27, 209–220.
data(yanomama)
gen <- quasieuclid(as.dist(yanomama$gen))
geo <- quasieuclid(as.dist(yanomama$geo))
plot(r1 <- mantel.rtest(geo,gen), main = "Mantel's test")
r1
> library(ade4) > ### Name: mantel.rtest > ### Title: Mantel test (correlation between two distance matrices (in R).) > ### Aliases: mantel.rtest > ### Keywords: array nonparametric > > ### ** Examples > > data(yanomama) > gen <- quasieuclid(as.dist(yanomama$gen)) > geo <- quasieuclid(as.dist(yanomama$geo)) > plot(r1 <- mantel.rtest(geo,gen), main = "Mantel's test") > r1 Monte-Carlo test Observation: 0.5095199 Call: mantel.rtest(m1 = geo, m2 = gen) Based on 99 replicates Simulated p-value: 0.01

> > > >