Skip to main content

Section 11.5 Fitting and interpreting a spatial error model

We just saw that for the case of homicide in the 90s, the bottom-up approach suggested that the spatial error model was more appropriate when using our particular definition of the spatial weight matrix. In this case then, we can run a spatial error model. Maximum likelihood estimation of the spatial error model is implemented in the spatialreg::errorsarlm() function. The formula, data set and a listw spatial weights object must be specified, as illustrated below. We are still using the 10 nearest neighbours definition. When thinking about the spatial weight matrix to use in spatial regression analysis, it is worth considering [201] suggestions. His work showed that highly connected matrices may result in downward bias for the coefficients when using maximum likelihood.
fit3_90_sem <- errorsarlm(eq1_90, data=ncovr, rwm)
summary(fit3_90_sem)
## 
## Call:
## errorsarlm(formula = eq1_90, data = ncovr, listw = rwm)
## 
## Residuals:
##       Min        1Q    Median        3Q       Max 
## -15.84281  -2.49313  -0.69615   1.60685  68.82483 
## 
## Type: error 
## Coefficients: (asymptotic standard errors) 
##              Estimate Std. Error z value  Pr(>|z|)
## (Intercept)  3.820725   1.147279  3.3302 0.0008677
## RD90         3.753935   0.159813 23.4895 < 2.2e-16
## PS90         1.245862   0.119091 10.4615 < 2.2e-16
## MA90        -0.044778   0.030298 -1.4779 0.1394354
## DV90         0.588880   0.062825  9.3734 < 2.2e-16
## UE90        -0.195440   0.046141 -4.2357 2.279e-05
## SOUTH_f1     2.126187   0.297569  7.1452 8.988e-13
## 
## Lambda: 0.3661, LR test value: 113.9, p-value: < 2.22e-16
## Asymptotic standard error: 0.03254
##     z-value: 11.25, p-value: < 2.22e-16
## Wald statistic: 126.6, p-value: < 2.22e-16
## 
## Log likelihood: -9276 for error model
## ML residual variance (sigma squared): 23.62, (sigma: 4.86)
## Number of observations: 3085 
## Number of parameters estimated: 9 
## AIC: 18571, (AIC for lm: 18683)
The spatial lag model is probably the most common specification and may be the most generally useful way to think about spatial dependence. But we can also introduce spatial dependence to the model through the error term in our regression equation. Whereas the spatial lag model sees the spatial dependence as substantively meaningful (in that \(y\text{,}\) say homicide, in county \(i\) is influenced by homicide in its neighbours), the spatial error model simply treats the spatial dependence as capturing the effect of unobserved variables. It is beyond the scope of this introductory course to cover the mathematical details and justification of this procedure, though you can use the suggested reading (particularly the highly accessible [202] book or the more recent [179]) or some of the other materials we discussed at the end of the chapter.
How do you interpret these results? First, you need to look at the general measures of fit of the model. I know what you are thinking. Look at the R square, and compare them, right? Well, don’t. This R square is not a real R square, but a pseudo-R square and is not comparable to the one we obtain from the OLS regression model. Instead we can look at the Akaike Information Criterion (AIC). We can see the AIC is better for the spatial model (18571) than for the non-spatial model (18683).
In this case, you can compare the regression coefficients with those from the OLS model, since we don’t have a spatial lag capturing some of their effect. Notice how one of the most notable differences is the fact that median age is no longer significant in the new model.
We are using here the 10 nearest neighbours (following the original analysis of this data), but in real practice you would need to explore whether this is the best definition and one that makes theoretical sense. Various authors, such as [180], suggest that you would want to run the models with several specifications of the spatial weight matrix and find out how robust the findings are to various specifications. They even propose a particular method to pick up the "best" specification of the weight matrix. [196] provides R code and an example of checking for sensitivity of results to various specifications of the matrix.