[ADMB Users] spline smoother on selectivity (even shorter version)
Mark Maunder
mmaunder at iattc.org
Wed Mar 2 17:23:58 PST 2011
It would be good if once this spline selectivity is sorted out if someone could write a function that takes the appropriate arguments and returns the appropriate values so that others can use the spline based selectivity in their assessment models.
Mark
Mark Maunder
Head of the Stock Assessment Program
Inter-American Tropical Tuna Commission
President
ADMB Foundation
8604 La Jolla Shores Drive
La Jolla, CA, 92037-1508, USA
Tel: (858) 546-7027
Fax: (858) 546-7133
mmaunder at iattc.org<mailto:mmaunder at iattc.org>
http://www.fisheriesstockassessment.com/TikiWiki/tiki-index.php?page=Mark+Maunder
Visit the AD Model Builder project at
http://admb-project.org/
See the following website for information on fisheries stock assessment
http://www.fisheriesstockassessment.com/
From: users-bounces at admb-project.org [mailto:users-bounces at admb-project.org] On Behalf Of Mark Maunder
Sent: Wednesday, March 02, 2011 5:10 PM
To: 'Ian Taylor'
Cc: users at admb-project.org
Subject: Re: [ADMB Users] spline smoother on selectivity (even shorter version)
Or that you are adding a penalty to f but not making f=0 at the start of the procedure section. Where f is the objective function value
Mark Maunder
Head of the Stock Assessment Program
Inter-American Tropical Tuna Commission
President
ADMB Foundation
8604 La Jolla Shores Drive
La Jolla, CA, 92037-1508, USA
Tel: (858) 546-7027
Fax: (858) 546-7133
mmaunder at iattc.org<mailto:mmaunder at iattc.org>
http://www.fisheriesstockassessment.com/TikiWiki/tiki-index.php?page=Mark+Maunder
Visit the AD Model Builder project at
http://admb-project.org/
See the following website for information on fisheries stock assessment
http://www.fisheriesstockassessment.com/
From: users-bounces at admb-project.org [mailto:users-bounces at admb-project.org] On Behalf Of Ian Taylor
Sent: Wednesday, March 02, 2011 4:51 PM
Cc: users at admb-project.org
Subject: Re: [ADMB Users] spline smoother on selectivity (even shorter version)
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 http://admb-project.org/documentation/faq#splines.
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.
-Ian
On 3/2/2011 9:38 AM, Richard Methot wrote:
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
Poos, Jan Jaap wrote:
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: users-bounces at admb-project.org<mailto:users-bounces at admb-project.org> [mailto:users-bounces at admb-project.org] On Behalf Of Steve Martell
Sent: Wednesday, March 02, 2011 4:52 PM
To: Luis Ridao
Cc: users at admb-project.org<mailto:users at admb-project.org>
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:
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
Users at admb-project.org<mailto:Users at admb-project.org>
http://lists.admb-project.org/mailman/listinfo/users
_______________________________________________
Users mailing list
Users at admb-project.org<mailto:Users at admb-project.org>
http://lists.admb-project.org/mailman/listinfo/users
_______________________________________________
Users mailing list
Users at admb-project.org<mailto:Users at admb-project.org>
http://lists.admb-project.org/mailman/listinfo/users
_______________________________________________
Users mailing list
Users at admb-project.org<mailto:Users at admb-project.org>
http://lists.admb-project.org/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.admb-project.org/pipermail/users/attachments/20110303/2beb44ab/attachment.html>
More information about the Users
mailing list