Chapter Contents Previous Next
 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*n variable names that correspond to the elements Ji,j, i = 1, ... ,m, j = 1, ... ,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
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 have to be defined in 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 approximative Hessian matrix.

 Chapter Contents Previous Next Top