This section describes how you can refer to the parameters that are defined in the MODEL, ZEROMODEL, DISPMODEL, SPATIALEFFECTS, SPATIALDISPEFFECTS, and SPATIALZEROEFFECTS statements when you use the RESTRICT, TEST, BOUNDS, or INIT statement. The following examples use the RESTRICT statement, but the same remarks apply to naming parameters when you use the TEST, BOUNDS, or INIT statement. The names of the parameters are written to the OUTEST= data set.
To impose a restriction on a parameter that is related to a regressor in the MODEL statement, you simply use the name of the
regressor itself to refer to its associated parameter. Suppose your model is defined in the following statement, where x1
through x5
are continuous variables:
model y = x1 x2 x5;
If you want to restrict the parameter that is associated with the regressor x5
to be greater than 1.7, then you use the following statement:
RESTRICT x5 > 1.7;
To impose a restriction on a parameter associated with a regressor in the ZEROMODEL statement, you can form the name of the
parameter by prefixing Inf_
to the name of the regressor. Suppose your MODEL and ZEROMODEL statements are as follows:
model y = x1 x2 x5; zeromodel y ~ x3 x5;
If you want to restrict the parameter related to the x5 regressor in the ZEROMODEL statement to be less than 1.0, then you
refer to the parameter as Inf_x5
and provide the following statement:
RESTRICT Inf_x5 < 1.0;
Even though the regressor x5
appears in both the MODEL and ZEROMODEL statements, the parameter associated with x5
in the MODEL statement is, of course, different from the parameter associated with x5
in the ZEROMODEL statement. Thus, the name of a regressor that appears in a RESTRICT statement without any prefix refers
to the parameter associated with that regressor in the MODEL statement, and the name of a regressor that appears in a RESTRICT
statement with the prefix Inf_
refers to the parameter associated with that regressor in the ZEROMODEL statement. The parameter that is associated with
the intercept in the ZEROMODEL is named Inf_Intercept
.
In a similar way, you can form the name of a parameter associated with a regressor in the DISPMODEL statement by prefixing
Dsp_
to the name of the regressor. The parameter associated with the intercept in the DISPMODEL is named Dsp_Intercept
.
And you can form the name of a parameter associated with a regressor in the SPATIALEFFECTS statement by prefixing W_
to the name of the regressor. The parameter associated with the intercept in the SPATIALEFFECTS is named W_Intercept
.
When your MODEL statement includes a classification variable, you can impose restrictions on the parameters associated with each of the levels that are related to the classification variable as follows.
Suppose your classification variable is named C
and it has three levels: 0, 1, 2. Suppose your model is the following:
class C; model y = x1 x2 C;
Adding a classification variable as a regressor to your model introduces additional parameters into your model, each of which
is associated with one of the levels of the classification 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 classification variable
and the value of the level. Thus, to restrict the parameter associated with level 0
of the classification variable C
to always be greater than 0.7, you refer to the parameter as C_0
and provide the following statement:
RESTRICT C_0 > 0.7;
When a regressor in your model involves an interaction between other regressors, you can impose restrictions on the parameters associated with the interaction.
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 that is associated with the interaction regressor x3*x4
.
Referring to interactions between regressors and classification variables is handled in the same way. Suppose you have a classification
variable that is named C
and has three levels: 0, 1, 2. Suppose that your model is the following:
class C; model y = x1 x2 C*x3;
The interaction between the continuous variable x3
and the classification variable C
introduces three additional parameters, which are named x3_C_0
, x3_C_1
, and x3_C_2
. Although the order of the terms in the interaction is C
followed by x3
, note how 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 classification variable C
, followed by an underscore, and then followed by the level value. Depending on the parameterization you specify in your CLASS
statement, for each interaction in your model that involves a classification variable, one of the parameters associated with
that interaction might be dropped from your model prior to optimization.
The name of a parameter associated with a nested interaction is formed in a slightly different way. Suppose you have a classification
variable that is named C
and has three levels: 0, 1, 2. Suppose that your model is the following:
class C; model y = x1 x2 x3(C);
The nested interaction between the continuous variable x3
and the classification 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 is 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.
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 that is associated with that particular level of the classification variable. For example, suppose your classification
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 that is associated with level –1
of the classification variable D
to always be less than 0.4, you refer to the parameter as D__1
(note that there are two underscores in this parameter name: one to connect the name of the classification variable to its
value and the other to replace the minus sign in the value itself) and provide following statement:
RESTRICT D__1 < 0.4;
Depending on the parameterization you impose on your classification variable, one of the parameters associated with its levels might be dropped from your model prior to optimization in order to avoid collinearity. For example, when the default parameterization GLM is imposed, the parameter that is associated with the last level of your classification variable is dropped prior to optimization. If you attempt to impose a restriction on a dropped parameter by using the RESTRICT statement, PROC COUNTREG issues an error message in the log.
For example, suppose that your classification 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 are specified in the CLASS statement, GLM parameterization is assumed. This means that the parameter
named C_2
(which is the parameter associated with the last level of your classification variable) is dropped from your model before
the optimizer is invoked. Therefore, an error is issued 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;
For certain model types, one or more implicit parameters are added to your model prior to optimization. You can impose restrictions on these implicit parameters.
For the Poisson model for which ERRORCOMP=RANDOM is specified, PROC COUNTREG automatically adds the _Alpha
parameter to your model.
If no ERRORCOMP= option is specified for zero-inflated binomial and negative binomial models, then PROC COUNTREG adds the
_Alpha
parameter to the model. If ERRORCOMP=RANDOM is specified for the zero-inflated binomial and negative binomial models, then
PROC COUNTREG adds two implicit parameters to the model: _Alpha
and _Beta
.
For Conway-Maxwell Poisson models that do not include a DISPMODEL statement, the _lnNu
parameter is added to the model.
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 in a RESTRICT statement. For example, if your model type implies the
existence of the _Alpha
parameter, you can restrict _Alpha
to be greater than 0.2 as follows:
RESTRICT _Alpha > 0.2;