SPATIALREG Procedure

Example 31.5 Taylor and Chebyshev Approximations

(View the complete code for this example.)

When you have a large data set (that is, the number of spatial units in your data is large), it becomes burdensome to fit some models. This is partially because all models except linear regression models involve the calculation of the determinant of the matrix of a large size (such as StartAbsoluteValue bold upper I minus rho bold upper W EndAbsoluteValue in a SAR model). In these cases, Taylor and Chebyshev approximations in PROC SPATIALREG can be helpful. The SPATIALREG procedure enables you to estimate both SAR and SDM models with a relatively large spatial weights matrix by using these two approximations. Using the two small data sets SIMDATA and SIMW in Models with Spatial ID Matching, you will see how you can invoke the two approximations in PROC SPATIALREG.

The following statements fit a SAR model by using Chebyshev approximation:

proc spatialreg data=simdata Wmat=simw approximation=(ORDER=10);
  model y=x1-x3 / type=SAR;
  spatialid SID;
run;

The parameter estimates for this model are shown in Output 31.5.1. Note that the spatial weights matrix in the SIMW data set is a full matrix. Compared with Output 31.2.2, Chebyshev approximation yields very similar parameter estimates.

Output 31.5.1: Parameter Estimates of SAR Model with Chebyshev Approximation

The SPATIALREG Procedure
 
Model: MODEL 1
Dependent Variable: y

Parameter Estimates
ParameterDFEstimateStandard
Error
t ValueApprox
Pr > |t|
Intercept11.7806380.09869918.04<.0001
x110.5733290.04739512.10<.0001
x210.7070500.05718112.37<.0001
x31-0.9028430.053314-16.93<.0001
_rho1-0.4737040.063004-7.52<.0001
_sigma210.1315090.0263504.99<.0001


Using the compact representation of the spatial weights matrix, you can submit the following statements to fit a SAR model by using Chebyshev approximation:

proc spatialreg data=simdata Wmat=simw_compact approximation=(ORDER=10);
  model y=x1-x3 / type=SAR;
  spatialid SID;
run;

The parameter estimates for this model are shown in Output 31.5.2, which is identical to Output 31.5.1.

Output 31.5.2: Parameter Estimates of SAR Model with Chebyshev Approximation and Compact Representation

The SPATIALREG Procedure
 
Model: MODEL 1
Dependent Variable: y

Parameter Estimates
ParameterDFEstimateStandard
Error
t ValueApprox
Pr > |t|
Intercept11.7806380.09869918.04<.0001
x110.5733290.04739512.10<.0001
x210.7070500.05718112.37<.0001
x31-0.9028430.053314-16.93<.0001
_rho1-0.4737040.063004-7.52<.0001
_sigma210.1315090.0263504.99<.0001


The following statements fit an SDM model by using Taylor approximation:

proc spatialreg data=simdata Wmat=simw approximation=(Taylor ORDER=50);
  model y=x1-x3/ type=SAR;
  spatialeffects x1-x3;
  spatialid SID;
run;

The parameter estimates for this model are shown in Output 31.5.3. Compared with Output 31.2.3, the SDM model that is fit using Taylor approximation yields almost identical parameter estimates.

Output 31.5.3: Parameter Estimates of SDM Model with Taylor Approximation

The SPATIALREG Procedure
 
Model: MODEL 1
Dependent Variable: y

Parameter Estimates
ParameterDFEstimateStandard
Error
t ValueApprox
Pr > |t|
Intercept11.9325750.1988829.72<.0001
x110.5485050.04980611.01<.0001
x210.6860120.05626612.19<.0001
x31-0.8901620.053516-16.63<.0001
W_x110.1723000.1540181.120.2633
W_x210.0237440.1985570.120.9048
W_x31-0.3248060.228032-1.420.1543
_rho1-0.6397550.164652-3.890.0001
_sigma210.1205270.0247294.87<.0001


With the compact representation, the following statements fit the SDM model by using Taylor approximation:

proc spatialreg data=simdata Wmat=simw_compact
     approximation=(Taylor ORDER=50);
  model y=x1-x3/ type=SAR;
  spatialeffects x1-x3;
  spatialid SID;
run;

The parameter estimates for this model are shown in Output 31.5.4, which is identical to Output 31.5.3.

Output 31.5.4: Parameter Estimates of SDM Model with Taylor Approximation and Compact Representation

The SPATIALREG Procedure
 
Model: MODEL 1
Dependent Variable: y

