05-06-2014 09:32 AM
The NLPFDD function in SAS/IML software computes the finite difference approximation of first and second derivatives for vector-values function (or scalar-valued, as you have here).
Here's an example: Optimizing? Two hints for specifying derivatives - The DO Loop
Also, if you have a time series with evenly spaced time points, you can use the DIF function in SAS/IML software or in the DATA step. See
05-06-2014 10:38 AM