<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi Ernesto,<br>
<br>
Thanks for your useful response.<br>
There was never any intention on replicating the XSA but given the
huge disparity<br>
in both the XSA and a4a outputs I was wondering why it was so.<br>
<br>
A statistical model sounds more sound than XSA but the problem with
a4a is that there is no much documentation to see upon (or maybe
it's me who can't find it)<br>
<br>
Your suggestion on including a year trend in the catchability of the
trawl cpue for example sounds good. The problem is how to implement
it.<br>
<br>
Thanks again,<br>
Luis<br>
<br>
<div class="moz-cite-prefix">On 02/24/2015 09:01 AM, Ernesto wrote:<br>
</div>
<blockquote cite="mid:54EC3DF5.3090405@jrc.ec.europa.eu" type="cite">
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
<div class="moz-cite-prefix">Hi,<br>
<br>
Sorry for the late reply.<br>
<br>
The problem is that your catch data has a large number of ages
that don't have tunning data. The default model for a4a was not
written for those cases. Check <br>
<br>
a4afit <- sca(gul0001, gul.indices)<br>
wireframe(data~year+age, data=harvest(a4afit))<br>
<br>
F in the last ages gets loose and the fit is quite poor.<br>
<br>
Once that you want to compare with XSA we can take the same kind
of approach, which is to force the oldest ages Fs the same. In
this case the model will fit one coefficient (times the year
coefficients) for ages older than 18, which mean they are fit
together, which I think is slightly different from XSA. Note
that you have a large +group in some years. <br>
<br>
This can be done using the "replace" method.<br>
<br>
fmod <- ~te(replace(age, age>18, 18), year, k = c(6, 10),
bs = "tp")<br>
a4afit <- sca(gul0001, gul.indices, fmodel=fmod)<br>
<br>
For comparison<br>
xsafit <- FLXSA(gul0001, gul.indices, FLXSA.control())<br>
<br>
wireframe(data~year+age|qname,
data=as.data.frame(FLQuants(a4a=harvest(a4afit),
xsa=xsafit@harvest)))<br>
<br>
Now, the one million dollars question is why you want to
replicate XSA ;)<br>
<br>
Best<br>
<br>
EJ<br>
<br>
ps: Take a look at the residuals and you'll see that both fits
have some odd residuals. In a4a you have a couple of simple
options to improve this fit, like including a year trend in the
catchability of the trawl cpue, etc.<br>
<br>
bubbles(age~year|qname, <a moz-do-not-send="true"
class="moz-txt-link-abbreviated"
href="mailto:data=xsafit@index.res">data=xsafit@index.res</a>)<br>
plot(residuals(a4afit, gul0001, gul.indices))<br>
<br>
On 02/18/2015 02:35 PM, Havstovan FAMRI wrote:<br>
</div>
<blockquote
cite="mid:CAL09-Efooxo=vqZejD5+7k27ONP6so+=AAxd4Z9MnqoiXPFwXg@mail.gmail.com"
type="cite">
<div dir="ltr">
<div>
<div class="gmail_signature">
<div>
<div>Hi,</div>
<div><br>
</div>
<div>Well that solved the problem (trimming the indices
object trim(gul.indices[[2]], age 4:12). No errors
come up but stock numbers and F's are really spurious</div>
<div>and nothing in the range of the XSA run. F are
given below as a example:</div>
<div><br>
</div>
<div>> gulfit@harvest[,ac(2010:2014)] # a4a output</div>
<div>An object of class "FLQuant"</div>
<div>, , unit = unique, season = all, area = unique</div>
<div><br>
</div>
<div> year</div>
<div>age 2010 2011 2012 2013
2014 </div>
<div> 4 0.00061883 0.00054841 0.00088312 0.00104010
0.00070947</div>
<div> 5 0.00194001 0.00170594 0.00221326 0.00254813
0.00223464</div>
<div> 6 0.00515556 0.00454088 0.00496769 0.00561751
0.00602334</div>
<div> 7 0.01007180 0.00901793 0.00900872 0.01006750
0.01202780</div>
<div> 8 0.01384780 0.01273870 0.01257350 0.01389800
0.01666770</div>
<div> 9 0.01448220 0.01365150 0.01385510 0.01499370
0.01669910</div>
<div> 10 0.01336920 0.01269240 0.01303890 0.01351880
0.01358130</div>
<div> 11 0.01248430 0.01165750 0.01145380 0.01107690
0.01019620</div>
<div> 12 0.01247860 0.01127330 0.00997400 0.00880635
0.00769486</div>
<div> 13 0.01285800 0.01125750 0.00874288 0.00700203
0.00595635</div>
<div> 14 0.01248820 0.01082000 0.00757566 0.00557152
0.00460538</div>
<div> 15 0.01064480 0.00939845 0.00633618 0.00439713
0.00344647</div>
<div> 16 0.00797521 0.00732193 0.00509501 0.00344610
0.00249670</div>
<div> 17 0.00569563 0.00541743 0.00403299 0.00273092
0.00182383</div>
<div> 18 0.00435670 0.00416232 0.00326465 0.00224600
0.00142545</div>
<div> 19 0.00388555 0.00355594 0.00278197 0.00194974
0.00124088</div>
<div> 20 0.00406418 0.00340829 0.00250123 0.00177887
0.00119688</div>
<div> 21 0.00465988 0.00349410 0.00231912 0.00166745
0.00122197</div>
<div><br>
</div>
<div>units: f</div>
<div>> gul_F[,ac(2010:2014)] # XSA output</div>
<div> 2010 2011 2012 2013 2014</div>
<div>4 0.0047 0.0115 0.0015 0.0066 0.0053</div>
<div>5 0.0143 0.0311 0.0100 0.0154 0.0296</div>
<div>6 0.0675 0.0787 0.0485 0.0655 0.0872</div>
<div>7 0.1257 0.1506 0.0947 0.1182 0.1404</div>
<div>8 0.1696 0.2211 0.1632 0.1897 0.2082</div>
<div>9 0.2107 0.2428 0.1669 0.2651 0.2607</div>
<div>10 0.2624 0.3209 0.2170 0.2783 0.2700</div>
<div>11 0.2686 0.3086 0.2396 0.3374 0.2840</div>
<div>12 0.3309 0.4213 0.2750 0.3371 0.2146</div>
<div>13 0.4980 0.6288 0.4110 0.4805 0.2861</div>
<div>14 0.4428 0.5557 0.4666 0.5562 0.3298</div>
<div>15 0.4462 0.5266 0.4679 0.6606 0.4605</div>
<div>16 0.3444 0.4555 0.4277 0.5946 0.4433</div>
<div>17 0.2812 0.3540 0.3561 0.5347 0.3910</div>
<div>18 0.2529 0.3157 0.3512 0.4841 0.3601</div>
<div>19 0.4566 0.2772 0.1803 0.2773 0.3215</div>
<div>20 0.2534 0.3124 0.2804 0.4170 0.4099</div>
<div>21 0.2534 0.3124 0.2804 0.4170 0.4099</div>
<div><br>
</div>
<div>best,</div>
<div>Luis</div>
</div>
<div><br>
</div>
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
flr-list mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:flr-list@flr-project.org">flr-list@flr-project.org</a>
<a moz-do-not-send="true" 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>
<br>
<pre class="moz-signature" cols="72">--
Ernesto Jardim<a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="mailto:ernesto.jardim@jrc.ec.europa.eu"><ernesto.jardim@jrc.ec.europa.eu></a>
Fisheries Scientist
FISHREG – Scientific Support to Fisheries
IPSC Maritime Affairs Unit
EC Joint Research Center
TP 051, Via Enrico Fermi 2749
I-21027 Ispra (VA), Italy
Office : +39 0332 785311
Fax: +39 0332 789658
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="https://fishreg.jrc.ec.europa.eu/">https://fishreg.jrc.ec.europa.eu/</a>
</pre>
<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>