Skip to content

Estimate Spatial Autoregressive model using weighted least squares

2 messages · Renan Serenini Bernardes, Roger Bivand

#
I have a regression estimated via OLS and WLS and would like to test for spatial effects (estimate SAR) in both models, but I didn't find how to use WLS in SAR model. The package spatialreg offers the option to include weights just for the Spatial Error Model (function errorsarlm). By reading the manual I thought the function spautolm with the argument SAR should do it, but the results seem to be exactly the same of SEM.
Replication:
library(spatialreg)
data(oldcol, package="spdep")
listw <- spdep::nb2listw(COL.nb, style="W")
COL.OLD$POP <- rnorm(49, 1000, 400)

model1 <- errorsarlm(CRIME ~ INC + HOVAL, data=COL.OLD,
                 weights=POP,listw=listw)
model2 <- spautolm(CRIME ~ INC + HOVAL, data=COL.OLD,family = "SAR",
               weights=POP,listw=listw)
summary(model1)
summary(model2)
How can I estimate the SAR model?
Respectfully,
Renan
#
On Wed, 7 Sep 2022, Renan Serenini Bernardes wrote:

            
No, SAR in spautolm() means "simultaneous autoregressive" contrasting with 
CAR "conditional autoregressive", both SAR and CAR model autocorrelation 
in the error, so spautolm() and errorsarlm() should give the same results.

If by SAR you mean "spatial autoregressive", you actually mean SLM 
"spatial lag model", contrasting with SEM "spatial error model".

The theory for including case weights in models except those with the 
spatially lagged response (SLM, SDM, GNM) is known, for models with the 
spatially lagged response it is not known (it might be possible to 
estimate the models, but the variance-covariance matrix of the 
coefficients is not at present known as far as I understand).

Do you have a robust reason for not using SEM, SDEM or SLX rather than 
SLM or SDM? See perhaps https://doi.org/10.18335/region.v4i1.107 and the 
reference there to Solon et al. (2015) on case weights in econometric 
models.

Hope this helps,

Roger