Learn R Programming

adespatial (version 0.1-1)

msr.varipart: Moran spectral randomization for variation partitioning

Description

The functions allows to evaluate the significance and estimate parts in variation partitioning using Moran Spectral Randomization (MSR) as a spatially-constrained null model to account for spatial autocorrelation in table X. Hence, this function provides a variation partioning adujsted for spurious correlation due to spatial autocorrelation in both the response and one explanatory matrix.

Usage

# S3 method for varipart
msr(x, listwORorthobasis, nrepet = x$test$rep[1],
  method = c("pair", "triplet", "singleton"), ...)

Arguments

x

An object generated by the varipart 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 codemsr.default).

further arguments of the codemsr.default function.

Value

An object of class varipart randomized replicates.

Details

The function corrects the biases due to spatial autocorrelation by using MSR procedure to produce environmental predictors that preserve the spatial autocorrelation and the correlation structures of the original environmental variables while being generated independently of species distribution.

References

Sylvie Clappe, Stephane Dray and Pedro R. Peres-Neto (in preparation) Beyond neutrality: using a null model to disentangle the effects of niche dynamics and spurious correlations in variation partitioning.

Wagner, H. H., and S. Dray, 2015. Generating spatially constrained null models for irregularly spaced data using Moran spectral randomization methods. Methods in Ecology and Evolution 6:1169<U+2013>1178.

See Also

msr.default, varipart

Examples

Run this code
# NOT RUN {
library(ade4)
library(spdep)
data(mafragh)
## Performing standard variation partitioning
dudiY <- dudi.pca(mafragh$flo, scannf = FALSE, scale = FALSE)
mafragh.lw <- nb2listw(mafragh$nb)
me <- mem(mafragh.lw, MEM.autocor = "positive")
vprda <- varipart(dudiY, mafragh$env, me, type = "parametric")

## Adjust estimation and compute p-value by msr methods
vprda.msr <- msr(vprda, mafragh.lw, nrepet=99)
vprda.msr
# }

Run the code above in your browser using DataLab