The SPATIALREG Procedure

Example 32.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 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 32.5.1. Note that the spatial weights matrix in the SIMW data set is a full matrix. Compared with Output 32.2.2, Chebyshev approximation yields very similar parameter estimates.

Output 32.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 32.5.2, which is identical to Output 32.5.1.

Output 32.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 32.5.3. Compared with Output 32.2.3, the SDM model that is fit using Taylor approximation yields almost identical parameter estimates.

Output 32.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 32.5.4, which is identical to Output 32.5.3.

Output 32.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 32.5.5, which is similar to Output 32.5.3.

Output 32.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


To use Chebyshev approximation for this model with compact representation, submit the following statements:

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 32.5.6.

Output 32.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


Last updated: August 25, 2017