[R-sig-Geo] Moran's I vs. spatial rho

Roger Bivand Roger.Bivand at nhh.no
Thu Apr 13 13:56:51 CEST 2006


On Wed, 12 Apr 2006, Larry Layne wrote:

> I am using spdep_0.3-12 to compute Moran's I and spatial rho. To compute 
> Moran's I, I am using the function 'moran.test' and the row stochastic 
> definition of the connectivity matrix (the W matrix). Here is the full line 
> of code for Moran's I:
> 
> a <- moran.test(NMmap$att.data$y,y,NMlistw,randomisation=FALSE, 
> zero.policy=TRUE,alternative="two.sided",rank=FALSE)
> 
> I am using the function lagsarlm to compute spatial rho using an 
> intercept-only model: Y = pWY + XB + e, and using the row stochastic 
> definition of the connectivity matrix (the W matrix). Here is the full line 
> of code for this:
> 
> x <- lagsarlm(y ~ 1,data=NMpop,NMlistw,type="lag",method="eigen", 
> quiet=FALSE,zero.policy=TRUE)
> 
> I am having difficulty figuring out why the Moran's I estimates are very 
> different from the spatial rho estimates. Specifically (n is number of 
> areal units):
> 
> Var  n        Moran's I             spatial rho
> A  3109    0.365187132203878    0.573153392466612
> B  3109    0.360858943229591    0.562977003813789
> C  3109    0.140015456674040    0.291046543475327
> D  3109    0.613850771465824    0.797930036214143
> 
> A   49     0.261942390553635    0.411076873069647
> B   49     0.328416006893752    0.526902446982636
> C   49     0.341110258614797    0.535113540423957
> D   49     0.239118528840316    0.371896460431941
> 
> A    4    -0.412023041115369   -1.08397184420832
> B    4    -0.577311366437566   -1.21286625541679
> C    4    -0.623070319848968   -1.27502649289533
> D    4    -0.63499460958309     0.371896460431941
> 
> Any ideas why there would be such a discrepancy between Moran's I values 
> and spatial rho values (especially when n=4) when both are using the same 
> row stochastic connectivity matrix?

The relevant question would be why you expect them to be the same, when
they are esimated using different techniques? A spatial autocorrelation
coefficient can be defined as (e'We) / ((e'e) * (e'W'We))^(1/2) - Cliff &
Ord (1981). Note that the OLS estimator would be (e'We) / (e'W'We), and
Moran's I is (e'We) / (e'e), while the ML is adjusted by the Jacobian in
addition:

> library(spdep)
> data(columbus)
> W <- nb2mat(col.gal.nb)
> e <- scale(columbus$CRIME, scale=FALSE)
> ee <- crossprod(e, e)
> We <- crossprod(W, e)
> eWe <- crossprod(e, We)
> eWWe <- crossprod(We, We)
> eWe/ee
          [,1]
[1,] 0.4857709
> moran.test(columbus$CRIME, nb2listw(col.gal.nb))$estimate[1]
Moran I statistic 
        0.4857709 
> eWe/eWWe
          [,1]
[1,] 0.8867512
> lagsarlm(CRIME ~ 1, columbus, nb2listw(col.gal.nb))$rho
      rho 
0.6503681 
> eWe/sqrt(ee*eWWe)
          [,1]
[1,] 0.6563215

If e'W'We is much smaller than e'e (which it will be in the presence of 
positive spatial autocorrelation), the different calculations lead to 
quite different values for the same data, because the calculations are 
different.

Hope this helps,

Roger


> 
> Larry Layne
> ljlayne at unm.edu
> 
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
> 

-- 
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Helleveien 30, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no




More information about the R-sig-Geo mailing list