<div class="gmail_quote"><div class="gmail_quote">ADMB-help,<br><br>Following Dave's suggestion on implementing a spline smoother<br>on selectivity (in a separable catch-at-age model) I managed to <br>do something like:<br>
<br>PARAMETER_SECTION<br>
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)<br> sdreport_vector predSel1(1,nages) <br>
<br>for (i=1;i<=nyrs;i++)<br> { <br> if (i<=36)<br> { <br> vcubic_spline_function qs(nodes,log_sel1); // SPLINES<br> predSel1=qs(ages);<br> }<br> else<br> ................................. <br>for(i=1;i<=nyrs;i++)<br>
{<br> if (i<=36)<br> {<br> F(i)=mfexp(log_fy(i))*mfexp(predSel1); <br> }<br> else<br> .................................<br>The program compiles and runs without problems but when the number of "nodes"<br>
are changed to another amount (e.g. 6) ADMB complains about Hessian:<br>
<br>"Warning -- Hessian does not appear to be positive definite<br>
Hessian does not appear to be positive definite"<br><br>The model template and data files are attached<br><br>Thanks in advance<br><br>
</div><br>
</div><br>