The MODEL Procedure


RESTRICT Statement

  • RESTRICT restriction1 < , restriction2 …> ;

The RESTRICT statement is used to impose linear and nonlinear restrictions either on the parameters in an estimation or on the solution variables that are specified in a solve operation.

Each restriction is written as an optional name, followed by an expression, followed by an equality operator (=) or an inequality operator (<, >, <=, >=), followed by a second expression:

  • < "name" > expression operator expression

The optional "name" is a string used to identify the restriction. The operator can be =, <, >, <= , or >=. The operator and second expression are optional. When they are omitted, the default operator is > and the default second expression is 0.

Each RESTRICT statement is associated with the preceding FIT statement or SOLVE statement. When there is no preceding FIT or SOLVE statement, the RESTRICT statement is associated with the following FIT or SOLVE statement. You can specify any number of RESTRICT statements.

Parameter Estimates

Expressions in RESTRICT statements that apply to the parameters estimated by a FIT statement can be composed of parameter names, arithmetic operators, functions, and constants. Comparison operators (such as = or <) and logical operators (such as &) cannot be used in RESTRICT statement expressions. Parameters that are named in restriction expressions must be among the parameters estimated by the associated FIT statement. Expressions can refer to variables defined in the program.

The restriction expressions can be linear or nonlinear functions of the parameters.

The optional "name" is a string used to identify the restriction in the printed output and in the OUTEST= data set.

The following example shows how to use the RESTRICT statement:

proc model data=one;
   endogenous y1 y2;
   exogenous x1 x2;
   parms a b c;
   restrict b*(b+c) <= a;

   eq.one = -y1/c + a/x2 + b * x1**2 + c * x2**2;
   eq.two = -y2 * y1 + b * x2**2 - c/(2 * x1);

   fit one two / fiml;
run;

Solution Variables

Expressions in RESTRICT statements that apply to the solution variables in a SOLVE statement can be composed of any variables in the model. Unlike restriction expressions that are used in parameter estimation, exogenous model variables can be used in restriction expressions that involve solution variables because each observation is solved independently in a SOLVE statement. To include constraints that are imposed by RESTRICT inequalities in a solution, you must specify the OPTIMIZE option in the SOLVE statement.

The following example illustrates how multiple solutions to a nonlinear system of equations can be found by using a RESTRICT expression that depends on exogenous variables. Two of the four possible solutions are presented in Figure 19.22.

data d;
   do i = 0 to 1;
      date=i;
      if i = 0 then r = -1;
      else          r = +1;
      output;
   end;
run;


proc model data=d ;
   endo x y;

   eq.a = x*x - 4;
   eq.b = y*y - 9;

   restrict x*y*r > 1;

   solve /  optimize out=o outall;
quit;

proc print data = o; run;

Figure 19.22: Listing of OUT= Data Set Created by a Nonlinear Restriction

Obs _TYPE_ _MODE_ _ERRORS_ _OBJVAL_ x y r
1 ACTUAL SIMULATE 0 0 2 -3 -1
2 PREDICT SIMULATE 0 0 2 -3 -1
3 RESIDUAL SIMULATE 0 0 . . -1
4 ERROR SIMULATE 0 0 . . -1
5 VIOL SIMULATE 0 0 . . -1
6 ACTUAL SIMULATE 0 0 -2 -3 1
7 PREDICT SIMULATE 0 0 -2 -3 1
8 RESIDUAL SIMULATE 0 0 . . 1
9 ERROR SIMULATE 0 0 . . 1
10 VIOL SIMULATE 0 0 . . 1