nonormmoran {GeoXp}R Documentation

Detection of spatial autocorrelation

Description

The function `nonnormmoran' is used to detect spatial autocorrelation in the residuals $u$ from the least squares model $Y=β times X+u$. It calculates Moran's $I$ statistic of the residuals based on the gaussian asymptotic distribution and give a p-value associated to the test of spatial autocorrelation (gaussian version).

Usage

nonormmoran(y, x, W)

Arguments

y vector of size $n$ of dependent variable
x matrix $n times p$ containing explanatory variables
W spatial weight matrix

Details

W is supposed standartized :

I=frac{u'Wu}{u'u}

I sim N(E(I),var(I))

let M=(I-X(X'X)^{-1}X')

E(I)=frac{tr(MW)}{n-k}

d=frac{n-p}{n+p+2}

V(I)=[tr(MWMW')+tr(MW)^2+(tr(MW))^2]/d-E(I)^2

Z_I=frac{I-E(I)}{v(I)^{1/2}}

Value

(nobs,nvar,morani,imean,istat,ivar,prob) where `nobs' is the number of observations, `nvar', the number of explanatory variables, `morani' is the Moran's $I$ statistic estimate, `imean' is $E(I)$, ivar is $var(I)$, `istat' is the normalized Moran's $I$ statistic (corresponding to $Z_I$), and `prob' the associated p-value.

Author(s)

Translated into R from Jim Lessage's ``Spatial Econometrics Toolbox'', http://www.spatial-econometrics.com/

References

Aragon Yves, Perrin Olivier, Ruiz-Gazen Anne, Thomas-Agnan Christine (2006), ``Statistique et Econométrie pour données géoréférencées : modèles et études de cas''

See Also

moranplotmap,neighbourmap,makeneighborsw,makedistanceW,normw

Examples

# data baltimore
data(baltimore)
W <- makeneighborsw(baltimore$X,baltimore$Y,4)
nonormmoran(baltimore$PRICE,baltimore[,14:15],W)

[Package GeoXp version 1.0 Index]