2
$\begingroup$

In moran scatter plot, I checked

  1. Slope of lm((spatial lagged variable) ~ (variable)): moran coefficient,

  2. Slope of lm((spatial lagged standardized variable) ~ (standardized variable)): moran coefficient, and

  3. Slope of lm((standardized spatial lagged variable) ~ (standardized variable)): correlation coefficient.

However, I think Anselin (1999) remark case [3] is moran coefficient. Is it true?

####################
library(spdep)
data(baltimore)
# head(baltimore)
# plot(baltimore$X, baltimore$Y)
nb <- knn2nb(knearneigh(cbind(baltimore$X, baltimore$Y), k=4))
listW <- nb2listw(nb, style="W")
W <- listw2mat(listW)

y <- baltimore$PRICE    # as variable
Wy <- W %*% y       # as spatially lagged variable
Z_y <- scale(y)     # as standardized variable
Z_Wy <- scale(Wy)       # as standardized spatially lagged variable
WZ_y <- W %*% Z_y       # as spatially lagged standardized variable

## Correration coefficient
cor(y, Wy)
## (Global) Moran's I
moran.test(y, listW, randomisation=F, alternative="two.sided")

par(mfrow=c(1,3))
## Moran scatterplot
# Case [1]: 
# lm((spatially lagged variable) ~ (variable))
# equal to moran.plot(y, listW)
plot(y, Wy, xlab="variable", ylab="spatially lagged variable",
    main=paste("[1] slope of line:", round(coef(lm(Wy~y))[2], 3)))
abline(lm(Wy~y))
abline(v=mean(y), lty=2); abline(h=mean(Wy), lty=2)

# Case [2]: 
# lm((spatially lagged standardized variable) ~ (standardized variable)) 
plot(Z_y, WZ_y, xlab="standardized variable", 
ylab="spatially lagged standardized variable", 
main=paste("[2] slope of line:", round(coef(lm(WZ_y~Z_y))[2], 3)))
abline(lm(WZ_y~Z_y))
abline(v=mean(Z_y), lty=2); abline(h=mean(WZ_y), lty=2)

# Case [3]: 
# lm((standardized spatially lagged variable) ~ (standardized variable))
plot(Z_y, Z_Wy, xlab="standardized variable", 
ylab="standardized spatially lagged variable",
main=paste("[3] slope of line:", round(coef(lm(Z_Wy~Z_y))[2], 3)))
abline(lm(Z_Wy~Z_y))
abline(v=mean(Z_y), lty=2); abline(h=mean(Z_Wy), lty=2)

par(mfrow=c(1,1))
####################

Anselin, L. (1999) Interactive techniques and exploratory spatial data analysis. In: Longley P.A.

Goodchild M.F., Maguire D.J., Rhind D.W. (eds) Geographic information system: Principles, techniques, management and applications, 253–266, Wiley, New York.

$\endgroup$
2
  • $\begingroup$ Can you clarify your question? "Is it true?" what is it? $\endgroup$ Commented Feb 17, 2016 at 13:34
  • $\begingroup$ Anselin (1999) remarks a slope of line of case 3 is moran coefficient, not correlation coefficient. However, as pointed at R codes, I think the slope is equal to correlation coefficient. Is this correct? $\endgroup$
    – Tky
    Commented Feb 17, 2016 at 14:16

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.