<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Luis,<div>There are many different ways to do this without having to create separate reduced data sets. </div><div><br></div><div>One approach would be to include the number of retrospective years at the top of the data file, and read this along with all the other data. Then at the very botttom of the data section (after all of the data has been read in), modify your model dimensions by the number of retrospective years. For example:</div><div><br></div><div>DATA_SECTION</div><div><br></div><div> int_int retyrs;<span class="Apple-tab-span" style="white-space:pre"> </span>//number of retrospective years </div><div> int_int nyrs;<span class="Apple-tab-span" style="white-space:pre"> </span>//total number of years</div><div><br></div><div> //... read the rest of the data.</div><div><br></div><div> //... now modify the model dimensions at the end of the data section.</div><div> !! nyrs = nyrs - retyrs;</div><div><br></div><div>Note that you'll have to make sure your calculations in the PROCEDURE_SECTION etc. that are based on the data have the correct dimensions if retyrs > 0. For example, you'll have to be explicit in calculating residuals:</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>dvar_vector pred_ct(1,nyrs);</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>resid = log(elem_div(obs_ct,pred_ct));</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>//should be:</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>resid = log(elem_div(obs_ct(1,nyrs),pred_ct(1,nyrs)));</div><div><br></div><div>Steve</div><div><br></div><div><br><div><div>On 2010-11-01, at 9:45 AM, Luis Ridao wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">ADMB-help,<br><br>I was wondering how to implement a retrospective analysis of a given catch-at-age model.<br>The straightforward but also the slowest approach might be to shorten the data file and adjust<br>the parameter section accordingly but I guess there must be a way to get around this<br>
(maybe some shell scripting?)<br><br>Is there anyone out there who has faced a similar issue?<br><br>Thanks in advance,<br>Luis<br><br>
_______________________________________________<br>Users mailing list<br><a href="mailto:Users@admb-project.org">Users@admb-project.org</a><br>http://lists.admb-project.org/mailman/listinfo/users<br></blockquote></div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div>Steve Martell</div><div><a href="mailto:s.martell@fisheries.ubc.ca">s.martell@fisheries.ubc.ca</a></div><div><br></div></span><br class="Apple-interchange-newline">
</div>
<br></div></body></html>