CSPATIALREG Procedure

Example 13.5 Impact Estimation

Data Description and Objective

Examples in this section use the CrimeOH and CrimeWmat data sets that are described in Columbus Crime Data to demonstrate impact estimation in PROC CSPATIALREG.

Spatial Lag of X (SLX) Model

The following statements fit a spatial lag of X (SLX) model to the data by using Income and HValue as explanatory variables, and they estimate the average direct impacts, the average indirect impacts, and the average total impacts for these two explanatory variables.

/*-- SLX --*/
proc cspatialreg data=mylib.CrimeOH Wmat=mylib.CrimeWmat impact(nmc=1000);
   model crime=income hvalue / type=LINEAR;
   spatialeffects income hvalue;
   spatialid sid;
run;

In this example, the TYPE=LINEAR option in the MODEL statement and SPATIALEFFECTS statement specify an SLX model. The IMPACT option requests that the average direct impacts, the average indirect impacts, and the average total impacts be computed for explanatory variables in the model. The impact estimates for this model are shown in Output 13.5.2. According to Output 13.5.2, Income has a direct impact of –1.11 and an indirect impact of –1.37 on Crime, which equal the coefficient estimate of Income and the spatial lag of Income, respectively, in Output 13.5.1. Similarly, HValue has a direct impact of –0.29 and an indirect impact of 0.19 on Crime, which equal the coefficient estimate of HValue and the spatial lag of HValue, respectively, in Output 13.5.1.

Output 13.5.1: Parameter Estimates of the SLX Model

The CSPATIALREG Procedure

Parameter Estimates
ParameterDFEstimateStandard
Error
t ValueApprox
Pr > |t|
Intercept175.0283746.27880811.95<.0001
income1-1.1089250.354227-3.130.0017
hvalue1-0.2897290.096056-3.020.0026
W_income1-1.3709740.531869-2.580.0099
W_hvalue10.1917710.1898371.010.3124
_sigma21107.28754321.6753534.95<.0001


Output 13.5.2: Impact Estimates of Regressors in the SLX Model

Impact Estimates Summary
ParameterDirectIndirectTotal
MeanStandard
Deviation
t ValueMeanStandard
Deviation
t ValueMeanStandard
Deviation
t Value
income-1.1089250.354227-3.13-1.3709740.531869-2.58-2.4798990.470529-5.27
hvalue-0.2897290.096056-3.020.1917710.1898371.01-0.0979580.192176-0.51


Spatial Error Model (SEM)

The following statements fit an SEM model to the data by using Income and HValue as two explanatory variables, and they estimate impacts for these two variables:

/*-- SEM --*/
proc cspatialreg data=mylib.CrimeOH Wmat=mylib.CrimeWmat impact(nmc=10000);
   model crime=income hvalue / type=SEM;
   spatialid sid;
run;

In this example, the TYPE=SEM option in the MODEL statement specifies an SEM model. The IMPACT option requests that the average direct impacts, the average indirect impacts, and the average total impacts be computed for explanatory variables in the model. The impact estimates for this model are shown in Output 13.5.4. According to the results, both Income and HValue have direct impacts but not indirect impacts on the dependent variable Crime. Moreover, the direct impacts of Income and HValue equal their coefficient estimates in Output 13.5.3.

Output 13.5.3: Parameter Estimates of the SEM Model

The CSPATIALREG Procedure

Parameter Estimates
ParameterDFEstimateStandard
Error
t ValueApprox
Pr > |t|
Intercept159.9144365.88121610.19<.0001
income1-0.9428920.370508-2.540.0109
hvalue1-0.3022180.090549-3.340.0008
_lambda10.5603140.1528093.670.0002
_sigma2195.55413720.0259094.77<.0001


Output 13.5.4: Impact Estimates of Regressors in the SEM Model

Impact Estimates Summary
ParameterDirectIndirectTotal
MeanStandard
Deviation
t ValueMeanStandard
Deviation
t ValueMeanStandard
Deviation
t Value
income-0.9428920.370508-2.5400.-0.9428920.370508-2.54
hvalue-0.3022180.090549-3.3400.-0.3022180.090549-3.34


Spatial Autoregressive (SAR) Model

The following statements fit a SAR model to the data by using the explanatory variables Income and HValue, and they request that the average direct impacts, the average indirect impacts, and the average total impacts be computed for the two explanatory variables:

/*-- SAR --*/
proc cspatialreg data=mylib.CrimeOH Wmat=mylib.CrimeWmat
   impact(nmc=50000 order=100);
   model crime=income hvalue / type=SAR;
   spatialid sid;
run;

The impact estimates for this model are shown in Output 13.5.5. On one hand, you see that Income exerts a negative direct and indirect impact on the number of crimes. This suggests that you would see a decrease in the number of crimes in neighborhoods that have higher incomes. Moreover, increased Income in nearby neighborhoods has a negative impact on the number of crimes. On the other hand, HValue exerts a negative direct impact on the number of crimes. This suggests that you would see a decrease in the number of crimes in neighborhoods that have higher housing values.

Output 13.5.5: Impact Estimates of Regressors in the SAR Model

The CSPATIALREG Procedure

Impact Estimates Summary
ParameterDirectIndirectTotal
MeanStandard
Deviation
t ValueMeanStandard
Deviation
t ValueMeanStandard
Deviation
t Value
income-1.0916690.332260-3.29-0.7513190.372889-2.01-1.8429880.565408-3.26
hvalue-0.2821430.094550-2.98-0.2093300.141523-1.48-0.4914730.211251-2.33


Spatial Durbin Model (SDM)

The following statements fit an SDM model to the data by using the explanatory variables Income and HValue, and they estimate impacts for these two variables:

/*-- SDM --*/
proc cspatialreg data=mylib.CrimeOH Wmat=mylib.CrimeWmat
   impact(nmc=50000 order=100);
   model crime=income hvalue / type=SAR;
   spatialeffects income hvalue;
   spatialid sid;
run;

In this example, the TYPE=SAR option in the MODEL statement specifies a SAR model. The SPATIALEFFECTS statement requests that the spatial lag of explanatory variables Income and HValue be included in the model. The IMPACT option requests that the average direct impacts, the average indirect impacts, and the average total impacts be computed for explanatory variables in the model. To estimate impacts, the NMC= option specifies 50,000 iterations of Monte Carlo simulation and the ORDER= option specifies 100 as the order of Neumann series. The impact estimates for this model are shown in Output 13.5.6. On one hand, you see that the indirect impact of Income is not significant at the 5% significance level (because the t value of –1.58 is greater than –1.96). However, the direct impact of Income is negative and significant, suggesting that you would see a decrease in the number of crimes in neighborhoods that have higher incomes. Similarly, HValue exerts a negative direct impact on the number of crimes. This suggests that you would see a decrease in the number of crimes in neighborhoods that have higher housing values.

Output 13.5.6: Impact Estimates of Regressors in the SDM Model

The CSPATIALREG Procedure

Impact Estimates Summary
ParameterDirectIndirectTotal
MeanStandard
Deviation
t ValueMeanStandard
Deviation
t ValueMeanStandard
Deviation
t Value
income-1.0218460.329139-3.10-1.4937140.945050-1.58-2.5155601.008252-2.49
hvalue-0.2787300.093730-2.970.2019980.3687890.55-0.0767330.406750-0.19


Last updated: July 09, 2026