newselex: generates flexible 5-paramater selex curves

View source: R/OMsim.R

newselexR Documentation

generates flexible 5-paramater selex curves

Description

generates flexible 5-paramater selex curves

Usage

newselex(object, selexpars)

Arguments

object

FLQuant from catch.sel() or sel.pattern()

selexpars

Selectivity Parameters selexpars S50, S95, Smax, Dcv, Dmin

  • S50: age at 50

  • S95: age at 50

  • Smax: age at peak of selectivity before descending limb

  • Dcv: CV demeterming the steepness of the descending half-normal slope

  • Dmin: determines the minimum retention of oldest fishes

Value

FLquant with selectivity pattern

Examples

data(ple4)
sel = newselex(catch.sel(ple4),FLPar(S50=2,S95=3,Smax=4.5,Dcv=0.6,Dmin=0.3))
ggplot(sel)+geom_line(aes(age,data))+ylab("Selectivity")+xlab("Age")
# Simulate
harvest(ple4)[] = sel
sr <- srrTMB(as.FLSR(ple4,model=bevholtSV),spr0=mean(spr0y(ple4)))
brp = computeFbrp(ple4,sr,proxy="msy") 
fbar(brp) = FLQuant(rep(0.01,70))
stk = as(brp,"FLStock")
units(stk) = standardUnits(stk)
its = 100
stk <- FLStockR(propagate(stk, its))
stk@refpts= Fbrp(brp)
b0=an(Fbrp(brp)["B0"])
control = FLPar(Feq=0.15,Frate=0.1,Fsigma=0.15,SB0=b0,minyear=2,maxyear=70,its=its)
run <- rffwd(stk, sr=sr,control=control,deviances=ar1rlnorm(0.3, 1:70, its, 0, 0.6))
plotAdvice(run)

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