newselex | R Documentation |
generates flexible 5-paramater selex curves
newselex(object, selexpars)
object |
FLQuant from catch.sel() or sel.pattern() |
selexpars |
Selectivity Parameters selexpars S50, S95, Smax, Dcv, Dmin
|
FLquant with selectivity pattern
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.