<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Thanks, but it is a bug that needs to be fixed. If the 1st age is 2
    then you again get a different result!<br>
    <br>
    Laurie<br>
    <br>
    <div class="moz-cite-prefix">On 26/02/16 17:24, Simon Fischer
      (Cefas) wrote:<br>
    </div>
    <blockquote
cite="mid:AM3PR04MB0834B17C713085629887E342A2A70@AM3PR04MB0834.eurprd04.prod.outlook.com"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=windows-1252">
      <meta name="Generator" content="Microsoft Word 15 (filtered
        medium)">
      <style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
        {font-family:"Trebuchet MS";
        panose-1:2 11 6 3 2 2 2 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        color:black;
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New",serif;
        color:black;}
tt
        {mso-style-priority:99;
        font-family:"Courier New",serif;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;
        color:black;
        mso-fareast-language:EN-US;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;
        color:black;}
span.EmailStyle21
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.EmailStyle22
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
      <div class="WordSection1">
        <p class="MsoNormal"><span style="color:#1F497D">Hi Laurie,<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D">Thank you very
            much for your solution, works perfectly!<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D">Regards,<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D">Simon<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
        <div>
          <div style="border:none;border-top:solid #E1E1E1
            1.0pt;padding:3.0pt 0cm 0cm 0cm">
            <p class="MsoNormal"><b><span
                  style="color:windowtext;mso-fareast-language:EN-GB"
                  lang="EN-US">From:</span></b><span
                style="color:windowtext;mso-fareast-language:EN-GB"
                lang="EN-US">
                <a class="moz-txt-link-abbreviated" href="mailto:flr-list-bounces@lists.r-forge.r-project.org">flr-list-bounces@lists.r-forge.r-project.org</a>
                [<a class="moz-txt-link-freetext" href="mailto:flr-list-bounces@lists.r-forge.r-project.org">mailto:flr-list-bounces@lists.r-forge.r-project.org</a>]
                <b>On Behalf Of </b>laurie<br>
                <b>Sent:</b> 26 February 2016 15:32<br>
                <b>To:</b> <a class="moz-txt-link-abbreviated" href="mailto:flr-list@lists.r-forge.r-project.org">flr-list@lists.r-forge.r-project.org</a><br>
                <b>Subject:</b> Re: [FLR-list] fwd(), catch differs from
                targeted catch<o:p></o:p></span></p>
          </div>
        </div>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal" style="margin-bottom:12.0pt"><span
            style="font-size:10.0pt;font-family:"Courier
            New",serif"><br>
          </span>There is a problem with indexing ages, if the ages go
          from 1, then it is OK<br>
          <br>
          <tt><span style="font-size:10.0pt">load("/home/laurie/Desktop/temp/data.RData")</span></tt><span
            style="font-size:10.0pt;font-family:"Courier
            New",serif"><br>
            <tt>ctrl <- fwdControl(data.frame(year = 0, quantity =
              "catch", val = 111111111))</tt><br>
            <tt>stock=stock[-1]</tt><br>
            <tt>res <- fwd(stock, ctrl = ctrl, sr = srr)</tt><br>
            <tt>catch(res)[,"0"]</tt><br>
            <br>
          </span>i.e. any 1st age other than 1 causes a problem. <br>
          <br>
          Laurie<br>
          <br>
          <span style="font-size:12.0pt;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
        <div>
          <p class="MsoNormal">On 26/02/16 13:25, Simon Fischer (Cefas)
            wrote:<o:p></o:p></p>
        </div>
        <blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
          <p class="MsoNormal">Dear all,<o:p></o:p></p>
          <p class="MsoNormal"> <o:p></o:p></p>
          <p class="MsoNormal">I am working on mse simulations with
            hypothetical stocks. The stocks are created from life
            history parameters which are fished at 2Fmsy until an
            equilibrium is reached. This state is then used as starting
            point for the simulations.<o:p></o:p></p>
          <p class="MsoNormal">I use fwd() to project the stock
            (FLStock) and use catch as a target. Somehow, for some
            stocks the catch predicted by fwd() differs considerably
            from the targeted catch (the actual catch is higher than the
            targeted catch).<o:p></o:p></p>
          <p class="MsoNormal"> <o:p></o:p></p>
          <p class="MsoNormal">Did anyone else encounter this behaviour
            or knows how to avoid it?<o:p></o:p></p>
          <p class="MsoNormal"> <o:p></o:p></p>
          <p class="MsoNormal">I use the current versions of R and FLR.
            Attached to this email is a minimum reproducible example
            that shows this behaviour, the stock object and my
            sessionInfo().<o:p></o:p></p>
          <p class="MsoNormal"> <o:p></o:p></p>
          <p class="MsoNormal">Thanks in advance,<o:p></o:p></p>
          <p class="MsoNormal">Simon<o:p></o:p></p>
          <p class="MsoNormal"> <o:p></o:p></p>
          <p class="MsoNormal">Minimal reproducible example:<o:p></o:p></p>
          <p class="MsoNormal"><span style="font-family:"Courier
              New",serif">### load FLR</span><o:p></o:p></p>
          <p class="MsoNormal"><span style="font-family:"Courier
              New",serif">library(FLash)</span><o:p></o:p></p>
          <p class="MsoNormal"><span style="font-family:"Courier
              New",serif">library(FLAssess)</span><o:p></o:p></p>
          <p class="MsoNormal"><span style="font-family:"Courier
              New",serif"> </span><o:p></o:p></p>
          <p class="MsoNormal"><span style="font-family:"Courier
              New",serif">### load data </span>
            <o:p></o:p></p>
          <p class="MsoNormal"><span style="font-family:"Courier
              New",serif">load("data.RData")</span><o:p></o:p></p>
          <p class="MsoNormal"><span style="font-family:"Courier
              New",serif">### contains FLStock "stock" and FLSR
              "srr"</span><o:p></o:p></p>
          <p class="MsoNormal"><span style="font-family:"Courier
              New",serif"> </span><o:p></o:p></p>
          <p class="MsoNormal"><span style="font-family:"Courier
              New",serif">### extend stock for 1 year</span><o:p></o:p></p>
          <p class="MsoNormal"><span style="font-family:"Courier
              New",serif">stock <- stf(object = stock, nyears =
              1) 
            </span><o:p></o:p></p>
          <p class="MsoNormal"><span style="font-family:"Courier
              New",serif"> </span><o:p></o:p></p>
          <p class="MsoNormal"><span style="font-family:"Courier
              New",serif">### create fwdControl object</span><o:p></o:p></p>
          <p class="MsoNormal"><span style="font-family:"Courier
              New",serif">ctrl <- fwdControl(data.frame(year =
              1, quantity = "catch", val = 111697431))</span><o:p></o:p></p>
          <p class="MsoNormal"><span style="font-family:"Courier
              New",serif"> </span><o:p></o:p></p>
          <p class="MsoNormal"><span style="font-family:"Courier
              New",serif">### fwd prediction</span><o:p></o:p></p>
          <p class="MsoNormal"><span style="font-family:"Courier
              New",serif">res <- fwd(stock, ctrl = ctrl, sr =
              srr)</span><o:p></o:p></p>
          <p class="MsoNormal"><span style="font-family:"Courier
              New",serif"> </span><o:p></o:p></p>
          <p class="MsoNormal"><span style="font-family:"Courier
              New",serif">### check predicted catch</span><o:p></o:p></p>
          <p class="MsoNormal"><span style="font-family:"Courier
              New",serif">catch(res)[,ac(1)]</span><o:p></o:p></p>
          <p class="MsoNormal"><span style="font-family:"Courier
              New",serif">### 115308236 and NOT 111697431 as
              specified in the control object?</span><o:p></o:p></p>
          <p class="MsoNormal"> <o:p></o:p></p>
          <p class="MsoNormal"> <o:p></o:p></p>
          <p class="MsoNormal"><span style="font-family:"Courier
              New",serif">#> sessionInfo()</span><o:p></o:p></p>
          <p class="MsoNormal"><span style="font-family:"Courier
              New",serif">#R version 3.2.3 (2015-12-10)</span><o:p></o:p></p>
          <p class="MsoNormal"><span style="font-family:"Courier
              New",serif">#Platform: i386-w64-mingw32/i386 (32-bit)</span><o:p></o:p></p>
          <p class="MsoNormal"><span style="font-family:"Courier
              New",serif">#Running under: Windows 7 x64 (build
              7601) Service Pack 1</span><o:p></o:p></p>
          <p class="MsoNormal"><span style="font-family:"Courier
              New",serif">#</span><o:p></o:p></p>
          <p class="MsoNormal"><span style="font-family:"Courier
              New",serif">#locale:</span><o:p></o:p></p>
          <p class="MsoNormal"><span style="font-family:"Courier
              New",serif">#[1] LC_COLLATE=English_United
              Kingdom.1252
            </span><o:p></o:p></p>
          <p class="MsoNormal"><span style="font-family:"Courier
              New",serif">#[2] LC_CTYPE=English_United
              Kingdom.1252  
            </span><o:p></o:p></p>
          <p class="MsoNormal"><span style="font-family:"Courier
              New",serif">#[3] LC_MONETARY=English_United
              Kingdom.1252</span><o:p></o:p></p>
          <p class="MsoNormal"><span style="font-family:"Courier
              New",serif">#[4]
              LC_NUMERIC=C                          
            </span><o:p></o:p></p>
          <p class="MsoNormal"><span style="font-family:"Courier
              New",serif">#[5] LC_TIME=English_United
              Kingdom.1252   
            </span><o:p></o:p></p>
          <p class="MsoNormal"><span style="font-family:"Courier
              New",serif">#</span><o:p></o:p></p>
          <p class="MsoNormal"><span style="font-family:"Courier
              New",serif">#attached base packages:</span><o:p></o:p></p>
          <p class="MsoNormal"><span style="font-family:"Courier
              New",serif">#[1] stats     graphics  grDevices
              utils     datasets  methods   base    
            </span><o:p></o:p></p>
          <p class="MsoNormal"><span style="font-family:"Courier
              New",serif">#</span><o:p></o:p></p>
          <p class="MsoNormal"><span style="font-family:"Courier
              New",serif">#other attached packages:</span><o:p></o:p></p>
          <p class="MsoNormal"><span style="font-family:"Courier
              New",serif">#[1] FLAssess_2.5.20130716
              FLash_2.5.2           FLCore_2.5.20160107 
            </span><o:p></o:p></p>
          <p class="MsoNormal"><span style="font-family:"Courier
              New",serif">#[4] Matrix_1.2-3         
              MASS_7.3-45           lattice_0.20-33     
            </span><o:p></o:p></p>
          <p class="MsoNormal"><span style="font-family:"Courier
              New",serif">#</span><o:p></o:p></p>
          <p class="MsoNormal"><span style="font-family:"Courier
              New",serif">#loaded via a namespace (and not
              attached):</span><o:p></o:p></p>
          <p class="MsoNormal"><span style="font-family:"Courier
              New",serif">#[1] grid_3.2.3   stats4_3.2.3</span><o:p></o:p></p>
          <p class="MsoNormal"> <o:p></o:p></p>
          <p class="MsoNormal"> <o:p></o:p></p>
          <p class="MsoNormal" style="margin-bottom:12.0pt"><span
              style="font-size:12.0pt;font-family:"Times New
              Roman",serif;mso-fareast-language:EN-GB"><br>
              <br>
              <br>
            </span><span
