|
Chapter Contents |
Previous |
Next |
| The NLP Procedure |
lsq f1-f3; decvar x1 x2; jacobian j1-j6;correspond to the Jacobian matrix
![J = [ J1 & J2 \ J3 & J4 \ J5 & J6 \ ]
= [ \partial f_1/ \partial x_1 & \partial...
... \partial x_2 \ \partial f_3/ \partial x_1 & \partial f_3/ \partial x_2 \ ] .](images/nlpeq54.gif)
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 |
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.