[ADMB Users] spline smoother on selectivity (even shorter version)

Luis Ridao luridao at gmail.com
Tue Mar 1 04:57:46 PST 2011


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.admb-project.org/pipermail/users/attachments/20110301/bce84a92/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sai09_spline.tpl
Type: application/octet-stream
Size: 8965 bytes
Desc: not available
URL: <http://lists.admb-project.org/pipermail/users/attachments/20110301/bce84a92/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sai09_spline.dat
Type: application/x-ns-proxy-autoconfig
Size: 20294 bytes
Desc: not available
URL: <http://lists.admb-project.org/pipermail/users/attachments/20110301/bce84a92/attachment.dat>


More information about the Users mailing list