<div dir="ltr"><br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I want to follow up on this subject to summarize further discussions.<br>
The problem I was having was NOT the choice of the increment to avoid<br>
log(0). Possibly Dave ran into this because I forgot to include the<br>
.pin file when I sent him the files. The problem was due to having<br>
-gbs too small.  I'm guessing that if -gbs is too small the code can't<br>
properly compute the analytic derivatives and the code fails to make<br>
any progress, Once I increased -gbs the code worked properly and<br>
converged.  That said, what Dave stated here isn't exactly what he<br>
did.  You have to be careful with the size of the epsilon you add to<br>
avoid log(0). I followed literally what he said here and he and I came<br>
up with substantially different log-likelihood values (-74 units).<br>
You need to use a value that is very small relative to the actual<br>
quantity. In my case they are probabilities that can be very small<br>
because it is a 27 year capture history.<br>
<br>
As it turns out, Dave started with 1e-8 and then switched to 1e-12 in<br>
the second phase.  He implemented that by creating a dummy parameter<br>
(kkludge) that simply forced a second phase but which had value 0 and<br>
didn't affect  the resulting value. Without showing entire tpl file,<br>
this shows the changes he made which added kkludge (set to 0 in pin)<br>
and shows how eps was changed at second phase.<br>
<br>
  init_number kkludge(2)<br>
... (calls function to compute f)<br>
...<br>
     f+=100.*square(kkludge);<br>
...<br>
... (in function to compute f)<br>
    double myeps=1.e-12;<br>
    if (current_phase()==1)<br>
      myeps=1.e-8;<br>
    f-= log(pch+myeps);                                // sum<br>
log-likelihood log(pr(ch))<br>
<br>
<br>
Note that currently -gbs is limited to about 2gb on windows machines<br>
even for the 64 bit version.  This is something that Johnoel is<br>
working on presently.<br>
<br>
regards --jeff<br>
<div class="HOEnZb"><div class="h5"><br></div></div></blockquote></div></div></div>