The SPATIALREG Procedure
Spatial Error Models
The spatial error model (SEM) accounts for spatial dependence in the error terms rather than in the dependent variable. Let denote the observation associated with the spatial unit for . For these spatial units, let be an spatial weights matrix. Further, let be a vector that denotes values of p regressors recorded at unit .
The SEM model can be described in vector form by using the following two-stage formulation (LeSage and Pace 2009),
where and , with . Moreover, is an matrix where each row consists of . In addition, is a parameter vector.
The log-likelihood function for the SEM model is
For the SEM model, the gradients are
In addition to the interaction effects among error terms, you might also want to include exogenous interaction effects in the model. In such cases, you need to consider a spatial Durbin error model (SDEM).