mantel.randtest {ade4}R Documentation

Mantel test (correlation between two distance matrices (in C).)

Description

Performs a Mantel test between two distance matrices.

Usage

mantel.randtest(m1, m2, nrepet = 999)

Arguments

m1 an object of class dist
m2 an object of class dist
nrepet the number of permutations

Value

an object of class randtest (randomization tests)

Author(s)

Jean Thioulouse ade4-jt@biomserv.univ-lyon1.fr

References

Mantel, N. (1967) The detection of disease clustering and a generalized regression approach. Cancer Research, 27, 209–220.

Examples

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

Worked out examples


> library(ade4)
> ### Name: mantel.randtest
> ### Title: Mantel test (correlation between two distance matrices (in C).)
> ### Aliases: mantel.randtest
> ### Keywords: array nonparametric
> 
> ### ** Examples
> 
> 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
Monte-Carlo test
Call: mantel.randtest(m1 = geo, m2 = gen)

Observation: 0.5095199 

Based on 999 replicates
Simulated p-value: 0.002 
Alternative hypothesis: greater 

    Std.Obs Expectation    Variance 
3.345708925 0.002622947 0.022954249 
> 
> 
> 
> 

[Package ade4 Index]