The NLP Procedure

JACOBIAN Statement

  • JACOBIAN variables;

The JACOBIAN statement defines the JACOBIAN matrix J for a system of objective functions. For more information, see the section Derivatives.

The JACOBIAN statement lists $ m \times n$ variable names that correspond to the elements $ J_{i,j}$, $ i=1,\ldots ,m; \:  j=1,\ldots ,n$, of the Jacobian matrix listed by rows.

For example, the statements

   lsq f1-f3;
   decvar x1 x2;
   jacobian j1-j6;

correspond to the Jacobian matrix

\[  J = \left[ \begin{array}{cc} J1 &  J2 \\ J3 &  J4 \\ J5 &  J6 \\ \end{array} \right] = \left[ \begin{array}{cc} \partial f_1/ \partial x_1 &  \partial f_1/ \partial x_2 \\ \partial f_2/ \partial x_1 &  \partial f_2/ \partial x_2 \\ \partial f_3/ \partial x_1 &  \partial f_3/ \partial x_2 \\ \end{array} \right]  \]

The m rows of the Jacobian matrix must correspond to the order of the m function names listed in the MIN , MAX , or LSQ statement. The n columns of the Jacobian matrix must correspond to the order of the n decision variables listed in the DECVAR statement. To specify the values of nonzero derivatives, the variables specified in the JACOBIAN statement must be defined on the left-hand side of algebraic expressions in programming statements.

For example, consider the Rosenbrock function:

proc nlp tech=levmar;
   array j[2,2] j1-j4;
   lsq f1 f2;
   decvar x1 x2;
   jacobian j1-j4;
   f1 = 10 * (x2 - x1 * x1);
   f2 = 1 - x1;
   j[1,1] = -20 * x1;
   j[1,2] = 10;
   j[2,1] = -1;
   j[2,2] = 0;   /* is not needed */
run;

The JACOBIAN statement is useful only if more than one objective function is given in the MIN , MAX , or LSQ statement, or if a DATA= input data set specifies more than one function. If the MIN , MAX , or LSQ statement contains only one objective function and no DATA= input data set is used, the JACOBIAN and GRADIENT statements are equivalent. In the case of least squares minimization, the crossproduct Jacobian is used as an approximate Hessian matrix.