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:

lmderLevenberg–Marquandt algorithm with analytical derivatives
chkderCheck the supplied analytical derivatives
lmdifLevenberg–Marquandt algorithm with numerical derivatives
fdjac2Compute final approximate Jacobian when using numerical derivatives
dpmparDetermine 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.