style="font-size:8.0pt;font-family:"Arial",sans-serif;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
          <div style="border:none;border-top:solid black
            1.0pt;padding:0cm 0cm 0cm 0cm">
            <p class="MsoNormal"><span
                style="font-size:9.0pt;font-family:"Trebuchet
                MS",sans-serif;mso-fareast-language:EN-GB">This
                email and any attachments are intended for the named
                recipient only. Its unauthorised use, distribution,
                disclosure, storage or copying is not permitted. If you
                have received it in error, please destroy all copies and
                notify the sender. In messages of a non-business nature,
                the views and opinions expressed are the author's own
                and do not necessarily reflect those of Cefas.
                Communications on Cefas’ computer systems may be
                monitored and/or recorded to secure the effective
                operation of the system and for other lawful purposes.<o:p></o:p></span></p>
          </div>
          <p class="MsoNormal"><span
style="font-size:8.0pt;font-family:"Arial",sans-serif;mso-fareast-language:EN-GB"><br>
              <br>
            </span><span style="font-size:12.0pt;font-family:"Times
              New Roman",serif;mso-fareast-language:EN-GB"><br>
              <br>
              <br>
              <o:p></o:p></span></p>
          <pre>_______________________________________________<o:p></o:p></pre>
          <pre>flr-list mailing list<o:p></o:p></pre>
          <pre><a moz-do-not-send="true" href="mailto:flr-list@flr-project.org">flr-list@flr-project.org</a><o:p></o:p></pre>
          <pre><a moz-do-not-send="true" href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/flr-list">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/flr-list</a><o:p></o:p></pre>
        </blockquote>
        <p class="MsoNormal"><span
            style="font-size:12.0pt;font-family:"Times New
            Roman",serif;mso-fareast-language:EN-GB"><o:p> </o:p></span></p>
      </div>
      <br>
      <br>
      <span style="font-family:Arial; Font-size:8.0pt">
        <br>
        <br>
        <div style="border-top: 1px solid #000000; width: 90%; font: 9pt
          'Trebuchet MS', Arial, Helvetica, sans-serif;">This email and
          any attachments are intended for the named recipient only. Its
          unauthorised use, distribution, disclosure, storage or copying
          is not permitted. If you have received it in error, please
          destroy all copies and notify the sender. In messages of a
          non-business nature, the views and opinions expressed are the
          author's own and do not necessarily reflect those of Cefas.
          Communications on Cefas’ computer systems may be monitored
          and/or recorded to secure the effective operation of the
          system and for other lawful purposes.</div>
        <br>
        <br>
      </span> <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
flr-list mailing list
<a class="moz-txt-link-abbreviated" href="mailto:flr-list@flr-project.org">flr-list@flr-project.org</a>
<a class="moz-txt-link-freetext" href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/flr-list">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/flr-list</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>