scores.listw: Function to compute Moran's eigenvectors of a listw object

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

This functions compute eigenvector's of a doubly centered spatial weighting matrix. Corresponding eigenvalues are linearly related to Moran's index of spatial autocorrelation.

Usage

1
scores.listw(listw, echo = FALSE, MEM.autocor = c("all","positive", "negative"))

Arguments

listw

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

echo

A logical value, if TRUE a message indicates which eigenvectors corresponding to null eigenvalues are removed.

MEM.autocor

A string indicating if all MEMs must be returned or only those corresponding to positive or negative autocorrelation.

Details

In order to remove the effect of units of measurments (cm, km ...), testing the nullity of eigenvalues is based on E(i)/E(1) where E(i) is i-th eiegnvalue and E(1) is the maximum absolute value of eigenvalues.

Value

A list:

vectors

A matrix of eigenvectors,

values

A vector of eigenvalues.

call

Call of the function.

Author(s)

Stephane Dray

References

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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
data(oribatid)
fau <- sqrt(oribatid$fau/outer(apply(oribatid$fau,1,sum),rep(1,ncol(oribatid$fau)),"*"))
faudt <- resid(lm(as.matrix(fau)~as.matrix(oribatid$xy)))
nbtri <- tri2nb(as.matrix(oribatid$xy))
sc.tri <- scores.listw(nb2listw(nbtri,style="B"))
par(mfrow=c(1,3))
s.value(oribatid$xy,sc.tri$vectors[,1],cleg=0, sub="Vector 1",csub=3)
s.value(oribatid$xy,sc.tri$vectors[,2],cleg=0, sub="Vector 2",csub=3)
s.value(oribatid$xy,sc.tri$vectors[,3],cleg=0, sub="Vector 3",csub=3)


    
  

spacemakeR documentation built on May 2, 2019, 4:51 p.m.