The spatial lag of X (SLX) model is illustrated by using the general framework for a zero-inflated model. According to the section Zero-Inflated Count Regression Overview, the data model for can be formulated as
and the general model for parameters can be written in matrix form as
where , , and . In addition, , , and are design matrices, in which the ith row is , , and for , respectively.
In the spatial context, data are often collected over a predetermined set of spatial units, . In this case, both the dependent variable and the explanatory variables are spatially referenced. For example, denotes the dependent variable that is observed at location . For the SLX model, the data model for remains the same. However, the parameter model becomes
where is the spatial weights matrix, , , and . Moreover, becomes a column vector by stacking on top of , and similarly for and . For the sake of flexibility, does not have to be the same as . Similar arguments apply to the DISPMODEL and ZEROMODEL statements. From the modeling perspective, the SLX model can be useful when spatial effects (as represented by the , , and terms) are important. The intercept term is always excluded from the design matrix , , or .
A spatial weights matrix is a square matrix, which often has nonnegative entries and its dimension is the total number of unique spatial units. Moreover, the diagonal elements of are zeros because a spatial unit is not considered to be its own neighbor. Furthermore, the spatial weight between locations and describes how much influence the spatial unit has on . In practice, is often row-normalized; thus can be interpreted as the spatially weighted average of .
In the SLX model, missing spatial weights are not allowed unless the NORMALIZE option is specified, in which case missing spatial weights are replaced by zeros. In addition, missing values are not allowed for the variables (including both dependent and explanatory variables) in the primary data set (which is specified in the DATA= option in the PROC COUNTREG statement).
The SPATIALEFFECTS , SPATIALZEROEFFECTS , and SPATIALDISPEFFECTS statements are used to include spatial effects in design matrices , , and , respectively. Observations in the primary data set (specified in the DATA= option in the PROC COUNTREG statement) can be presented in different orders of spatial units than they are presented in the spatial weights data set (specified in the WMAT= option in the PROC COUNTREG statement). In this case, the SPATIALID statement enables you to use a spatial ID variable to associate the observations in the primary data set with those in the spatial weights data set. The SLX model is not supported for a panel data model.