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 |
listwORorthobasis |
an object of the class |
nrepet |
an |
method |
an character specifying which algorithm should be used to
produce spatial replicates (see |
... |
further arguments of the |
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
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
}