Jump to Operating Model Conditioning
Jump to Length Based Indicators
The Observation Error Model is a key component in Management Strategy Evaluation (MSE). Its role is to generating data for use in simulation when testing and validating various management strategies. The Observation Error Model is a vital component of MSE, and simulates the types of data that can realistically be collected, and used either in a stock assessment or in an empirical harvest control rule.
The roles of the Observation Error Model are to
Simulate Realistic Data: Generates pseudo-data that mimic real-world fisheries data, such as catch numbers, relative abundance indices, and length frequency data.
Incorporate Uncertainty: Accounts for uncertainties in data collection, including sampling errors and biases
Evaluate Robustness: Uses simulated data to evaluate the performance of different indicators and management strategies under scenarios that represent plausible alternative hypotheses about the resource and its fisheries.
Compare Data Collection Schemes Allows the benefits of alternative monitoring and data collection schemes to be evaluated. For example, to evaluate the skill of different data sets to monitor the state of the stock, using an index of abundance or length data.
Validate of Stock Assessment Methods: Uses the simulated data in a stock assessment allowing the estimates to be compared with the ‘true’ values from the Operating Model.
The packages required are
library(FLCore)
library(FLBRP)
library(FLasher)
library(FLife)
library(ggplotFL)
library(FLCandy)
library(rfishbase)
library(SPMpriors)
library(FishLife)
library(plyr)
library(dplyr)
library(reshape)
library(ggplot2)
theme_set(theme_bw())
library(ggpubr)
library(ggcorrplot)
library(GGally)
Choose parameters, and create an FLBRP
object
par=lhPar(FLPar(linf=30))
eq=lhEql(par)
Based on the equilibrium FLBRP
object create an
FLStock
object to simulate time series.
om=as(eq,"FLStock")
ftarget=m(om)[4,-1]
om=window(fwd(om,f=ftarget,sr=eq),start=19)
[1] "maxfbar has been changed to accomodate new plusgroup"
dimnames(om)$year =an(dimnames(om)$year)+1980
range(om)["plusgroup"]=range(om)["maxage"]
Project using fwd
om=fwd(om,fbar=window(fbar(om),start=2021)%*%FLQuant(seq(1,10,length.out=61)),sr=eq)
om=window(om,start=2010,end=2080)
Add uncertainty in recruitment
nits =101
ftarget=rlnorm(nits,log(fbar(om)),0.1)[,-1]
recDevs=rlnorm(nits,rec(om)%=%0,0.3)
om =propagate(om,nits)
om=fwd(om,fbar=ftarget,sr=eq,residuals=recDevs)
plot(om, iter=5)
Figure 1 Time series.
Creat an index of abundance
om =window(om,start=2010,2030)
index=rlnorm(nits,log(vb(om)),0.2)
plot(index,iter=12)
lbi=FLQuants(indicators.len(om,
indicators='lmean',
params=FLPar(apply(par,1,median)),
metric='catch.n'))
plot(lbi,iter=17)
HR=catch(om)%/%index
plot(HR,iter=17)
ak =invALK(iter(par,1),cv=0.1,age=an(dimnames(om)$age),bin=1)
lfd=lenSamples(catch.n(om),ak,n=5000)
units(lfd)="cm"
plotLengths(group(lfd, sum, year=year-year%%10))
dat =model.frame(FLQuants("Biomass"=vb(om),
"F" =fbar(om),
"Index" =index,
"HR" =HR,
"LBI" =lbi[[1]]))
dat=subset(dat,year%in%2021:2030)
ggplot(aes(Biomass,Index),data=dat)+
geom_point()+
geom_smooth(col="blue",method=lm,se=FALSE)+
geom_vline(aes(xintercept=mean(dat$Biomass)),col="red",linetype=2)+
geom_hline(aes(yintercept=mean(dat$Index)), col="red",linetype=2)+
theme_bw(16)
OM =fbar(om)>mean(fbar(om))
OEM=HR>mean(HR)
dat=model.frame(FLQuants(OM=FLQuant(OM),OEM=FLQuant(OEM)))
with(dat,table(OM,OEM))
OEM
OM 0 1
0 1168 208
1 106 639
R version 4.2.1 (2022-06-23)
knitr: 1.43
FLCore: 2.6.19.9105
FLBRP: 2.5.9.9022
FLasher: 0.7.1.9221
FLife: 3.4.0
ggplotFL: 2.7.0.9132
FLCandy: 0.1.0
rfishbase: 3.1.9.99
SPMpriors: 1.0.4
FishLife: 3.0.0
plyr: 1.8.9
dplyr: 1.1.4
reshape: 0.8.9
ggplot2: 3.4.4
ggpubr: 0.6.0
ggcorrplot: 0.1.3
GGally: 2.1.2
Compiled: Sun Jan 21 12:36:51 2024