CSPATIALREG Procedure

MODEL Statement

  • MODEL dependent-variable = regressors </ options>;

The MODEL statement specifies the dependent-variable and independent covariates (regressors) for the regression model. If you specify no regressors, PROC CSPATIALREG fits a model that contains only an intercept. The dependent-variable is treated as a continuous variable in the primary input data table (specified in the DATA= option). Models in PROC CSPATIALREG do not allow missing values. If there are missing values, an error message is returned.

You can specify only one MODEL statement. You can specify the following options after a slash (/):

NOINT

suppresses the intercept parameter.

TYPE=ALL | AUTO | CAR | LINEAR | SAC | SAR | SARMA | SEM | SMA

specifies the type of model to be fit. If you specify this option in both the MODEL statement and the PROC CSPATIALREG statement, the MODEL statement overrides the PROC CSPATIALREG statement. You can specify the following values:

ALL

fits all models.

AUTO

fits a subset of selected models.

CAR

fits a conditional autoregressive model.

LINEAR

fits a linear model.

SAC

fits a spatial autoregressive confused model.

SAR

fits a spatial autoregressive model.

SARMA

fits a spatial autoregressive moving average model.

SEM

fits a spatial error model.

SMA

fits a spatial moving average model.

By default, TYPE=SAR. For more information about the TYPE=ALL or TYPE=AUTO option, see the section Multiple Model Comparison.

If you specify covariates in the SPATIALEFFECT statement, then their spatial lag is added to the model. In that case, you can specify the following TYPE= option values to get the model that you want:

TYPE=CAR

fits the CAR2 model.

TYPE=LINEAR

fits the SLX model.

TYPE=SAC

fits the SDAC model.

TYPE=SAR

fits the SDM.

TYPE=SARMA

fits the SDARMA model.

TYPE=SEM

fits the SDEM.

TYPE=SMA

fits the SDMA model.

Printing Options

You can specify the following options in either the PROC CSPATIALREG statement or the MODEL statement. If you specify these options in both the PROC CSPATIALREG and MODEL statements, the MODEL statement overrides the PROC CSPATIALREG statement.

CORRB

prints the correlation matrix of the parameter estimates.

COVB

prints the covariance matrix of the parameter estimates.

NOPRINT

suppresses all printed output.

PRINTALL

prints all available output.

Optimization Control Options

You can specify the following options in either the PROC CSPATIALREG statement or the MODEL statement. If you specify these options in both the PROC CSPATIALREG and MODEL statements, the MODEL statement overrides the PROC CSPATIALREG statement.

MAXFUNC=i
MAXFU=i

specifies the maximum number of function calls in the optimization process. By default, MAXFUNC=1000.

The optimization can terminate only after completing a full iteration. Therefore, the number of function calls that are actually used can exceed the number of calls that you specify in this option.

MAXITER=i
MAXIT=i

specifies the maximum number of iterations in the optimization process. By default, MAXITER=200.

MAXTIME=r

specifies an upper limit of r seconds of CPU time for the optimization process. The default value is the largest floating-point double representation available on your computer. The time that you specify in this option is checked only once at the end of each iteration. Therefore, the actual run time can be much longer than r. The actual run time includes the remaining time that is needed to finish the iteration and the time that is needed to generate the output of the results.

METHOD=CONGRA | DBLDOG | NEWRAP | NONE | NRRIDG | QUANEW | TRUREG

specifies the iterative minimization method to use. You can specify the following methods:

CONGRA

specifies the conjugate-gradient method.

DBLDOG

specifies the double-dogleg method.

NEWRAP

specifies the Newton-Raphson method.

NONE

specifies that optimization not be performed.

NRRIDG

specifies the Newton-Raphson ridge method.

QUANEW

specifies the quasi-Newton method.

TRUREG

specifies the trust region method.

By default, METHOD=NEWRAP.

Last updated: July 09, 2026