Skip to content
Prev 873 / 29559 Next

Mean Effects SAR Model

On Mon, 3 Apr 2006, Larry Layne wrote:

            
(thought so!)
OK. I can replicate this - there is still a bug in handling intercept-only
models in lagsarlm() with method="SparseM"; it was partly fixed in January
2005. The equivalent model for errorsarlm() works:

library(spdep)
data(columbus)
#lagsarlm(CRIME ~ 1, data=columbus, nb2listw(col.gal.nb), method="SparseM")
try1 <- residuals(errorsarlm(CRIME ~ 1, data=columbus, 
  nb2listw(col.gal.nb), method="SparseM"))
try2 <- residuals(lagsarlm(CRIME ~ 1, data=columbus, 
  nb2listw(col.gal.nb), method="eigen"))
all.equal(try1, try2, tol=1e-07)

and the residuals are the same as for the lag model, as you can see. I'll
try to fix the problem tomorrow.

Thanks for a helpful report.

Roger