srrTMB | R Documentation |
Fits Stock Recruitment Relationships (SRR) in TMB
srrTMB(object, ...)
## S4 method for signature 'FLSRs'
srrTMB(object, ...)
## S4 method for signature 'FLSR'
srrTMB(
object,
spr0 = "missing",
s = NULL,
s.est = TRUE,
s.logitsd = 50,
r0.pr = "missing",
lplim = 0.01,
uplim = 0.3,
Blim = "missing",
d = 1,
d.est = TRUE,
d.logitsd = 100,
ld = 0.5,
ud = 3,
plim = lplim,
pmax = uplim,
nyears = NULL,
report.sR0 = FALSE,
inits = NULL,
lower = NULL,
upper = NULL,
SDreport = TRUE,
verbose = FALSE,
rm.yrs = "missing",
bias.correct = TRUE
)
object |
Input FLSR = as.FLSR(stock,model) object with current model options
|
spr0 |
unfished spawning biomass per recruit from FLCore::spr0(FLStock) |
s |
steepness parameter of SRR (fixed or prior mean) |
s.est |
option to estimate steepness |
s.logitsd |
prior sd for logit(s), default is 1.4 (flat) if s.est = TRUE |
r0.pr |
option to condition models on r0 priors (NULL = geomean) |
lplim |
lower bound of spawning ratio potential SRP, default 0.0001 |
uplim |
upper bound of plausible spawning ratio potential SRP , default 0.3 |
Blim |
fixing Blim, only works with segreg |
d |
depensation parameter (default = 1) |
d.est |
option to estimate depensation d |
d.logitsd |
priod sd for logit(d) |
ld |
lower bound of depensation parameter d |
ud |
upper bound of depensation parameter d |
plim |
depreciated plim = usrp |
pmax |
depreciated pmax = lsrp |
nyears |
yearMeans from the tail used to compute a,b from the reference spr0 (default all years) |
report.sR0 |
option to report s and R0 instead of a,b |
inits |
option to specify initial values of log(r0), log(SigR) and logit(s) |
lower |
option to specify lower bounds of log(r0), log(SigR) and logit(s) |
upper |
option to specify upper bounds of log(r0), log(SigR) and logit(s) |
SDreport |
option to converge hessian and get vcov |
verbose |
if TRUE, it shows tracing |
rm.yrs |
remove recruitment years from model fit |
bias.correct |
if TRUE, bias correction of the uniform logistic hockey-stick prior for Blim/B0 (recommended) |
A list containing elements 'FLSR', of class FLSR
data(ple4)
gm <- srrTMB(as.FLSR(ple4,model=geomean),spr0=mean(spr0y(ple4)))
bh <- srrTMB(as.FLSR(ple4,model=bevholtSV),spr0=spr0y(ple4))
ri <- srrTMB(as.FLSR(ple4,model=rickerSV),spr0=spr0y(ple4))
hs <- srrTMB(as.FLSR(ple4,model=segreg),spr0=spr0y(ple4),lplim=0.05,uplim=0.2)
srs = FLSRs(gm=gm,bh=bh,ri=ri,hs=hs) # combine
plotsrs(srs)
plotsrts(srs) # relative
plotsrs(srs[2:4],b0=TRUE) # through to B0
plotsrs(srs[2:4],b0=TRUE,rel=TRUE) # relative
gm@SV # estimates
do.call(rbind,lapply(srs,AIC))
# Bias-correction test for Hockey-Stick
srs=FLSRs(
correct = srrTMB(as.FLSR(ple4,model=segreg),spr0=mean(spr0y(ple4)),lplim=0.001,uplim=0.08),
bias =srrTMB(as.FLSR(ple4,model=segreg),spr0=mean(spr0y(ple4)),lplim=0.001,uplim=0.08,bias.correct=FALSE,s.logitsd=20))
plotsrs(srs,rel=TRUE)
# Depensation
d.srs = FLSRs(
uniform = srrTMB(as.FLSR(ple4,model=bevholtDa),spr0=spr0y(ple4)),
larger1 = srrTMB(as.FLSR(ple4,model=bevholtDa),spr0=spr0y(ple4),ld=1),
prior1 = srrTMB(as.FLSR(ple4,model=bevholtDa),spr0=spr0y(ple4),d=1.5,d.logitsd=1.5),
prior1.5 = srrTMB(as.FLSR(ple4,model=bevholtDa),spr0=spr0y(ple4),d=1.5,d.logitsd=1.5),
fixed1.5 = srrTMB(as.FLSR(ple4,model=bevholtDa),spr0=spr0y(ple4),d=1.5,d.est=FALSE),
fixed2.5 = srrTMB(as.FLSR(ple4,model=bevholtDa),spr0=spr0y(ple4),d=2.5,d.est=FALSE)
)
plotsrs(d.srs)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.