Parameter Estimates
ParameterDFEstimateStandard
Error
t ValueApprox
Pr > |t|
Intercept11.9325750.1988829.72<.0001
x110.5485050.04980611.01<.0001
x210.6860120.05626612.19<.0001
x31-0.8901620.053516-16.63<.0001
W_x110.1723000.1540181.120.2633
W_x210.0237440.1985570.120.9048
W_x31-0.3248060.228032-1.420.1543
_rho1-0.6397550.164652-3.890.0001
_sigma210.1205270.0247294.87<.0001


To use Chebyshev approximation for the preceding SDM model, submit the following statements:

proc spatialreg data=simdata Wmat=simw approximation=(ORDER=10);
  model y=x1-x3/ type=SAR;
  spatialeffects x1-x3;
  spatialid SID;
  run;

The parameter estimates for this model are shown in Output 31.5.5, which is similar to Output 31.5.3.

Output 31.5.5: Parameter Estimates of SDM Model with Chebyshev Approximation

The SPATIALREG Procedure
 
Model: MODEL 1
Dependent Variable: y

Parameter Estimates
ParameterDFEstimateStandard
Error
t ValueApprox
Pr > |t|
Intercept11.9320810.1984949.73<.0001
x110.5485380.04980211.01<.0001
x210.6860490.05626212.19<.0001
x31-0.8901910.053515-16.63<.0001
W_x110.1720170.1538571.120.2636
W_x210.0233620.1983310.120.9062
W_x31-0.3243420.227739-1.420.1544
_rho1-0.6393250.164295-3.89<.0001
_sigma210.1205420.0247314.87<.0001


The following statements use Chebyshev approximation for this model with compact representation:

proc spatialreg data=simdata Wmat=simw_compact approximation=(ORDER=10);
  model y=x1-x3/ type=SAR;
  spatialeffects x1-x3;
  spatialid SID;
run;

The parameter estimates for this model are shown in Output 31.5.6.

Output 31.5.6: Parameter Estimates of SDM Model with Chebyshev Approximation and Compact Representation

The SPATIALREG Procedure
 
Model: MODEL 1
Dependent Variable: y

Parameter Estimates
ParameterDFEstimateStandard
Error
t ValueApprox
Pr > |t|
Intercept11.9320810.1984949.73<.0001
x110.5485380.04980211.01<.0001
x210.6860490.05626212.19<.0001
x31-0.8901910.053515-16.63<.0001
W_x110.1720170.1538571.120.2636
W_x210.0233620.1983310.120.9062
W_x31-0.3243420.227739-1.420.1544
_rho1-0.6393250.164295-3.89<.0001
_sigma210.1205420.0247314.87<.0001


The following statements fit an SEM model by using Chebyshev approximation:

proc spatialreg data=simdata Wmat=simw approximation=(ORDER=10);
  model y=x1-x3 / type=SEM;
  spatialid SID;
run;

The parameter estimates for this model are shown in Output 31.5.7. Note that the spatial weights matrix in the SIMW data set is a full matrix. Chebyshev approximation yields parameter estimates that are very similar to those shown in Output 31.2.2.

Output 31.5.7: Parameter Estimates of SEM Model with Chebyshev Approximation

The SPATIALREG Procedure
 
Model: MODEL 1
Dependent Variable: y

Parameter Estimates
ParameterDFEstimateStandard
Error
t ValueApprox
Pr > |t|
Intercept11.1661020.02994138.95<.0001
x110.4886650.0494129.89<.0001
x210.6371420.06154310.35<.0001
x31-0.8316740.055165-15.08<.0001
_lambda1-0.9443950.110388-8.56<.0001
_sigma210.1491030.0312214.78<.0001


The following statements fit an SEM model by using Chebyshev approximation and compact representation of the spatial weights matrix:

proc spatialreg data=simdata Wmat=simw_compact approximation=(ORDER=10);
  model y=x1-x3 / type=SEM;
  spatialid SID;
run;

The parameter estimates for this model are shown in Output 31.5.8, which is identical to Output 31.5.7.

Output 31.5.8: Parameter Estimates of SEM Model with Chebyshev Approximation and Compact Representation

The SPATIALREG Procedure
 
Model: MODEL 1
Dependent Variable: y

Parameter Estimates
ParameterDFEstimateStandard
Error
t ValueApprox
Pr > |t|
Intercept11.1661020.02994138.95<.0001
x110.4886650.0494129.89<.0001
x210.6371420.06154310.35<.0001
x31-0.8316740.055165-15.08<.0001
_lambda1-0.9443950.110388-8.56<.0001
_sigma210.1491030.0312214.78<.0001


