[Gretl-devel] bfgs: failed to match initial value

Klein, Christoph christoph.klein at student.kit.edu
Thu Jul 2 16:03:24 EDT 2009


Hi,

I had a problem with a mle estimation today. My script canceled execution with the following error message:

Using numerical derivatives
Iteration 1: Log-likelihood = 7274,73993927
Parameters:       3,4478    -0,17644      6,7838
Gradients:    2,6526e+06  2,6526e+06 -2,6526e+06

failed to match initial value of objective function, 7274,74

--- FINAL VALUES:
Log-likelihood = 7274,73993926 (steplength = 1,04858e-14)
Parameters:       3,4478    -0,17644      6,7838
Gradients:    2,6526e+06  2,6526e+06 -2,6526e+06


Tolerance = 1,81899e-12
The convergence criterion was not met

seems like the starting set was already quite optimal. Though gretl steps to the new point, because the criteria for advancing in line 544 in gretl_bfgs.c is (f >= fmax + d). d is set as d = sumgrad * steplen * acctol and in my case seems to be negative. The criteria for printing the error message (line 645) is: (fmax < f0). The attached patch (one-liner) changes this to ((fmax + d) <= f0). Is this change ok?

Christoph
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gretl_bfgs.c
Type: text/x-csrc
Size: 277 bytes
Desc: gretl_bfgs.c
Url : http://lists.wfu.edu/pipermail/gretl-devel/attachments/20090702/f0a30873/gretl_bfgs.bin


More information about the Gretl-devel mailing list