bioidx.sim: generates FLIndexBiomass with random observation error from...

View source: R/OMsim.R

bioidx.simR Documentation

generates FLIndexBiomass with random observation error from an FLStock

Description

generates FLIndexBiomass with random observation error from an FLStock

Usage

bioidx.sim(object, sel = catch.sel(object), sigma = 0.2, q = 0.001)

Arguments

object

FLStock

sel

FLQuant with selectivity.pattern

sigma

observation error for log(index)

q

catchability coefficient for scaling

Value

FLIndexBiomass

Examples

data(ple4)
sel = newselex(catch.sel(ple4),FLPar(S50=1.5,S95=2.1,Smax=4.5,Dcv=1,Dmin=0.1))
ggplot(sel)+geom_line(aes(age,data))+ylab("Selectivity")+xlab("Age")
object = propagate(ple4,10)
sel = newselex(catch.sel(object),FLPar(S50=2.5,S95=3.2,Smax=3.5,Dcv=0.6,Dmin=0.2))
idx = bioidx.sim(object,sel=sel,q=0.0001)
# Checks
ggplot(idx@sel.pattern)+geom_line(aes(age,data))+ylab("Selectivity")+xlab("Age")
ggplot(idx@index)+geom_line(aes(year,data,col=ac(iter)))+theme(legend.position = "none")+ylab("Index")

Henning-Winker/FLRef documentation built on July 14, 2024, 7:28 a.m.