<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    One more comment on this spline issue: from the example Luis Ridao
    sent, it looks like the function vcubic_spline_function needs 2
    additional inputs for the boundary conditions. This isn't documented
    well, but links to examples can be found at <a
      href="http://admb-project.org/documentation/faq#splines">http://admb-project.org/documentation/faq#splines</a>.<br>
    <br>
    On the general issue of interpreting Hessian problems, this case
    seems to have characteristics that point to a coding error. Namely,
    the maximum gradient component increases steadily throughout the
    optimization, ending at 9.0169e+012. This suggests that some
    parameter not being properly included in the model.<br>
    -Ian<br>
    <br>
    On 3/2/2011 9:38 AM, Richard Methot wrote:
    <blockquote cite="mid:4D6E80AB.2090909@noaa.gov" type="cite">
      <meta content="text/html; charset=ISO-8859-1"
        http-equiv="Content-Type">
      I do not see any selectivity curvature penalty in the objective
      function, so depending on how informative your data are, the
      estimation
      may drift into nonsensical parameter space, which could then cause
      the
      Hessian problem.  The problem is probably exacerbated by the use
      of
      unbounded parameters:    init_vector log_sel1(1,nNodes)        //
      SPLINES<br>
      <br>
      <br>
      Poos, Jan Jaap wrote:
      <blockquote
cite="mid:605CF62A79C32E4AA0CC741FD84D4E7425E71709E3@scomp0536.wurnet.nl"
        type="cite">
        <pre wrap="">Hi Steve Martell,

Although indeed the problem may be in the code, this part should work. There is no if else statement here. The second if statement is nested within the first else statement. This part is only evaluated if i >36.  

Kind regards, Jan Jaap
 

-----Original Message-----
From: <a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:users-bounces@admb-project.org">users-bounces@admb-project.org</a> [<a moz-do-not-send="true" class="moz-txt-link-freetext" href="mailto:users-bounces@admb-project.org">mailto:users-bounces@admb-project.org</a>] On Behalf Of Steve Martell
Sent: Wednesday, March 02, 2011 4:52 PM
To: Luis Ridao
Cc: <a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:users@admb-project.org">users@admb-project.org</a>
Subject: Re: [ADMB Users] spline smoother on selectivity (even shorter version)

I suspect this part of the code is causing some of the problems.

for(i=1;i<=nyrs;i++)
  {
  if (i<=36)
  {
  F(i)=mfexp(log_fy(i))*mfexp(predSel1);
  }
  else
  {
  if (i<=44)
  F(i)=mfexp(log_fy(i))*mfexp(predSel2);
  else
  {
  F(i)=mfexp(log_fy(i))*mfexp(predSel3);
  }
  }
  }

If i is less than or equal to 36, then both conditions are true in your if else statements so preSel1 is never actually used.
On 2011-03-01, at 4:57 AM, Luis Ridao wrote:

  </pre>
        <blockquote type="cite">
          <pre wrap="">ADMB-help,

Following Dave's suggestion on implementing a spline smoother on 
selectivity (in a separable catch-at-age model) I managed to do 
something like:

PARAMETER_SECTION
  init_vector log_sel1(1,nNodes)        // nNodes = 5 -> (1,2,3,4,5)     nages = 12 -> (1,2,3,4,5,6,7,8,9,10,11,12)
  sdreport_vector predSel1(1,nages)
  
for (i=1;i<=nyrs;i++)
  { 
  if (i<=36)
  { 
    vcubic_spline_function qs(nodes,log_sel1);   // SPLINES
    predSel1=qs(ages);
     }
  else
 .................................    
for(i=1;i<=nyrs;i++)
  {
  if (i<=36)
  {
  F(i)=mfexp(log_fy(i))*mfexp(predSel1);  
  }
  else
  .................................
The program compiles and runs without problems but when the number of "nodes"
are changed to another amount (e.g. 6) ADMB complains about Hessian:

"Warning -- Hessian does not appear to be positive definite Hessian 
does not appear to be positive definite"

The model template and data files  are attached

Thanks in advance



<sai09_spline.tpl><sai09_spline.dat>__________________________________
_____________
Users mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:Users@admb-project.org">Users@admb-project.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://lists.admb-project.org/mailman/listinfo/users">http://lists.admb-project.org/mailman/listinfo/users</a>
    </pre>
        </blockquote>
        <pre wrap=""><!---->
_______________________________________________
Users mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:Users@admb-project.org">Users@admb-project.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://lists.admb-project.org/mailman/listinfo/users">http://lists.admb-project.org/mailman/listinfo/users</a>


_______________________________________________
Users mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:Users@admb-project.org">Users@admb-project.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://lists.admb-project.org/mailman/listinfo/users">http://lists.admb-project.org/mailman/listinfo/users</a>
  </pre>
      </blockquote>
      <pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@admb-project.org">Users@admb-project.org</a>
<a class="moz-txt-link-freetext" href="http://lists.admb-project.org/mailman/listinfo/users">http://lists.admb-project.org/mailman/listinfo/users</a>
</pre>
    </blockquote>
  </body>
</html>