Gretl Manual: Gnu Regression, Econometrics and Time-series Library
Prev | Chapter 9. Nonlinear least squares | Next

# Analytical and numerical derivatives

If you are able to figure out the derivatives of the regression function with respect to the parameters, it is advisable to supply those derivatives as shown in the examples above. If that is not possible, `gretl` will compute approximate numerical derivatives. The properties of the NLS algorithm may not be so good in this case (see the Section called Numerical accuracy).

If analytical derivatives are supplied, they are checked for consistency with the given nonlinear function. If the derivatives are clearly incorrect estimation is aborted with an error message. If the derivatives are "suspicious" a warning message is issued but estimation proceeds. This warning may sometimes be triggered by incorrect derivatives, but it may also be triggered by a high degree of collinearity among the derivatives.

Note that you cannot mix analytical and numerical derivatives: you should supply expressions for all of the derivatives or none.

Prev | Home | Next
NLS dialog window | Up | Controlling termination