[FLR-list] deterministic STF with FLasher - recruitment

Iago.MOSQUEIRA at ec.europa.eu Iago.MOSQUEIRA at ec.europa.eu
Thu Oct 19 10:44:12 CEST 2017


Hi,

I have fixed a problem in a coercion method that was causing this. To test it you would need to reinstall FLCore from github. This script shows how it works

# INSTALL FLCore from github
devtools::install_github("flr/FLCore")

library(FLasher)

# FLCore must be 2.6.5.9907 from github
packageVersion('FLCore')

data(ple4)

# Fixed recs as sr$params
srpar <- FLPar(c(949341, 844401), dimnames=list(params="a", year=c(2007,2008), iter=1))

ctl <- fwdControl(year=2007:2008, quant='f', value=0.35)

# fwd with srpar
x <- fwd(ple4, control=ctl, sr=list(model="geomean", params=srpar))

# CHECK rec
rec(x)[,ac(2007:2008)]

# CHECK target achieved
fbar(x)[,ac(2007:2008)]


I hope this fixes it, but do let us know how it goes.

These changes will be part of the next release of FLCore.


Cheers,


Iago

--
Dr Iago Mosqueira

European Commission
DG Joint Research Centre
Directorate D - Sustainable Resources
Unit D.02 Water and Marine Resources

TP 051, Via Enrico Fermi 2749
I-21027 Ispra (VA), Italy

Phone : +39 0332 785413

iago.mosqueira at ec.europa.eu
________________________________
From: flr-list-bounces at lists.r-forge.r-project.org [flr-list-bounces at lists.r-forge.r-project.org] on behalf of Clara Ulrich [clu at aqua.dtu.dk]
Sent: 17 October 2017 15:33
To: flr-list at flr-project.org
Subject: [FLR-list] deterministic STF with FLasher - recruitment

Hi,

We are in the process of moving MIXFISH work into 64 bits, and a part of that involve running standard ICES deterministic STF – now with FLasher instead of FLash. No big pbs there, except for the specification of recruitment in the case, quite standard, where there is an estimate of recruitment for the incoming year class (e.g. from a survey), while for the other years a geometric mean is used, i.e. two different values of recruitment for the next 2 years. We used to do something like this (here for this year’s NS Cod forecast)

srPar<-FLPar(c(“692194”, “198216”),dimnames=list(params="a",year=c(2017,2018),iter=1))
  x <- fwd(x,control=ctrl.,sr=list(model="mean",params=srPar))

This does not run in Flasher and I have been trying a few alternatives with FLSR, but without full success so far… How would you write this?


Thanks
Clara

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/flr-list/attachments/20171019/b5857426/attachment.html>


More information about the flr-list mailing list