msr.mantelrtest {adespatial}R Documentation

Moran spectral randomization for Mantel test

Description

This function allows to test the Mantel statistic using constrained null models in the presence of spatial autocorrelation. Random replicates of the second distance matrix are produced. They are spatially-constrained to preserve the global autocorrelation (Moran's I) and the spatial structures at multiple scales. Multiscale property is defined by the power spectrum (i.e. decomposition of the variance of the original variables) on a basis of orthonormal eigenvectors (Moran's Eigenvector Maps, MEM).

Usage

## S3 method for class 'mantelrtest'
msr(
  x,
  listwORorthobasis,
  nrepet = x$rep,
  method = c("pair", "triplet", "singleton"),
  ...
)

Arguments

x

An object generated by the mantel.randtest function.

listwORorthobasis

an object of the class listw (spatial weights) created by the functions of the spdep package or an object of class orthobasis

nrepet

an integer indicating the number of replicates

method

an character specifying which algorithm should be used to produce spatial replicates (see msr.default).

...

further arguments of the msr.default function.

Value

An object of class randtest.

Author(s)

Sylvie Clappe, Stephane Dray stephane.dray@univ-lyon1.fr

References

Crabot, J., Clappe, S., Dray, S. and Datry, T. (2019) Testing the Mantel statistic with a spatially-constrained permutation procedure. Methods in Ecology and Evolution. in press.

See Also

msr.default, mantel.randtest

Examples


if(require("ade4", quietly = TRUE)
& require("spdep", quietly = TRUE)){
data(mafragh, package = "ade4")

d1 <- dist(mafragh$env[,1:3])
d2 <- dist(mafragh$env[,7])
t1 <- mantel.randtest(d1,d2)
t1

lw <- nb2listw(mafragh$nb)
t2 <- msr(t1, listwORorthobasis = lw)
t2

}


[Package adespatial version 0.3-14 Index]