The following statements fit an SDEM model by using Taylor approximation:

proc spatialreg data=simdata Wmat=simw approximation=(Taylor ORDER=50);
  model y=x1-x3/ type=SEM;
  spatialeffects x1-x3;
  spatialid SID;
run;

The parameter estimates for this model are shown in Output 31.5.9.

Output 31.5.9: Parameter Estimates of SDEM Model with Taylor Approximation

The SPATIALREG Procedure
 
Model: MODEL 1
Dependent Variable: y

Parameter Estimates
ParameterDFEstimateStandard
Error
t ValueApprox
Pr > |t|
Intercept11.1931780.04712925.32<.0001
x110.5664970.0567829.98<.0001
x210.7220600.05971712.09<.0001
x31-0.9092120.061286-14.84<.0001
W_x11-0.1352840.128339-1.050.2918
W_x21-0.4181160.152899-2.730.0062
W_x310.2900410.1923971.510.1317
_lambda1-0.7238530.209844-3.450.0006
_sigma210.1267230.0268204.73<.0001


The following statements fit an SDEM model by using Taylor approximation and compact representation of the spatial weights matrix:

proc spatialreg data=simdata Wmat=simw_compact
     approximation=(Taylor ORDER=50);
  model y=x1-x3/ type=SEM;
  spatialeffects x1-x3;
  spatialid SID;
run;

The parameter estimates for this model are shown in Output 31.5.10, which is identical to Output 31.5.9.

Output 31.5.10: Parameter Estimates of SDEM Model with Taylor Approximation and Compact Representation

The SPATIALREG Procedure
 
Model: MODEL 1
Dependent Variable: y

Parameter Estimates
ParameterDFEstimateStandard
Error
t ValueApprox
Pr > |t|
Intercept11.1931780.04712925.32<.0001
x110.5664970.0567829.98<.0001
x210.7220600.05971712.09<.0001
x31-0.9092120.061286-14.84<.0001
W_x11-0.1352840.128339-1.050.2918
W_x21-0.4181160.152899-2.730.0062
W_x310.2900410.1923971.510.1317
_lambda1-0.7238530.209844-3.450.0006
_sigma210.1267230.0268204.73<.0001


The following statements use Chebyshev approximation for the preceding SDEM model:

proc spatialreg data=simdata Wmat=simw approximation=(ORDER=10);
  model y=x1-x3/ type=SEM;
  spatialeffects x1-x3;
  spatialid SID;
  run;

The parameter estimates for this model are shown in Output 31.5.11, which is similar to Output 31.5.10.

Output 31.5.11: Parameter Estimates of SDEM Model with Chebyshev Approximation

The SPATIALREG Procedure
 
Model: MODEL 1
Dependent Variable: y

Parameter Estimates
ParameterDFEstimateStandard
Error
t ValueApprox
Pr > |t|
Intercept11.1931990.04715625.30<.0001
x110.5666310.0567309.99<.0001
x210.7221630.05968812.10<.0001
x31-0.9092880.061252-14.84<.0001
W_x11-0.1355910.128237-1.060.2904
W_x21-0.4184370.152818-2.740.0062
W_x310.2902940.1922531.510.1311
_lambda1-0.7220740.208152-3.470.0005
_sigma210.1267970.0268164.73<.0001


The following statements use Chebyshev approximation for this model with compact representation of the spatial weights matrix:

proc spatialreg data=simdata Wmat=simw_compact approximation=(ORDER=10);
  model y=x1-x3/ type=SEM;
  spatialeffects x1-x3;
  spatialid SID;
run;

The parameter estimates for this model are shown in Output 31.5.12, which is similar to Output 31.5.11.

Output 31.5.12: Parameter Estimates of SDEM Model with Chebyshev Approximation and Compact Representation

The SPATIALREG Procedure
 
Model: MODEL 1
Dependent Variable: y

Parameter Estimates
ParameterDFEstimateStandard
Error
t ValueApprox
Pr > |t|
Intercept11.1931990.04715625.30<.0001
x110.5666310.0567309.99<.0001
x210.7221630.05968812.10<.0001
x31-0.9092880.061252-14.84<.0001
W_x11-0.1355910.128237-1.060.2904
W_x21-0.4184370.152818-2.740.0062
W_x310.2902940.1922531.510.1311
_lambda1-0.7220740.208152-3.470.0005
_sigma210.1267970.0268164.73<.0001


Last updated: June 19, 2025