CRPJAC Statement
- CRPJAC variables ;
The CRPJAC statement defines the crossproduct Jacobian matrix
![j^tj](images/nlp_nlpeq125.gif)
used in solving least-squares problems.
For more information, see the section
"Derivatives".
If the
DIAHES option is not specified,
the CRPJAC statement
lists
![n(n+1)/2](images/nlp_nlpeq66.gif)
variable names, which correspond to the
elements
![(j^t j)_{j,k},j \geq k](images/nlp_nlpeq149.gif)
of the lower triangle of the
symmetric crossproduct Jacobian matrix listed by rows.
For example, the statements
lsq f1-f3;
decvar x1-x3;
crpjac jj1-jj6;
correspond to the crossproduct Jacobian matrix
![j^tj = [ jj1 & jj2 & jj4 \ jj2 & jj3 & jj5 \ jj4 & jj5 & jj6 \ ]](images/nlp_nlpeq150.gif)
If the
DIAHES option is specified, only the
![n](images/nlp_nlpeq2.gif)
diagonal
elements must be listed in the CRPJAC statement.
The
![n](images/nlp_nlpeq2.gif)
rows and
![n](images/nlp_nlpeq2.gif)
columns of the crossproduct Jacobian matrix
must be in the same order as the
![n](images/nlp_nlpeq2.gif)
corresponding
parameter names listed in the
DECVAR statement.
To specify the values of nonzero derivatives, the variables
specified in the
CRPJAC statement have to be defined at the left-hand side of
algebraic expressions in programming statements.
For example, consider the Rosenbrock function:
proc nlp tech=levmar;
lsq f1 f2;
decvar x1 x2;
gradient g1 g2;
crpjac cpj1-cpj3;
f1 = 10 * (x2 - x1 * x1);
f2 = 1 - x1;
g1 = -200 * x1 * (x2 - x1 * x1) - (1 - x1);
g2 = 100 * (x2 - x1 * x1);
cpj1 = 400 * x1 * x1 + 1 ;
cpj2 = -200 * x1;
cpj3 = 100;
run;
Copyright © 2008 by SAS Institute Inc., Cary, NC, USA. All rights reserved.