adespatial (version 0.3-8)

scores.listw: Function to compute and manage Moran's Eigenvector Maps (MEM) of a listw object

Description

These functions compute MEM (i.e., eigenvectors of a doubly centered spatial weighting matrix). Corresponding eigenvalues are linearly related to Moran's index of spatial autocorrelation.

Usage

scores.listw(listw, wt = rep(1, length(listw$neighbours)),
  MEM.autocor = c("non-null", "all", "positive", "negative"),
  store.listw = FALSE)

mem(listw, wt = rep(1, length(listw$neighbours)), MEM.autocor = c("non-null", "all", "positive", "negative"), store.listw = FALSE)

orthobasis.listw(listw, wt = rep(1, length(listw$neighbours)), MEM.autocor = c("non-null", "all", "positive", "negative"), store.listw = FALSE)

# S3 method for orthobasisSp [(x, i, j, drop = TRUE)

Arguments

listw

An object of the class listw created by functions of the spdep package

wt

A vector of weights. It is used to orthogonalize the eigenvectors. It could be useful if MEM are used in weighted regression or canonical correspondence analysis

MEM.autocor

A string indicating if all MEMs must be returned or only those corresponding to non-null, positive or negative autocorrelation. The difference between options all and non-null is the following: when there are several null eigenvalues, option all removes only one of the eigenvectors with null eigenvalues and returns (n-1) eigenvectors, whereas non-null does not return any of the eigenvectors with null eigenvalues.

store.listw

A logical indicating if the spatial weighting matrix should be stored in the attribute listw of the returned object

x

An object of class orthobasisSp.

i, j

Elements to extract (integer or empty): index of rows (i) and columns (j).

drop

A logical. If TRUE, object containing only one colum is converted in vector

Value

An object of class orthobasisSp , subclass orthobasis. The MEMs are stored as a data.frame. It contains several attributes (see ?attributes) including:

  • listw: The associated spatial weighting matrix (if store.listw = TRUE).

Details

Testing the nullity of eigenvalues is based on E(i)/E(1) where E(i) is i-th eigenvalue and E(1) is the maximum absolute value of eigenvalues

References

Dray, S., Legendre, P., and Peres-Neto, P. R. (2006). Spatial modeling: a comprehensive framework for principal coordinate analysis of neighbor matrices (PCNM). Ecological Modelling 196, 483--493.

Griffith D. A. (1996) Spatial autocorrelation and eigenfunctions of the geographic weights matrix accompanying geo-referenced data. Canadian Geographer 40, 351--367.

See Also

nb2listw orthobasis

Examples

Run this code
# NOT RUN {
if(require("ade4", quietly = TRUE) & require("spdep", quietly = TRUE)){
data(oribatid)
nbtri <- tri2nb(as.matrix(oribatid$xy))
sc.tri <- scores.listw(nb2listw(nbtri, style = "B"))
summary(sc.tri)
}
if(require("adegraphics", quietly = TRUE)){
s.value(oribatid$xy,sc.tri[,1:9])
plot(sc.tri[,1:6], oribatid$xy, pSp.cex = 5, pSp.alpha = 0.5, pbackground.col = 'lightblue')
}

# }

Run the code above in your browser using DataLab