The SPATIALREG Procedure
Parameter Naming Conventions for RESTRICT, TEST, BOUNDS, and INIT Statements
This section describes how you refer to the parameters when using either the RESTRICT, TEST, BOUNDS, or INIT statement. The examples are presented using the RESTRICT statement. However, the same remarks apply to referencing parameters when you use the TEST, BOUNDS, or INIT statement.
To impose a restriction on a parameter related to a regressor in the MODEL statement, you simply use the name of the regressor itself. Suppose your model is
model y = x1-x3 / type=SAR;
where x1-x3 are continuous variables. Suppose you want to restrict the parameter associated with the regressor x3 to be greater than 1.7. You should provide the following statement:
RESTRICT x3 > 1.7;
To impose a restriction on a parameter associated with a regressor in the SPATIALEFFECTS statement, you can form the name of the parameter by prefixing W_ to the name of the regressor. Suppose your MODEL and SPATIALEFFECTS statements are as follows:
model y = x1-x3 / type=SAR; spatialeffects x1 x2 x3;
Suppose you want to restrict the parameter related to the x3 regressor in the SPATIALEFFECTS statement to be less than 1.0. You should refer to the parameter as W_x3 and provide the following statement:
RESTRICT W_x3 < 1.0;
Even though the regressor x3 appears in both the MODEL and SPATIALEFFECTS statements, the parameter associated with x3 in the MODEL statement is, of course, different from the parameter associated with x3 in the SPATIALEFFECTS statement. Thus, when the name of a regressor is used in a RESTRICT statement without any prefix, it refers to the parameter associated with that regressor in the MODEL statement. Meanwhile, when the name of a regressor is used in a RESTRICT statement with the prefix W_, it refers to the parameter associated with that regressor in the SPATIALEFFECTS statement. Note that the intercept is not included in the SPATIALEFFECTS statement.
Referring to Class Level Parameters
When your MODEL includes a CLASS variable, you can impose restrictions on the parameters associated with each of the levels related to that variable as described in this section.
Suppose your CLASS variable is named C and has three levels: 0, 1, 2. Suppose your model is the following:
class C; model y = x1 x2 C;
Adding a CLASS variable as a regressor to your model introduces additional parameters to your model, each of which is associated with one of the levels of that variable. You can form the name of the parameter associated with a particular level of your CLASS variable by inserting the underscore character between the name of the variable and the value of the level. Thus, to restrict the parameter associated with level 0 of the CLASS variable C to always be greater than 0.7, you should refer to the parameter as C_0 and provide the following statement:
RESTRICT C_0 > 0.7;
When the value of a level is a negative number, you must replace the minus sign with an underscore when you form the name of the parameter associated with that particular level of the CLASS variable. For example, suppose your CLASS variable is named D and has four levels: –1, 0, 1, 2. Suppose your model is the following:
class D; model y = x1 x2 D;
To restrict the parameter associated with level –1 of the CLASS variable D to always be less than 0.4, you should refer to the parameter as D__1 (note that there are two underscores in this parameter name: one to connect the name of the variable to its value and the other to replace the minus sign in the value itself). The following statement imposes the restriction on the parameter in question:
RESTRICT D__1 < 0.4;
Depending on the parameterization that you impose on your CLASS variable, one of the parameters associated with its levels can be dropped from your model before optimization in order to avoid collinearity. For example, when the default parameterization GLM is imposed, the parameter associated with the last level of your CLASS variable is dropped before optimization. If you attempt to impose a restriction on a dropped parameter by using the RESTRICT statement, you receive an error message in the log.
For example, suppose once again that your CLASS variable is named C and that it has three levels: 0, 1, 2. Suppose your model is the following:
class C; model y = x1 x2 C;
Because no additional options were specified in the CLASS statement, the GLM parameterization is assumed. This entails that the parameter named C_2 (which is the parameter associated with the last level of your CLASS variable) will be dropped from your model before the optimizer is invoked. Therefore, you generate an error if you attempt to restrict the C_2 parameter in any way by referring to it in a RESTRICT statement. For example, the following RESTRICT statement generates an error:
RESTRICT C_2 < 0.3;
Referring to Parameters Associated with Interactions between Regressors
When a regressor in your model involves an interaction between other regressors, you can impose restrictions on the parameters associated with the interaction as described in this section.
Suppose you have the following model:
model y = x1 x2 x3*x4;
You can form the name of the parameter associated with the interaction regressor x3*x4 by replacing the multiplication sign with an underscore. Thus, x3_x4 refers to the parameter associated with the interaction regressor x3*x4.
Referring to interactions between regressors and CLASS variables is handled in exactly the same way. Suppose you have a CLASS variable named C that has three levels (0, 1, 2), and that your model is the following:
class C; model y = x1 x2 C*x3;
The interaction between the continuous variable x3 and the CLASS variable C introduces three additional parameters, which are named x3_C_0, x3_C_1, and x3_C_2. Note that, although the order of the terms in the interaction is C followed by x3, the name of the parameter associated with the interaction is formed by placing the name of the continuous variable x3 first, followed by an underscore, followed by the name of the CLASS variable C, followed by another underscore, and then followed by the level value. Once again, depending on the parameterization that you specify in your CLASS statement, for each interaction in your model that involves a CLASS variable, one of the parameters associated with that interaction can be dropped from your model before optimization.
The name of a parameter associated with a nested interaction is formed in a slightly different way. Suppose you have a CLASS variable named C that has three levels (0, 1, 2) and your model is the following:
class C; model y = x1 x2 x3(C);
The nested interaction between the continuous variable x3 and the CLASS variable C introduces three additional parameters, which are named x3_C__0, x3_C__1, and x3_C__2. Note how the name in each case was formed from the name of the regressor by replacing the left and right parentheses with underscores and then appending another underscore followed by the level value.
Referring to Implicit Parameters
For all models in PROC SPATIALREG, one or more implicit parameters are added to your model before optimization. You can impose restrictions on these implicit parameters as follows.
If you have a linear model or SLX model, the _sigma2 parameter is added to your model. For the SAR or SDM model, the _rho and _sigma2 parameters are added to your model.
If you specify TYPE=SEM or TYPE=SMA, the _lambda and _sigma2 parameters are added to your model. If you specify the TYPE=SAC or TYPE=SARMA option, then three implicit parameters are added to your model: _rho, _lambda, and _sigma2.
Whenever your model type dictates the addition of one or more of these implicit parameters, you can impose restrictions on the implicit parameters by referring to them by name. For example, assuming that your model type implies the existence of the _rho parameter, you can restrict _rho to be greater than 0 as follows:
RESTRICT _rho > 0.0;