SPATIALREG Procedure

Example 31.3 Fitting Multiple Models

(View the complete code for this example.)

You can fit more than one model by making only one call to PROC SPATIALREG. For example, if you want to fit both SAR and SEM models to the CRIMEOH data set, you can use the following statements:

 proc spatialreg data=crimeoh Wmat=crimeWmat NONORMALIZE;
   model crime=income hvalue / type=SAR;
   model crime=income hvalue / type=SEM;
 run;

The parameter estimates for the SAR and SEM models are shown in Output 31.3.1 and Output 31.3.2, respectively.

Output 31.3.1: Parameter Estimates of SAR Model

Parameter Estimates
Parameter DF Estimate Standard
Error
t Value Approx
Pr > |t|
Intercept 1 45.077070 7.870590 5.73 <.0001
income 1 -1.031531 0.328403 -3.14 0.0017
hvalue 1 -0.265924 0.088218 -3.01 0.0026
_rho 1 0.431020 0.123594 3.49 0.0005
_sigma2 1 95.487066 19.506312 4.90 <.0001


Output 31.3.2: Parameter Estimates of SEM Model

Parameter Estimates
Parameter DF Estimate Standard
Error
t Value Approx
Pr > |t|
Intercept 1 59.891926 5.884117 10.18 <.0001
income 1 -0.941303 0.370268 -2.54 0.0110
hvalue 1 -0.302253 0.090552 -3.34 0.0008
_lambda 1 0.561779 0.152413 3.69 0.0002
_sigma2 1 95.572632 20.037633 4.77 <.0001


Last updated: June 19, 2025