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

# Details on the code

The underlying engine for NLS estimation is based on the `minpack` suite of functions, available from netlib.org. Specifically, the following `minpack` functions are called:

`lmder` | Levenberg–Marquandt algorithm with analytical derivatives
`chkder` | Check the supplied analytical derivatives
`lmdif` | Levenberg–Marquandt algorithm with numerical derivatives
`fdjac2` | Compute final approximate Jacobian when using numerical derivatives
`dpmpar` | Determine the machine precision

On successful completion of the Levenberg–Marquandt iteration, a Gauss–Newton regression is used to calculate the covariance matrix for the parameter estimates. Since NLS results are asymptotic, there is room for debate over whether or not a correction for degrees of freedom should be applied when calculating the standard error of the regression (and the standard errors of the parameter estimates). For comparability with OLS, and in light of the reasoning given in Davidson and MacKinnon (1993), the estimates shown in `gretl` do use a degrees of freedom correction.

Prev | Home | Next
Controlling termination | Up | Numerical accuracy