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
Estimate Spatial Autoregressive model using weighted least squares
2 messages · Renan Serenini Bernardes, Roger Bivand
On Wed, 7 Sep 2022, Renan Serenini Bernardes wrote:
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.
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
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
[[alternative HTML version deleted]]
_______________________________________________ R-sig-Geo mailing list R-sig-Geo at r-project.org https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fstat.ethz.ch%2Fmailman%2Flistinfo%2Fr-sig-geo&data=05%7C01%7CRoger.Bivand%40nhh.no%7Cd7ef94c7458e48bfd80c08da9124e210%7C33a15b2f849941998d56f20b5aa91af2%7C0%7C0%7C637981884997172815%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=sMFvdS9V4ndEij35aycL2QQ4T8cqziN79DOADM41TEY%3D&reserved=0
Roger Bivand Emeritus Professor Department of Economics, Norwegian School of Economics, Postboks 3490 Ytre Sandviken, 5045 Bergen, Norway. e-mail: Roger.Bivand at nhh.no https://orcid.org/0000-0003-2392-6140 https://scholar.google.no/citations?user=AWeghB0AAAAJ&hl=en