1 JABBA3: surplus production models with RTMB speed

JABBA3 fits Bayesian state-space surplus production models: biomass dynamics driven by a Pella-Tomlinson production function, fishery removals and process error, fitted to one or more abundance indices. It is the successor of JABBA (Just Another Bayesian Biomass Assessment; Winker et al. 2018), rebuilt in RTMB (Kristensen et al. 2016) and with inputs and outputs in FLR (Kell et al. 2007):

  • The same model family as JABBA. Schaefer, Fox and Pella-Tomlinson production, the JABBA priors (r, K, initial depletion, shape), process error after the catch, additive index variance and catch with error. With the same priors JABBA3 reproduces the JABBA RTMB engine to within 10−410^{-4} in logB/BMSY\log B/B_{MSY}.
  • Fast. The log-depletion states are integrated by the Laplace approximation and the fixed effects estimated at the posterior mode; a fit takes well under a second, so retrospectives, hindcasts, sensitivity runs and simulation testing are cheap.
  • Fully Bayesian when needed. The same objective can be sampled with NUTS (tmbstan; Monnahan and Kristensen 2018) for final runs and credible intervals.
  • Process error from BioProcDyn. Production lag at the age at maturity, AR(1) process deviations, depletion-dependent process error and a life-history (FishLife) prior on its scale.
  • Diagnostics. One-step-ahead (OSA) residuals by particle filter, runs tests, the SPiCT residual tests, retrospective analysis (Mohn’s rho) and hindcast cross-validation (MASE).
  • FLR inside. Catch as FLQuant, indices as FLIndices; status, reference points and parameters out as FLQuants and FLPar.
  • Converters. Classic JABBA data frames, JABBA build_jabba() objects and SPiCT input lists convert to JABBA3 inputs.

JABBA and JABBA3. Since version 2.x, JABBA itself has an RTMB engine in addition to JAGS, which few users are aware of. JABBA3 is the standalone RTMB successor. In this guide “JABBA” means the original package (JAGS, with its RTMB engine) and “JABBA3” the new one.

How JABBA options map to JABBA3:

JABBA JABBA3
build_jabba(catch, cpue, se, ...) jb3_data() + jb3_priors() + jb3_model(), or jbinput2jabba3(jbinput)
fit_jabba() (JAGS) jabba3(engine = "rtmb") (mode) or jabba3(engine = "nuts")
r.prior, K.prior, psi.prior jb3_priors(r = , K = , bkinit = ), each c(median, log.sd, on)
sigma.proc.prior (inverse-gamma) jb3_priors(sdb = "fishlife") (lognormal, life-history centre)
model.type, BmsyK jb3_model(shape = , BmsyK = )
sigma.est, fixed.obsE estimated sdi + input SEs (obs.error = "additive")
add.catch.CV jb3_model(catch.error = TRUE, sdc = 0.1)
jbplot_*() jbplot_*() (ggplot2)

1.1 About this guide

Part I (sections 3-9) goes through an assessment from the data to stock status: data, priors, model options, fitting, convergence and residual diagnostics, with checks at each step (what to look at, what is a red flag, what to do about it). Part II (sections 10-15) covers NUTS, the BioProcDyn process-error workflows, projections, FLR outputs, converters from JABBA and SPiCT, and the model equations. Section 16 summarises the checks and the functions. The examples use the built-in ICCAT data (data(iccat)): Atlantic bigeye tuna, white marlin, South Atlantic swordfish and blue marlin.

2 Installation

2.1 Required

JABBA3 needs RTMB, ggplot2 and Matrix; these are installed with the package. The easiest option is r-universe (no remotes needed; the same repositories also provide the FLR packages):

repos <- c(
  hw   = "https://henning-winker.r-universe.dev",
  flr  = "https://flr.r-universe.dev",
  CRAN = "https://cloud.r-project.org"
)
install.packages("JABBA3", repos = repos)

Or the development version from GitHub:

install.packages("remotes")
remotes::install_github("Henning-Winker/JABBA3")

2.2 Optional

Package Needed for Install
tmbstan, rstan NUTS (engine = "nuts"): full posteriors for final runs, catch-only and prior predictive runs install.packages(c("tmbstan", "rstan"))
patchwork multi-panel diagnostics and summary plots install.packages("patchwork")
FLCore, ggplotFL, FLRef FLR inputs and outputs (jb3_FLStockR(), jbdat2flr()) see below
JABBA converting JABBA (JAGS) inputs (jbinput2jabba3()) remotes::install_github("JABBAmodel/JABBA")
MASS Kobe contours install.packages("MASS")
install.packages(c("tmbstan", "rstan", "patchwork", "MASS"))
install.packages(c("FLCore", "ggplotFL", "FLRef"), repos = repos)
remotes::install_github("JABBAmodel/JABBA")

NUTS needs a C++ toolchain. rstan compiles models, so it needs Rtools on Windows (https://cran.r-project.org/bin/windows/Rtools/, the version matching your R) or the Xcode command-line tools on macOS (xcode-select --install). Check the toolchain with pkgbuild::has_build_tools(debug = TRUE) before installing rstan. JABBA3 runs without NUTS; only engine = "nuts", the NUTS chapters and catch-only runs need it.

2.3 Check the installation

library(JABBA3)
packageVersion("JABBA3")
#> [1] '3.0.0.9000'
jabba3_info()
opt <- c("tmbstan", "rstan", "patchwork", "FLCore", "ggplotFL", "FLRef", "JABBA", "MASS")
data.frame(package = opt, installed = vapply(opt, requireNamespace, logical(1), quietly = TRUE), row.names = NULL)
#>     package installed
#> 1   tmbstan      TRUE
#> 2     rstan      TRUE
#> 3 patchwork      TRUE
#> 4    FLCore      TRUE
#> 5  ggplotFL      TRUE
#> 6     FLRef      TRUE
#> 7     JABBA      TRUE
#> 8      MASS      TRUE

3 Quick start: your first fit

Atlantic bigeye tuna is the standard example of this guide: catch from 1950 and two Japanese longline CPUE indices with log-scale standard errors, in the JABBA data-frame format. Atlantic blue marlin, a more complex assessment with ten indices, introduces the rebuilding protocol (chapter The rebuilding protocol).

data(iccat)
names(iccat)
#> [1] "bet"  "whm"  "swos" "bum"
bet <- iccat$bet
head(bet$catch, 3)
#>   year Total
#> 1 1950   808
#> 2 1951  1651
#> 3 1952  2018
head(bet$cpue[bet$cpue$year >= 1959, ], 3)
#>    year JR2_early JR2_late
#> 10 1959 0.8423903       NA
#> 11 1960 0.9248946       NA
#> 12 1961 1.1712004       NA

Three steps: data, priors, fit.

d   <- jb3_data(bet$catch, bet$cpue, bet$se, stock = "bet")
pr  <- jb3_priors(d, r = c(0.2, 0.5))
fit <- jabba3(d, pr, jb3_model(shape = "fox"), ndraws = 1000)
fit
#> JABBA3 fit: bet ( bet )  engine: rtmb  + 1000 mvn draws 
#>   model: fox    
#>   convergence: ok (max gradient 2.6e-10, Newton decrement 5.8e-21)
#>   estimates (mode, 95% CI):
#>             est      lci      uci
#> K      1.14e+06 6.90e+05 1.90e+06
#> r      1.97e-01 1.12e-01 3.47e-01
#> bkinit 8.88e-01 5.50e-01 1.43e+00
#> sdb    8.68e-02 5.73e-02 1.32e-01
#> q1     9.38e-07 5.22e-07 1.68e-06
#> q2     1.76e-06 9.85e-07 3.16e-06
#> sdi1   5.00e-02 1.65e-02 1.52e-01
#> sdi2   4.41e-02 1.67e-02 1.17e-01
#> m      1.00e+00       NA       NA
#> Bmsy   4.21e+05 2.54e+05 6.99e+05
#> Fmsy   1.97e-01 1.12e-01 3.47e-01
#> MSY    8.31e+04 7.09e+04 9.74e+04
#>   status 2017: B/Bmsy 0.79 (0.54-1.15), F/Fmsy 1.17 (0.74-1.86)

The print shows the convergence verdict, the estimates with 95% intervals and the stock status in the last year. ndraws = 1000 adds draws from the multivariate normal approximation at the mode, used for the Kobe plot and projections. The fitting took 4.85 s.

3.1 Quick output: plot(fit)

plot(fit) (or jabbaplot3(fit)) is the one-page summary of a fit, as SPiCT’s plot():

  • top row: biomass (with the observed indices scaled by qq as points), FF and catch, with MSY reference points and Bthr=0.5BMSYB_{thr} = 0.5 B_{MSY} and Blim=0.3BMSYB_{lim} = 0.3 B_{MSY};
  • middle row: B/BMSYB/B_{MSY} (again with the scaled indices), F/FMSYF/F_{MSY} and the Kobe plot with the uncertainty of the terminal year;
  • bottom row: the process deviations, the realised surplus production Bt+1−Bt+CtB_{t+1} - B_t + C_t against biomass with the production curve, and the production phase plot: catches against biomass on the Kobe colours, with the MSY band.
plot(fit)

plot(fit, "simple") gives a 2 x 2 version (B/BMSYB/B_{MSY}, F/FMSYF/F_{MSY}, catch, Kobe; as SPiCT’s plot2()), and panels = picks any set of panels, e.g. plot(fit, panels = c("B/Bmsy", "F/Fmsy", "fits", "residuals")).

plot(fit, "simple")

3.2 Individual plots

jbplot_advice(fit)

The advice plot follows FLRef’s plotAdvice() and JAGG: the median with nested 90% and 60% bands and the MSY reference points as labelled lines.

jbplot_kobe(fit)

jbplot_kobe(fit, style = "contours")   # filled 50/80/95% regions, as jbplot_biplot(); contours = FALSE: points only

jbplot_all(fit, dir) writes all standard plots of a fit to PNG files.

4 Data

4.1 Data frames (JABBA format)

jb3_data() takes the JABBA data frames directly: catch (year, catch[, fleet 2, ...]), cpue (year, index1, index2, ..., NA for missing years) and optionally se (log-scale standard errors, same columns as cpue). Catches by fleet are summed for the fit and kept in catch.fleets.

d <- jb3_data(bet$catch, bet$cpue, bet$se, stock = "bet")
d$years
#>  [1] 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968
#> [20] 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987
#> [39] 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006
#> [58] 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017
str(d$I)
#>  num [1:68, 1:2] NA NA NA NA NA ...
#>  - attr(*, "dimnames")=List of 2
#>   ..$ : chr [1:68] "1950" "1951" "1952" "1953" ...
#>   ..$ : chr [1:2] "JR2_early" "JR2_late"
jbplot_data(d)

jbplot_indices() shows each index scaled to its mean with the 95% interval from the input standard errors, as JABBA’s plot of the same name:

jbplot_indices(d)

4.2 FLR objects

The native input is catch as an FLQuant (or FLQuants by fleet) and indices as FLIndices of FLIndexBiomass, with the log-scale standard errors in index.var. jbdat2flr() converts the JABBA data frames, and flr2jbdat() converts back:

library(FLCore)
x <- jbdat2flr(bet$catch, bet$cpue, bet$se)
names(x)                    # auxiliary is NULL when not given
#> [1] "catch"     "indices"   "auxiliary"
x$catch[, ac(2013:2017)]
#> An object of class "FLQuant"
#> , , unit = unique, season = all, area = unique
#> 
#>      year
#> age   2013  2014  2015  2016  2017 
#>   all 67849 75029 80172 79909 76982
#> 
#> units:  t
names(x$indices)
#> [1] "JR2_early" "JR2_late"
index.var(x$indices[[2]])[, ac(2013:2017)]
#> An object of class "FLQuant"
#> , , unit = unique, season = all, area = unique
#> 
#>      year
#> age   2013  2014  2015  2016  2017 
#>   all 0.193 0.201 0.210 0.205 0.203
#> 
#> units:  NA
d.flr <- jb3_data(x$catch, x$indices, stock = "bet")
all.equal(d.flr$I, d$I, check.attributes = FALSE)
#> [1] TRUE

All functions that take the data work the same way with FLR input; jbplot_data() also takes the FLR objects directly:

jbplot_data(x$catch, x$indices, stock = "bet")

Several catch columns give FLQuants (one per fleet) unless fleets = FALSE. jbcatch2flq() and jbidx2FLIndices() convert the catch and the indices separately.

4.3 Series of different lengths

The series do not have to cover the same years: jb3_data() aligns them by year to the catch years. The bigeye input is also shipped as FLR objects in their original lengths (catch 1950-2017; indices 1959-1978 and 1979-2017), with the standard errors still to be filled in index.var:

inp <- readRDS(system.file("extdata", "flr_betinp.rds", package = "JABBA3"))
for(i in seq_along(inp$indices)) index.var(inp$indices[[i]])[] <- 0.2   # SE = 0.2
d.inp <- jb3_data(inp$catch, inp$indices, stock = "bet")
jb3_align(d.inp)
#>      series  type first last  n used_first used_last n_used
#> 1     catch catch  1950 2017 68       1950      2017     68
#> 2 JR2_early index  1959 1978 20       1959      1978     20
#> 3  JR2_late index  1979 2017 39       1979      2017     39

Index years before the first (or after the last) catch year, and gaps in the catch, are kept with jb3_data(..., catch.gaps = "estimate"): the catch in those years is then estimated with a random walk on the log harvest rate (as in SPiCT), while the years with catch stay catch-conditioned.

4.4 Check 1: the data

jbplot_data() shows the catch and the indices. Look for:

What Red flag Action
contrast indices flat while catch changes, or the reverse r and K are confounded; tighter r prior, or use status priors
index overlap indices in conflict where they overlap separate sdi; drop or down-weight one index; sensitivity runs
standard errors very small SEs (< 0.05) the estimated sdi adds variance, but check where the SEs come from
catch gaps, early catch reconstructed catch.error = TRUE (default); start later with bkinit prior

6 Priors

All priors are in one list from jb3_priors(). Each prior is c(median, log.sd, on): lognormal with the given median and log-scale SD, and an on/off switch (on = 0 gives a flat prior on the log scale). The defaults follow JABBA (build_jabba()), except for the process error and the K prior (one-sided, see chapter JABBA-like or SPiCT-like).

pr <- jb3_priors(d, r = c(0.2, 0.5))
pr
#> JABBA3 priors (lognormal: median, log.sd; on = 1)
#>          median log.sd on
#> r      2.00e-01  0.500  1
#> K      7.63e+05  0.833  0
#> bkinit 9.00e-01  0.246  1
#> sdb    8.10e-02  0.300  1
#> m            NA  0.300  0
#> sdi    2.00e-01  0.500  0
#> sdb: life-history SD sigR (0.50) x min(0.9 Hmsy, 1.15) at the 0.025 percentile (median x1.80), Hmsy = r/m with the model shape (table: m = 2) 
#> q: flat on log q 
#> kdyn (dynamic sdb only): normal(0.69, 0.15), mean max(0, 0.148 - 0.235 log Hmsy) with the model shape (table: m = 2)
#> max catch (max): 134,900
#> K: one-sided lognormal, flat below 5.7 x max catch, half-normal on log K above (log-SD 0.83, CV 1.00)
Prior Default Note
r c(0.2, 0.5, 1) intrinsic growth rate; on by default
K "half8": one-sided, 8 x max catch as expected value, CV 1 (flat below 5.7 x, half-normal on log K above, log.sd 0.833) K.cv sets the CV; "halfN", "half+r"; "jabba" = JABBA’s two-sided 8 x (median), CV 1; NULL = no K prior
bkinit (alias psi) c(0.9, 0.246, 1) initial depletion B1/KB_1/K
sdb "fishlife" process error SD at BMSYB_{MSY}, see below
q flat on log q matrix with one row c(median, log.sd, on) per catchability group
m off shape fixed from BmsyK; c(median, log.sd, 1) estimates it
rho off (c(0.7, 0.15, 0)) normal prior on the AR(1) coefficient, when estimated
kdyn max(0, 0.148 - 0.235 log HMSYH_{MSY}), sd 0.15 depletion dependence of sdb (dynamic SD only); HMSY=r/mH_{MSY} = r/m
sdi off index SD prior, used with obs.error = "spict"
status NULL data.frame(year, type, median, log.sd); type "BK", "BBmsy" or "FFmsy"
bbmsyinit NULL initial status as B1/BMSYB_1/B_{MSY} instead of B1/KB_1/K: c(median, log.sd); switches bkinit off

6.1 Process error: the life-history prior

sdb = "fishlife" (default) replaces JABBA’s diffuse inverse-gamma prior on the process variance by a lognormal prior anchored on a life-history process error SD at the harvest rate at MSY,

σLH=σRmin(0.9HMSY,1.15),HMSY=r/m, \sigma_{LH} = \sigma_R \min(0.9\,H_{MSY},\ 1.15), \qquad H_{MSY} = r/m ,

σMSY∼LN(log[σLHe1.96×0.3],0.3), \sigma_{MSY} \sim LN\left(\log\left[\sigma_{LH}\, e^{1.96 \times 0.3}\right],\ 0.3\right),

with rr the median of the r prior, mm the shape of the model and σR\sigma_R the recruitment variability (sigR = 0.5 when unknown). HMSYH_{MSY} is the harvest rate at MSY, which equals FMSYF_{MSY} in the JABBA3 currency (catch over mean exploitable biomass), so the same productivity gives the same prior for any shape. The relation comes from age-structured simulations of 496 FishLife species (Thorson 2020) under two selectivity patterns (BioProcDyn): the process error SD at BMSYB_{MSY} scales almost linearly with HMSYH_{MSY} up to a plateau at about σR\sigma_R for very productive stocks (R2R^2 = 0.96; with the Leslie r as the predictor R2R^2 = 0.65, and selectivity shifts the relation).

σLH\sigma_{LH} describes the deviations of the true age-structured dynamics from their own equilibrium production curve, i.e. the process error expected without model or data misspecification: fitted to (near) perfect data, the lag + AR(1) model recovers it. Misspecification in a real assessment can only add to it, so σLH\sigma_{LH} is treated as a lower plausible bound and placed at the 2.5th percentile of the prior (sdb.pct = 0.025), giving a median of 1.80σLH1.80\,\sigma_{LH} and a 95% prior interval of σLH\sigma_{LH} to 3.2σLH3.2\,\sigma_{LH} (cf. priors set from plausible ranges, Meyer and Millar 1999). Too little process error makes the fits overconfident and more often strongly optimistic; in the limit of a deterministic model the 95% intervals cover the truth in about half of the simulated cases. sdb.pct = 0.5 uses σLH\sigma_{LH} as the median. The centre is converted with the model’s shape when the model is built; the printed priors show the Schaefer case (HMSY=r/2H_{MSY} = r/2). The inverse-gamma prior is still available (sdb = "igamma") but its mode is at zero, so it is not recommended for posterior-mode fits; a fixed-scale prior is given as sdb = c(median, log.sd, 1).

jb3_priors(d, r = c(0.2, 0.5), sigR = 0.8)$sdb
#>    median    log.sd        on 
#> 0.1296263 0.3000000 1.0000000
jb3_priors(d, r = c(0.2, 0.5), sdb.pct = 0.5)$sdb     # sigma_LH as the median
#> median log.sd     on 
#>  0.045  0.300  1.000
jb3_priors(d, r = c(0.2, 0.5), sdb = c(0.1, 0.3, 1))$sdb
#> median log.sd     on 
#>    0.1    0.3    1.0

6.2 r and the shape

The r prior refers to the JABBA parameterisation of the Pella-Tomlinson model, in which FMSY=r/mF_{MSY} = r/m (section Model equations). An r prior derived for the Schaefer model (m=2m = 2, FMSY=r/2F_{MSY} = r/2) therefore has to be converted when the shape changes: for the same FMSYF_{MSY}, the r for shape mm is rm=mFMSYr_m = m\,F_{MSY}. The JABBA package has the helper JABBA::r_from_fmsy_bmsyk(Fmsy, BmsyK):

if(requireNamespace("JABBA", quietly = TRUE))
  JABBA::r_from_fmsy_bmsyk(Fmsy = 0.1, BmsyK = c(0.5, 0.4, 0.37))
#>   Fmsy BmsyK        m         r
#> 1  0.1  0.50 2.000000 0.2000000
#> 2  0.1  0.40 1.188115 0.1188115
#> 3  0.1  0.37 1.011584 0.1011584

A Schaefer r of 0.2 (FMSY=0.1F_{MSY} = 0.1) corresponds to r = 0.12 for BMSY/K=0.4B_{MSY}/K = 0.4 and r = 0.1 for the Fox model. Leaving the r prior unchanged while changing the shape changes the implied FMSYF_{MSY}.

6.3 Status priors

A prior on depletion, B/BMSYB/B_{MSY} or F/FMSYF/F_{MSY} in any year (e.g. from expert knowledge or a CMSY-type analysis) is added as a data frame:

pr.st <- jb3_priors(d, r = c(0.2, 0.5),
                    status = data.frame(year = 2010, type = "BBmsy", median = 1, log.sd = 0.3))
pr.st$status
#>   year  type median log.sd
#> 1 2010 BBmsy      1    0.3

6.3.1 Initial status as B/BMSY (bbmsyinit)

The initial depletion can be given as B1/BMSYB_1/B_{MSY} rather than B1/KB_1/K. bbmsyinit = c(median, log.sd) adds a status prior on B/BMSYB/B_{MSY} in the first year and switches the bkinit prior off. With a fixed shape the two are equivalent (bkinit = median ×BMSY/K\times B_{MSY}/K), but bbmsyinit keeps the initial status the same when the shape changes, which is usually what is intended in a shape sensitivity: with bkinit = c(0.8, 0.25), BMSY/KB_{MSY}/K = 0.3, 0.4 and 0.5 imply an initial B/BMSYB/B_{MSY} of 2.7, 2.0 and 1.6, so that the shape and the initial status change together.

pr.b0 <- jb3_priors(d, r = c(0.2, 0.5), bbmsyinit = c(2, 0.25))
pr.b0$status
#>   year  type median log.sd
#> 1 1950 BBmsy      2   0.25

After fitting, jbplot_bprior() compares each status prior with the posterior of that quantity in that year, with the posterior-to-prior mean and variance ratios (PPMR, PPVR) as in JABBA:

fit.st <- jabba3(d, pr.st, jb3_model(shape = "fox"), osa = FALSE)
jbplot_bprior(fit.st)

6.4 Check 2: prior and posterior

After fitting, jbplot_priorpost() compares each prior with the posterior.

jbplot_priorpost(fit)

What Red flag Action
posterior equal to the prior the data carry no information on that parameter report it; sensitivity runs over the prior
posterior at the edge of the prior prior-data conflict revisit the prior; check the data and the model

7 Life history: r prior and generation time

JABBA3 takes life-history information in the format of FLicc (length-based assessment with fiticc()): lhpar, an FLPar with growth, natural mortality, maturity at length and the weight-length relationship, and selpar, the selectivity parameters on the length scale (e.g. from FLicc::selpars_flicc(fit)). From these, the tools in this chapter give

  • the maximum intrinsic rate of increase rr and the generation time GT from a Leslie matrix (jb3_leslie());
  • the r prior for the chosen production-function shape (jb3_fmsy2r());
  • guidance for the AR(1) persistence ρ\rho from GT (jb3_rho_gt());
  • for the Selex (spawning-biomass) model, the EB/SB curves from length or age selectivity (jb3_selex()) and the r prior from the age-structured equilibrium (jb3_asem_prior()): see the chapter Special feature: Selex.

FLicc itself is not needed: its selectivity functions are included.

7.1 Leslie matrix: r and generation time

Life-history parameters of the FLicc alfonsino example (von Bertalanffy L∞L_\infty and kk, natural mortality MM, length at 50% maturity, weight at length W=aLbW = aL^b; steepness s, default 0.7):

FLPar <- FLCore::FLPar; FLPars <- FLCore::FLPars
lhpar <- FLPar(linf = 55.7, k = 0.08, M = 0.162, L50 = 31.1859,
               a = 0.004721956, b = 3.146168, s = 0.75)
jb3_leslie(lhpar)
#>          r         gt     lambda       spr0 
#>   0.151033  17.963586   1.163035 632.546257

r=logλr = \log\lambda, with λ\lambda the dominant eigenvalue of the Leslie matrix whose first row is the reproduction at the slope at the origin of the Beverton-Holt stock-recruitment relationship, 4h/(ϕ0(1−h))4h/(\phi_0(1-h)) times weight and maturity at age; GT is the mean age of the spawners in the unfished population. Biology at age follows from von Bertalanffy growth (t0, default -0.5), W=aLbW = aL^b and logistic maturity at length (L50L_{50}, L95L_{95}; default L50+0.2L∞L_{50} + 0.2 L_\infty), with ages up to where 1% of a cohort survives (amax). The calculation reproduces JABBA::jbleslie() and FLSRTMB::productivity().

Sex-structured parameters go in a second dimension of the FLPar (or list(F = , M = )); reproduction is set by sex (default females):

lh2 <- FLPar(array(c(55.7, 0.08, 0.162, 31.2, 0.0047, 3.15, 0.75,
                     50.0, 0.09, 0.180, 29.0, 0.0047, 3.15, 0.75), dim = c(7, 2, 1),
                   dimnames = list(params = c("linf", "k", "M", "L50", "a", "b", "s"),
                                   sex = c("F", "M"), iter = 1)))
lh2[, "F"]
#> An object of class "FLPar"
#>       sex
#> params F      
#>   linf 55.7000
#>   k     0.0800
#>   M     0.1620
#>   L50  31.2000
#>   a     0.0047
#>   b     3.1500
#>   s     0.7500
#> units:  NA NA NA NA NA NA NA
rbind(F = jb3_leslie(lh2, sex = "F"), M = jb3_leslie(lh2, sex = "M"))
#>           r       gt   lambda     spr0
#> F 0.1509523 17.97095 1.162941 638.2813
#> M 0.1645810 16.28603 1.178899 405.9126

jb3_leslie() also takes an FLStock (median m, mat and stock.wt at age, females from the unit dimension if present), FLQuants (m, mat, wt) by age with unit = c("F", "M"), or by length together with lhpar for growth:

data(ple4, package = "FLCore")
jb3_leslie(ple4, h = 0.7)[c("r", "gt")]
#>         r        gt 
#> 0.2377704 8.7073336

7.2 The r prior for the production-function shape

The Leslie rr is the per-capita growth at low biomass. In the Pella-Tomlinson form of JABBA3 this equals r/(m−1)r/(m-1), while FMSY=r/mF_{MSY} = r/m: using the Leslie rr directly is only consistent for the Schaefer model. Matching the prior on FMSYF_{MSY} keeps it consistent across shapes. rLeslie/2r_{Leslie}/2 is only a crude Schaefer-equivalent fallback for when nothing but life history is available: it ignores selectivity and the stock-recruitment curve beyond its slope and can be wrong by a factor of two (for South Atlantic albacore it gives about half the harvest rate at MSY of the age-structured equilibrium). Whenever the biology and selectivity of an age-structured model are available, use jb3_asem_prior() (chapter Special feature: Selex) instead:

r.les <- jb3_leslie(lhpar)[["r"]]
Fmsy  <- r.les/2                                   # Schaefer equivalent
c(schaefer = jb3_fmsy2r(Fmsy, shape = "schaefer"),
  pella0.4 = jb3_fmsy2r(Fmsy, BmsyK = 0.4),
  pella0.36 = jb3_fmsy2r(Fmsy, BmsyK = 0.36),
  fox = jb3_fmsy2r(Fmsy, shape = "fox"))
#>   schaefer   pella0.4  pella0.36        fox 
#> 0.15103302 0.08972228 0.07233853 0.07559202
jb3_r2fmsy(0.2, BmsyK = 0.4)                       # and back
#> [1] 0.1683339

7.3 Persistence from generation time

The generation time from the same Leslie matrix gives the guidance for the AR(1) coefficient (chapter Model options):

gt <- jb3_leslie(lhpar)[["gt"]]
c(GT = gt, rho = jb3_rho_gt(gt))
#>       GT      rho 
#> 17.96359  0.88000

8 Model options

The model structure is set with jb3_model(), separately from the priors.

Setting Default Role
shape "pella" "pella" (shape from BmsyK), "schaefer" (BMSY/K=0.5B_{MSY}/K = 0.5) or "fox" (m=1.001m = 1.001)
BmsyK 0.4 BMSY/KB_{MSY}/K for the Pella-Tomlinson form
lag 0 production lag in years (age at maturity)
rho 0 AR(1) coefficient of the process deviations
rw, rw.scale FALSE, 1 random walk in the process deviations (the conditional ρ=1\rho = 1 limit)
sdb.form "const" "dyn": process error SD σt=σMSY(Bt/BMSY)−k\sigma_t = \sigma_{MSY}(B_t/B_{MSY})^{-k}
sdb.fixed NULL fix the process error SD (used by Tier 2)
xlim c(0.2, 3) bounds of B/BMSYB/B_{MSY} in the dynamic SD
biascor FALSE lognormal bias correction of the process error
start "all" "index": no process error before the first index year
obs.error "additive" "additive": SD =se2+sdi2= \sqrt{se^2 + sdi^2} (JABBA); "spict": SD =sdi×wt= sdi \times w_t
se.min, se.na NULL, 0.3 minimum SE; SE where an index has SEs but a year has none
sets.q, sets.var one per index catchability and variance groups
catch.error, sdc TRUE, 0.1 catch with lognormal error
ebsb, ebsb.index, ebsb.catch, ebsb.removal NULL Selex: spawning biomass as the state, with EB/SB curves
q.uniform FALSE JABBA (JAGS) uniform prior on q
P.bound, K.bound, sdi.bound JABBA soft bounds

8.1 Shape

fits.shape <- lapply(c(schaefer = "schaefer", pella = "pella", fox = "fox"), function(s)
  jabba3(d, pr, jb3_model(shape = s), osa = FALSE))
t(sapply(fits.shape, function(f) c(Fmsy = f$refpts["Fmsy", "est"], MSY = f$refpts["MSY", "est"],
                                   BmsyK = f$refpts["BmsyK", "est"], B.Bmsy = tail(f$ts$est[f$ts$quant == "B/Bmsy"], 1))))
#>               Fmsy      MSY     BmsyK    B.Bmsy
#> schaefer 0.1441995 87111.45 0.5000000 0.6319495
#> pella    0.1825124 83837.63 0.4000000 0.7381991
#> fox      0.1971662 83077.15 0.3680633 0.7891855

With the same r prior the three shapes imply different FMSYF_{MSY}; convert the r prior with the shape (section Priors) when comparing shapes.

8.3 Depletion-dependent process error

sdb.form = "dyn" makes the process error SD increase at low biomass, σt=σMSYxt−k\sigma_t = \sigma_{MSY} x_t^{-k} with xt=Bt/BMSYx_t = B_t/B_{MSY} bounded to xlim, and k estimated with the life-history prior kdyn. In BioProcDyn modelling this inflation did not reduce the bias, so it is an option (and part of the Tier 2 workflow, section Workflows), not the default.

fd <- jabba3(d, pr, jb3_model(shape = "fox", lag = 3, sdb.form = "dyn"), osa = FALSE)
fd$pars[c("sdb", "kdyn"), c("est", "lci", "uci")]
#>             est        lci       uci
#> sdb  0.09061682 0.05891401 0.1393795
#> kdyn 0.55385969 0.27836831 0.8293511

8.4 Index observation error

obs.error = "additive" (default, as JABBA) adds an estimated SD sdi to the input standard errors, SDt=set2+sdi2SD_t = \sqrt{se_t^2 + sdi^2}. obs.error = "spict" uses SPiCT’s form, SDt=sdi×wtSD_t = sdi \times w_t, where the input SEs enter only as relative weights wtw_t (as stdevfacI); a prior on sdi is then available through priors$sdi (here on, as without it the SD of the second bigeye index collapses towards zero). Indices can share catchability (sets.q) or variance (sets.var), e.g. sets.q = c(1, 1) for two segments of one fleet.

pr.sdi <- jb3_priors(d, r = c(0.2, 0.5), sdi = c(0.1, 0.5, 1))
fsp <- jabba3(d, pr.sdi, jb3_model(shape = "fox", obs.error = "spict"), osa = FALSE)
fsp$pars[grep("sdi", rownames(fsp$pars)), c("est", "lci", "uci")]
#>             est        lci       uci
#> sdi1 0.11429191 0.03929158 0.3324539
#> sdi2 0.09419907 0.03757679 0.2361422

8.5 Catch error

With catch.error = TRUE (default) the catch is estimated with lognormal error (SD sdc = 0.1) as random effects, as JABBA’s add.catch.CV = TRUE; this absorbs small inconsistencies between catch and production. catch.error = FALSE treats the catch as known.

8.6 Selex (spawning biomass as the state)

With ebsb the state is spawning biomass, and the indices and removals are mapped to it through equilibrium EB/SB curves (ebsb.index, ebsb.catch). The Selex model, the curves for indices in weight and in numbers, the r prior from the age-structured equilibrium and two worked examples are in the chapter Special feature: Selex.

10 Fitting

jabba3() fits the model.

Argument Default Role
engine "rtmb" "rtmb": posterior mode, states Laplace-integrated; "nuts": full posterior with tmbstan
ndraws 0 draws from the MVN approximation at the mode (Kobe plot, projections)
nuts list() tmbstan settings: chains, iter, warmup, seed, cores, thin, control
osa TRUE one-step-ahead residuals by particle filter
se TRUE standard errors by the delta method; FALSE for fast point estimates
workflow, amat "none" BioProcDyn workflows (section Workflows)
run NULL run name for plots
peels, index.peels 0 remove the last years of all data or of the indices (used by retro and hindcast)
nstart 4 guarded restarts

10.1 Posterior mode

The default: the log-depletion states (and catch deviations) are integrated by the Laplace approximation, and the fixed effects (log K, log r, log q, initial depletion, process and observation SDs) are estimated at the mode of the posterior. Intervals come from the delta method on the log scale.

fit$time
#> [1] 4.85
fit$pars[, c("est", "lci", "uci")]
#>                 est          lci          uci
#> K      1.144792e+06 6.900959e+05 1.899083e+06
#> r      1.973633e-01 1.121512e-01 3.473194e-01
#> bkinit 8.875114e-01 5.498152e-01 1.432620e+00
#> sdb    8.680515e-02 5.727456e-02 1.315616e-01
#> q1     9.376946e-07 5.221120e-07 1.684066e-06
#> q2     1.764480e-06 9.853975e-07 3.159528e-06
#> sdi1   4.996088e-02 1.646033e-02 1.516427e-01
#> sdi2   4.406210e-02 1.665326e-02 1.165819e-01
#> m      1.001000e+00           NA           NA
fit$refpts[, c("est", "lci", "uci")]
#>                est          lci          uci
#> Bmsy  4.213560e+05 2.539990e+05 6.989828e+05
#> Fmsy  1.971662e-01 1.120391e-01 3.469724e-01
#> MSY   8.307715e+04 7.087207e+04 9.738409e+04
#> K     1.144792e+06 6.900959e+05 1.899083e+06
#> BmsyK 3.680633e-01           NA           NA
head(fit$ts[fit$ts$quant == "B/Bmsy", ], 3)
#>     year  quant      est      lci      uci    se.log  run
#> 137 1950 B/Bmsy 2.406762 1.449106 3.997293 0.2588445 <NA>
#> 138 1951 B/Bmsy 2.456684 1.577941 3.824794 0.2258633 <NA>
#> 139 1952 B/Bmsy 2.494371 1.681021 3.701255 0.2013445 <NA>

The time series in fit$ts hold B, F, B/Bmsy, F/Fmsy, B/K, catch and the process deviations with 95% intervals.

jbplot_trj(fit)

jbplot_trj() and jbplot_advice() share the JAGG options: nested = TRUE for 90/60% bands (the default in jbplot_advice()), extra for further reference points (e.g. BpaB_{pa}; an extra BlimB_{lim} or BthrB_{thr} replaces the default), drop.last to drop the last year of F and catch, proj to append projections and probs for other bands. Bthr=0.5BMSYB_{thr} = 0.5 B_{MSY} and Blim=0.3BMSYB_{lim} = 0.3 B_{MSY} (SPiCT benchmark defaults) are drawn by default (bthr, blim; NULL to omit). A list of fits is coloured by run.

jbplot_advice(fit, extra = c(Bpa = 0.8), drop.last = TRUE)

jbplot_kobe(fit, year = ) shows the uncertainty in any year (gold diamond), and jbplot_biplot() is the ‘post-modern’ biplot of Quinn and Collie (2005), as JABBA’s: B/BMSYB/B_{MSY} against F/FMSYF/F_{MSY} with the zones of a hockey-stick harvest control rule (target 0.8 FMSYF_{MSY}, threshold 0.2 BMSYB_{MSY}) and the 50/80/95% density contours of the terminal status.

jbplot_kobe(fit, year = 2000)

jbplot_biplot(fit)

10.2 Catch

With catch error (the default) the estimated catch can depart a little from the observed catch. jbplot_catch() shows both, and jbplot_catcherror() adds the log ratio of estimated to observed catch (as JABBA’s jbplot_catcherror()).

jbplot_catch(fit)

jbplot_catcherror(fit)

10.3 Fast point estimates

For simulation testing, MSE and large grids, se = FALSE, osa = FALSE skips the standard errors and residuals:

system.time(fq <- jabba3(d, pr, jb3_model(shape = "fox"), se = FALSE, osa = FALSE))
#>    user  system elapsed 
#>    0.03    0.00    0.14
fq$pars[c("K", "r"), "est"]
#> [1] 1.184379e+06 1.902909e-01

10.4 Full posterior with NUTS

engine = "nuts" samples all parameters and states of the same model with tmbstan (no Laplace approximation), started from the mode. Posterior medians and quantiles replace the mode summaries in pars, refpts and ts.

NUTS is meant for final runs, so the defaults are rigorous: 3 chains of 4000 iterations (half warmup). After sampling, jabba3() checks convergence and warns if the rank-normalised R̂\hat{R} exceeds 1.01, the bulk or tail effective sample size is below 100 per chain, there are divergent transitions, or E-BFMI is below 0.3; the full table is in fn$nuts$diags (see NUTS diagnostics). For bigeye the default run takes about half a minute.

fn <- jabba3(d, pr, jb3_model(shape = "fox"), engine = "nuts", nuts = list(cores = 3))
fn
#> JABBA3 fit: bet ( bet )  engine: nuts  + 6000 nuts draws 
#>   model: fox    
#>   convergence: ok (max gradient 8.3e-08, Newton decrement 2.3e-16); NUTS Rhat max 1.007, ESS min 391, divergent 0
#>   estimates (posterior median, 95% CrI):
#>             est      lci      uci
#> K      1.38e+06 8.23e+05 2.72e+06
#> r      1.62e-01 7.84e-02 2.86e-01
#> bkinit 8.64e-01 5.48e-01 1.26e+00
#> sdb    9.37e-02 6.13e-02 1.36e-01
#> q1     9.04e-07 4.97e-07 1.64e-06
#> q2     1.70e-06 9.41e-07 3.09e-06
#> sdi1   5.00e-02 1.65e-02 1.52e-01
#> sdi2   4.40e-02 1.67e-02 1.16e-01
#> m      1.00e+00 1.00e+00 1.00e+00
#> Bmsy   5.09e+05 3.03e+05 1.00e+06
#> Fmsy   1.62e-01 7.83e-02 2.86e-01
#> MSY    8.27e+04 6.34e+04 1.04e+05
#>   status 2017: B/Bmsy 0.81 (0.54-1.20), F/Fmsy 1.17 (0.66-1.94)

10.5 Fit to the indices

jbplot_fits(fit,years="all")

jbplot_fits(fit, log = TRUE) plots on the log scale; the shaded band is the posterior predictive interval including observation error.

10.6 Production function and process deviations

jbplot_spphase(fit)

jbplot_spdyn(fit)

jbplot_spphase() (as JABBA’s jbplot_spphase()) plots the catch against biomass over the production curve on the Kobe colours mapped to production space: below the line C=FMSYBC = F_{MSY} B the stock is fished below FMSYF_{MSY}. The hatched band left of BMSYB_{MSY} marks catches below the production curve but above that line. jbplot_spdyn() plots the realised surplus production, Bt+1−Bt+CtB_{t+1} - B_t + C_t, against the expected curve; departures are the process deviations (and the lag) in production units. rel = TRUE gives B/KB/K and C/MSYC/MSY axes, and jbplot_production(fit, type = "phase" | "dyn") calls either.

jbplot_production(fit, type = "phase", rel = TRUE)

jbplot_procdev(fit)

What Red flag Action
process deviations long runs of the same sign persistence: AR(1) with rho = 0.75 and the lag
production plot catch persistently above the production curve while biomass increases the production function is wrong for the data: lag, shape, index trends

10.7 Tables

jb3_partable() lists parameters, reference points and terminal status with 95% intervals; with a list of fits and format = "wide" it compares runs side by side. jb3_tstable() gives the time series of estimated quantities by year.

knitr::kable(jb3_partable(fit), digits = 4)
run par est lci uci cv
bet K 1144792.2935 690095.8828 1899083.0520 0.2582
bet r 0.1974 0.1122 0.3473 0.2884
bet m 1.0010 NA NA NA
bet Bmsy/K 0.3681 NA NA NA
bet Bmsy 421356.0343 253998.9709 698982.7833 0.2582
bet Fmsy 0.1972 0.1120 0.3470 0.2884
bet MSY 83077.1484 70872.0732 97384.0934 0.0811
bet B1/K 0.8875 0.5498 1.4326 0.2443
bet sigma.proc 0.0868 0.0573 0.1316 0.2121
bet rho 0.0000 NA NA NA
bet q1 0.0000 0.0000 0.0000 0.2987
bet q2 0.0000 0.0000 0.0000 0.2972
bet sdi1 0.0500 0.0165 0.1516 0.5665
bet sdi2 0.0441 0.0167 0.1166 0.4964
bet B/Bmsy (2017) 0.7892 0.5439 1.1451 0.1899
bet F/Fmsy (2017) 1.1742 0.7417 1.8588 0.2344
bet B/K (2017) 0.2905 0.2002 0.4215 0.1899
knitr::kable(jb3_partable(list(Fox = fit, Lag.AR1 = rec), format = "wide"))
Parameter Fox Lag.AR1
K 1,140,000 (690,000-1,900,000) 1,290,000 (661,000-2,500,000)
r 0.197 (0.112-0.347) 0.194 (0.0996-0.38)
m 1 1
Bmsy/K 0.368 0.368
Bmsy 421,000 (254,000-699,000) 473,000 (243,000-920,000)
Fmsy 0.197 (0.112-0.347) 0.194 (0.0995-0.379)
MSY 83,100 (70,900-97,400) 91,900 (66,700-127,000)
B1/K 0.888 (0.55-1.43) 0.908 (0.546-1.51)
sigma.proc 0.0868 (0.0573-0.132) 0.0774 (0.0486-0.123)
rho 0 0.75
q1 0.000000938 (0.000000522-0.00000168) 0.000000873 (0.00000036-0.00000211)
q2 0.00000176 (0.000000985-0.00000316) 0.00000162 (0.000000664-0.00000395)
sdi1 0.05 (0.0165-0.152) 0.0487 (0.0165-0.144)
sdi2 0.0441 (0.0167-0.117) 0.0438 (0.0166-0.115)
B/Bmsy 0.789 (0.544-1.15) 0.789 (0.43-1.45)
F/Fmsy 1.17 (0.742-1.86) 1.06 (0.511-2.21)
B/K 0.29 ( 0.2-0.421) 0.29 (0.158-0.532)
knitr::kable(tail(jb3_tstable(fit, c("Catch", "B/Bmsy", "F/Fmsy")), 5), digits = 3)
year Catch Catch.lci Catch.uci B/Bmsy B/Bmsy.lci B/Bmsy.uci F/Fmsy F/Fmsy.lci F/Fmsy.uci
64 2013 67400.45 55491.94 81864.50 0.726 0.526 1.001 1.118 0.765 1.633
65 2014 74736.02 61521.04 90789.65 0.773 0.560 1.068 1.164 0.790 1.714
66 2015 80416.46 66149.92 97759.85 0.798 0.573 1.110 1.214 0.813 1.812
67 2016 80078.10 65860.56 97364.83 0.792 0.561 1.117 1.217 0.799 1.854
68 2017 76982.03 63280.17 93650.71 0.789 0.544 1.145 1.174 0.742 1.859

11 Check 3: convergence

jb3_convergence() follows FLicc: the optimiser code, the largest gradient, a positive definite Hessian, finite standard errors and the Newton decrement (the expected further decrease of the objective by one Newton step). The fit is classed ok, warning or failed.

jb3_convergence(fit)
#>                       check    value pass
#> 1            optimiser code 0.00e+00 TRUE
#> 2              max gradient 2.56e-10 TRUE
#> 3 Hessian positive definite 1.00e+00 TRUE
#> 4           standard errors 1.00e+00 TRUE
#> 5          Newton decrement 5.83e-21 TRUE
#>                                                                                    meaning
#> 1                                                          nlminb reported convergence (0)
#> 2                                       largest absolute gradient at the optimum (< 0.001)
#> 3                              the mode is a proper minimum (curvature in every direction)
#> 4                                                              all delta-method SEs finite
#> 5 expected further decrease of the objective by a Newton step (< 0.001 ok, <= 0.1 warning)
fit$convergence$tier
#> [1] "ok"
What Red flag Action
max gradient > 0.001 refit (nstart), check priors and bounds
Hessian not positive definite a parameter is not identified: priors on r or K, fewer q or variance groups
Newton decrement > 0.1 not at the optimum; simplify the model
estimates at bounds K at K.bound, B/K at P.bound prior-data conflict; revisit priors

The fit internally polishes the optimum with Newton steps and restarts from jittered values when the gradient is large (nstart).

12 Check 4: residual diagnostics

12.1 One-step-ahead residuals

The residuals of a state-space model computed from the smoothed states are shrunk and autocorrelated by construction, so the classic tests are biased. JABBA3 computes one-step-ahead (OSA) residuals (Thygesen et al. 2017) by a particle filter (jb3_osa(), run by jabba3(osa = TRUE)): each observation is predicted from the data up to the previous one. Under a correct model they are independent N(0, 1).

jbplot_residuals(fit)

jbplot_residuals(fit, type = "ordinary") shows the classic log residuals.

jbplot_stdresiduals() shows the ordinary residuals standardised by the total observation SD, as JABBA’s plot of the same name, with SDNR and its 95% critical value:

jbplot_stdresiduals(fit)

12.2 Posterior predictive check

jbplot_ppc() compares, draw by draw, the discrepancy of the observed indices from the fitted ones, D=∑((logI−logÎ)/σ)2D = \sum ((\log I - \log \hat{I})/\sigma)^2, with that of indices replicated from the observation model (as JABBA’s jbplot_PPC()). The Bayesian p-value P(Drep>Dobs)P(D^{rep} > D^{obs}) is near 0.5 for a well-specified observation model; values near 1 mean the indices are fitted more closely than the observation error implies (here the process error absorbs part of the index variation), values near 0 that they are fitted less well. It uses the draws of the fit (NUTS or MVN) and generates MVN draws if there are none.

pp <- jbplot_ppc(fit)
attr(pp, "ppc")
#>               index Bayesian.p nobs
#> JR2_early JR2_early      0.955   20
#> JR2_late   JR2_late      0.990   39
pp

12.3 Runs tests

The runs test (Wald-Wolfowitz) checks for too few runs of residual signs (autocorrelation), with three-sigma limits from the average moving range (as JABBA, ss3diags and JAGG). Green: passed (p≥0.05p \ge 0.05); red: failed.

jbplot_runs(fit)

The test table is in the plot’s attribute "runs" (attr(jbplot_runs(fit), "runs")); mixing = "two.sided" also flags too many runs. Likewise jbplot_retro() and jbplot_hcxval() return Mohn’s rho and MASE in attributes "rho" and "mase".

12.4 The JABBA and SPiCT test sets

jb3_diags() gives one table per index: RMSE, SDNR, runs test and the share outside the three-sigma limits (the JABBA set), and the bias t-test, Ljung-Box test (lag 4) and Shapiro-Wilk normality test (the SPiCT set, as plotspict.diagnostic()). flag is TRUE when any test has p<0.05p < 0.05.

jb3_diags(fit)
#>       index  n       RMSE      SDNR runs.p out.3sig    bias.p  LjungBox.p Shapiro.p  flag
#> 1 JR2_early 20 0.09780850 0.5591313  0.106        0 0.6702431 0.656281829 0.1077701 FALSE
#> 2  JR2_late 39 0.09488981 0.5767701  0.003        0 0.8715937 0.001384351 0.7314620  TRUE
jbplot_spdiags(fit)

Residual tests check the error assumptions; they have little power to detect structural misspecification such as an omitted production lag. Use the retrospective and hindcast as well.

12.5 Retrospective analysis

jb3_retro() refits with the last 1 to n years of all data removed and computes Mohn’s rho.

rt <- jb3_retro(fit, n = 5)
rt$rho
#>         quant         rho
#> B           B -0.02624365
#> B/Bmsy B/Bmsy -0.03756391
#> F           F  0.03318679
#> F/Fmsy F/Fmsy  0.06434919
jbplot_retro(rt)

12.6 Hindcast cross-validation

jb3_hindcast() removes the last 1 to n years of the indices (catch kept), predicts each removed observation one step ahead, and computes the mean absolute scaled error (MASE; Kell et al. 2021; Carvalho et al. 2021), the prediction error relative to a naive prediction (the last observed value). MASE < 1: the model predicts better than the naive guess.

hc <- jb3_hindcast(fit, n = 5)
hc$mase
#>               index     MASE MASE.adj    MAE.PR  MAE.base n.eval
#> JR2_early JR2_early       NA       NA        NA        NA      0
#> JR2_late   JR2_late 1.175882 1.175882 0.1615577 0.1373927      5
jbplot_hcxval(hc)

What Red flag Action
OSA residuals trends, runs test failed lag, AR(1), index conflict; separate sdi
Ljung-Box p < 0.05 autocorrelated residuals: process error persistence (AR(1)), or index trends in q
Mohn’s rho beyond -0.15 to 0.20 retrospective pattern; check recent data and q
MASE > 1 no prediction skill for that index

13 NUTS diagnostics

Requirements. NUTS runs through tmbstan, which needs rstan and a C++ toolchain (Rtools on Windows, Xcode command-line tools on macOS); see chapter Installation. Without them, engine = "nuts" stops with a message, and everything else in JABBA3 works.

A NUTS fit has to be checked for convergence of the chains before its posterior is used. jb3_nuts_diags() gives the rank-normalised split R̂\hat{R}, bulk and tail effective sample sizes (ESS; Vehtari et al. 2021) for every sampled parameter, including the states, and the sampler diagnostics by chain: divergent transitions, hits of the maximum tree depth, mean acceptance, step size and the energy Bayesian fraction of missing information (E-BFMI).

nd <- jb3_nuts_diags(fn)
nd$sampler
#>   chain divergent treedepth.max    accept   stepsize     EBFMI
#> 1     1         0             0 0.9512628 0.05163794 0.5787564
#> 2     2         0             0 0.9575535 0.04857253 0.4928314
#> 3     3         0             0 0.9646507 0.04497142 0.5623369
head(nd$pars, 8)
#>         par       mean        sd       q2.5        q50      q97.5     Rhat  ess_bulk ess_tail
#> 1      logK  3.1765452 0.3001066  2.6374007  3.1556305  3.8315969 1.000520 1982.4503 2729.124
#> 2      logr -1.8424291 0.3269238 -2.5463280 -1.8175729 -1.2516266 1.000851 1952.9100 2843.082
#> 3   logq[1] -3.0927138 0.3245321 -3.7799464 -3.0792910 -2.5000632 1.001023 1321.7703 2211.949
#> 4   logq[2] -2.4988425 0.3364079 -3.2239921 -2.4817873 -1.9011507 1.000493  905.4650 1784.153
#> 5       lbk -0.1557075 0.2137336 -0.6022807 -0.1456764  0.2336034 1.001372 1901.8584 3023.989
#> 6    logsdb -2.3737740 0.2016909 -2.7919718 -2.3680044 -1.9928630 1.005397  801.7149 1443.504
#> 7 logsdi[1] -2.9610236 0.4954330 -3.8703457 -2.9669032 -1.9813940 1.003046 8182.4713 4908.231
#> 8 logsdi[2] -3.1073012 0.4370695 -3.9355405 -3.1095703 -2.2540640 1.000342 8025.2494 4559.401
nd$ok
#> [1] TRUE

ok is TRUE when R̂<1.01\hat{R} < 1.01, bulk and tail ESS > 100 per chain, there are no divergent transitions and E-BFMI > 0.3 in all chains.

The plots are on the sampled scale (mostly logs): logK, logr, logq[i], lbk (log initial depletion), logsdb, logsdi[i], and the states logP[t] and catch deviations cdev[t]. By default only the fixed effects are plotted; pars selects parameters ("logq" matches all logq[i]).

jbplot_nutsdiags(fn)

jbplot_nuts(fit, type) gives the single plots:

type Shows Healthy
"trace" traces by chain; divergent transitions as red rug ticks chains overlap, no trends
"rank" rank histograms by chain flat and overlapping
"dens" densities by chain the same in all chains
"acf" autocorrelation by chain drops to zero within a few lags
"pairs" pairwise scatter with divergent transitions in red no funnels or ridges; divergences not clustered
"rhat" R̂\hat{R} and ESS for all parameters, states included R̂<1.01\hat{R} < 1.01, ESS > 100 per chain
"energy" marginal energy against energy transitions similar widths (E-BFMI > 0.3)
jbplot_nuts(fn, "pairs", pars = c("logK", "logr", "logq", "logsdb"))

jbplot_nuts(fn, "trace", pars = c("logK", "logr"), inc_warmup = TRUE)

Each type is also its own function: jbplot_trace(), jbplot_rank(), jbplot_mcmcdens(), jbplot_mcmcacf(), jbplot_pairs(), jbplot_rhat() and jbplot_energy().

jbplot_rank(fn, pars = c("logK", "logr", "logsdb"))

jbplot_mcmcdens(fn, pars = c("logK", "logr", "logsdb"))

jbplot_mcmcacf(fn, pars = c("logK", "logr", "logsdb"))

jbplot_trace(fn, pars = c("logK", "logr", "logsdb"))

jbplot_energy(fn)

jbplot_rhat(fn)

jbplot_pairs(fn, pars = c("logK", "logr"))

What Red flag Action
R̂\hat{R}, ESS R̂>1.01\hat{R} > 1.01 or ESS < 100 per chain more iterations (iter); check the pairs plot
divergent transitions any control = list(adapt_delta = 0.99); look where they cluster in the pairs plot
tree depth many hits of max_treedepth strong correlations (K and r, K and q): tighter priors
E-BFMI < 0.3 poor exploration of the tails, often the process error SD and the states
K-r-q ridge strong negative correlation of log K with log r and log q expected with little contrast; informative r prior

In the short run above the states (logP) have low ESS: with process error SDs around 0.1 the states and logsdb form a funnel. Run longer for final results.

14 BioProcDyn workflows

The workflows of the BioProcDyn protocol run automatically with jabba3(..., workflow = ), or step by step with jb3_tier1() and jb3_tier2() on any fit. All steps are kept in $steps.

workflow Steps
"tier1" production lag at the age at maturity (amat)
"tier2" step 1: constant process error (FishLife prior); step 2: dynamic σt=σMSYxt−k\sigma_t = \sigma_{MSY} x_t^{-k} with the level tuned on step 1, σMSY=σ̂1/mean(x1,t−2k)\sigma_{MSY} = \hat\sigma_1 / \sqrt{\mathrm{mean}(x_{1,t}^{-2k})}, k estimated with the life-history prior, plus the lag
"selex", "selex_tier1", "selex_tier2" the same with the spawning-biomass state (needs model$ebsb)
wf <- jabba3(d, pr, jb3_model(shape = "fox"), workflow = "tier2", amat = 3)
names(wf$steps)
#> [1] "Current" "Tier 2"
jbplot_steps(wf)

Step by step, from an existing fit:

t1 <- jb3_tier1(fit, amat = 3)
t1$model$lag
#> [1] 3

The BioProcDyn simulations found that the depletion-dependent process error of Tier 2, although present in the operating models, did not remove the optimism; lag + AR(1) (jb3_model(lag = amat, rho = 0.75)) did. The tiers are kept for comparison and sensitivity.

15 Projections

jb3_project() projects the stock under constant F/FMSYF/F_{MSY} scenarios (fmsy, the default: 0, 0.5, 0.75, 1 and 1.25 FMSYF_{MSY}) or constant catch (catch), from the NUTS draws or from MVN draws at the mode (generated if the fit has none), with process error (and its AR(1) persistence and the lag). F-based scenarios apply F=f×FMSYF = f \times F_{MSY} draw by draw, so they remain defined when a draw is depleted; constant catches are capped at 95% of the biomass.

pj <- jb3_project(fit, fmsy = c(0, 0.5, 0.75, 1, 1.25), nyears = 10)
pj$scenarios
#>     type value         label
#> 1 F/Fmsy  0.00    F/Fmsy = 0
#> 2 F/Fmsy  0.50  F/Fmsy = 0.5
#> 3 F/Fmsy  0.75 F/Fmsy = 0.75
#> 4 F/Fmsy  1.00    F/Fmsy = 1
#> 5 F/Fmsy  1.25 F/Fmsy = 1.25

Process error in the projection years follows the fitted model. With the default procerr = "ar1", each draw continues its AR(1) process from its last estimated deviation, dt+1=ρdt+εtd_{t+1} = \rho d_t + \varepsilon_t with εt∼N(0,σ2(1−ρ2))\varepsilon_t \sim N(0, \sigma^2(1-\rho^2)), so the persistence carries into the forecast and the marginal SD stays σ\sigma (with ρ=0\rho = 0 this is the iid sampling of JABBA’s fw_jabba()). procerr = "mean" uses only the conditional mean ρhdT\rho^h d_T and "none" deterministic production. Projection tables report the risk P(B<Blim)P(B < B_{lim}) with Blim=0.3BMSYB_{lim} = 0.3 B_{MSY} by default.

jbplot_projection(pj)

jbplot_projection() draws BMSYB_{MSY} and FMSYF_{MSY} (green), MSY on the catch panel, a biomass threshold bthr (orange, default 0.5BMSY0.5 B_{MSY}) and limit blim (red, default 0.3BMSY0.3 B_{MSY}). A name sets the label, e.g. bthr = c(Bpa = 0.5) (ICES) or bthr = c(MSST = 1 - M) (U.S.), NULL omits one, and extra adds further lines, e.g. extra = c(Flim = 1.3):

jbplot_projection(pj, bthr = c(MSST = 1 - 0.2), blim = NULL, extra = c(Flim = 1.3))

15.1 Projections on the advice plot

jbplot_advice(fit, proj = ) appends the projection scenarios (dashed) to the assessment advice plot:

jbplot_advice(fit, proj = pj)

15.2 Projection tables

jb3_projtable() gives a catch options table in the style of an ICES advice sheet: F/FMSYF/F_{MSY}, FF and the catch in the first projection year, the median B/BMSYB/B_{MSY} in selected years with the change relative to the terminal year, and the probabilities of B≥BMSYB \ge B_{MSY}, F≤FMSYF \le F_{MSY} and of the Kobe green quadrant.

knitr::kable(jb3_projtable(pj, years = c(2018, 2022, 2027)))
scenario F/Fmsy F Catch 2018 B/Bmsy 2018 dB% 2018 P(B>=Bmsy) 2018 P(B<Blim) 2018 P(F<=Fmsy) 2018 P(green) 2018 B/Bmsy 2022 dB% 2022 P(B>=Bmsy) 2022 P(B<Blim) 2022 P(F<=Fmsy) 2022 P(green) 2022 B/Bmsy 2027 dB% 2027 P(B>=Bmsy) 2027 P(B<Blim) 2027 P(F<=Fmsy) 2027 P(green) 2027
F/Fmsy = 0 0.00 0.0000 0 0.796 1.19 0.147 0 1 0.147 1.590 102.000 0.975 0 1 0.975 2.250 186.000 1.000 0 1 1.000
F/Fmsy = 0.5 0.50 0.0995 33300 0.796 1.19 0.147 0 1 0.147 1.210 54.200 0.827 0 1 0.827 1.480 88.300 0.976 0 1 0.976
F/Fmsy = 0.75 0.75 0.1490 49900 0.796 1.19 0.147 0 1 0.147 1.050 33.400 0.621 0 1 0.621 1.200 52.200 0.854 0 1 0.854
F/Fmsy = 1 1.00 0.1990 66500 0.796 1.19 0.147 0 1 0.147 0.906 15.200 0.276 0 1 0.276 0.970 23.300 0.395 0 1 0.395
F/Fmsy = 1.25 1.25 0.2490 83200 0.796 1.19 0.147 0 0 0.000 0.785 -0.296 0.072 0 0 0.000 0.782 -0.633 0.057 0 0 0.000

jb3_kobematrix() is the Kobe II strategy matrix (ICCAT): the probability of being in the green quadrant by scenario and year (what = "B" or "F" for one reference point only).

knitr::kable(jb3_kobematrix(pj))
F/Fmsy 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027
0.00 0.15 0.51 0.79 0.94 0.98 0.99 1.00 1.00 1.00 1.00
0.50 0.15 0.35 0.56 0.72 0.83 0.90 0.94 0.96 0.97 0.98
0.75 0.15 0.26 0.38 0.50 0.62 0.71 0.76 0.81 0.83 0.85
1.00 0.15 0.18 0.22 0.24 0.28 0.31 0.33 0.37 0.40 0.40
1.25 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00

15.3 Kobe II strategy matrices

The Kobe II strategy matrix (K2SM) gives, by management option (rows) and projection year (columns), the probability of meeting reference points. jb3_kobematrix() computes it from any projection, in the ICCAT format by default; jb3_kobematrix_iotc(), jb3_kobematrix_gfcm() and jb3_kobematrix_ices() give the IOTC, GFCM and ICES formats, and jbplot_kobematrix() plots them, shaded in grey as in the report tables (colours = "grey", default) or red to green (colours = "kobe"). All scenarios of a projection share the same process-error draws, so intermediate years are identical across rows and the probabilities change monotonically with the option. Each matrix below is computed from the projection plotted just before it.

15.3.1 Catch (TAC) options: ICCAT and IOTC

Constant catches of 60-130% of the catch in the last assessment year, after one intermediate year at the status quo catch (imp.years = 1):

cref <- tail(fit$data$catch, 1)
pt <- jb3_project(fit, catch = round(cref*seq(0.6, 1.3, 0.1), -2), nyears = 10, imp.years = 1)
jbplot_projection(pt)

The ICCAT matrices (a) P(F<FMSY)P(F < F_{MSY}), (b) P(B>BMSY)P(B > B_{MSY}) and (c) both (the green Kobe quadrant):

k2 <- jb3_kobematrix(pt, what = "all", percent = TRUE)
k2
#> a) Probability that F < Fmsy (%)
#>     TAC 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027
#>   46200   25   91   95   96   98   99   99   99   99   99
#>   53900   25   78   84   88   90   92   94   95   96   96
#>   61600   25   62   68   73   76   81   83   85   87   88
#>   69300   25   46   50   53   56   60   63   66   67   69
#>   77000   25   32   35   38   40   41   41   43   45   45
#>   84700   25   20   21   23   24   25   25   25   26   25
#>   92400   25   12   12   13   13   12   12   12   13   13
#>  100100   25    7    7    7    7    6    7    6    6    6
#> 
#> b) Probability that B > Bmsy (%)
#>     TAC 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027
#>   46200   15   19   33   46   58   70   79   84   86   90
#>   53900   15   19   30   42   51   61   68   75   79   82
#>   61600   15   19   28   37   44   50   56   61   66   70
#>   69300   15   19   24   31   36   41   44   49   51   54
#>   77000   15   19   22   25   30   31   32   36   37   39
#>   84700   15   19   20   21   22   24   23   24   25   26
#>   92400   15   19   18   17   17   16   15   16   15   15
#>  100100   15   19   16   14   13   12   11   10    9    9
#> 
#> c) Probability that F < Fmsy and B > Bmsy (%)
#>     TAC 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027
#>   46200   14   19   33   46   58   70   79   84   86   90
#>   53900   14   19   30   42   51   61   68   75   79   82
#>   61600   14   19   28   37   44   50   56   61   66   70
#>   69300   14   19   24   31   36   41   44   49   51   54
#>   77000   14   19   22   25   29   31   32   35   37   38
#>   84700   14   16   17   19   20   21   22   22   23   24
#>   92400   14   11   12   12   12   12   12   12   13   13
#>  100100   14    7    7    7    7    6    6    5    6    6
jbplot_kobematrix(pt)

what = "green" (default), "B" or "F" returns one matrix, and percent = FALSE proportions. Projections from several models (e.g. alternative production functions, or runs with and without the lag) are combined into one matrix with equal or given weights, as the ICCAT combined matrices of two base cases:

jb3_kobematrix(list(Fox = pt.fox, Schaefer = pt.sch), what = "all", percent = TRUE)

The IOTC format from the same projection: catch options relative to the reference catch, and the probability (%) of violating the MSY-based reference points, P(B<BMSY)P(B < B_{MSY}) and P(F>FMSY)P(F > F_{MSY}), and the limit reference points, P(B<Blim)P(B < B_{lim}) and P(F>Flim)P(F > F_{lim}) (defaults Blim=0.5BMSYB_{lim} = 0.5 B_{MSY}, Flim=1.3FMSYF_{lim} = 1.3 F_{MSY}; blim, flim), 3 and 10 years after the last assessment year (years):

kio <- jb3_kobematrix_iotc(pt, ref.catch = cref)
kio
#> Probability (%) of violating MSY-based reference points
#>  Reference point 60% (46,200t) 70% (53,900t) 80% (61,600t) 90% (69,300t) 100% (77,000t)
#>     B2020 < Bmsy          66.6          69.5          71.9          75.5           78.2
#>     F2020 > Fmsy           5.4          15.9          31.5          49.6           65.3
#>     B2027 < Bmsy           9.7          18.0          30.2          46.2           61.4
#>     F2027 > Fmsy           0.6           3.8          12.3          31.0           55.0
#>  110% (84,700t) 120% (92,400t) 130% (100,100t)
#>            80.5           82.3            83.9
#>            79.3           87.6            92.8
#>            73.9           84.6            91.2
#>            75.0           86.9            94.4
#> 
#> Probability (%) of violating limit reference points (Blim = 0.5 Bmsy; Flim = 1.3 Fmsy)
#>  Reference point 60% (46,200t) 70% (53,900t) 80% (61,600t) 90% (69,300t) 100% (77,000t)
#>     B2020 < Blim           1.9           2.3           2.6           3.2            4.2
#>     F2020 > Flim           1.1           2.9           9.1          19.3           32.7
#>     B2027 < Blim           0.2           0.8           2.7           7.3           16.9
#>     F2027 > Flim           0.2           0.8           5.8          15.4           35.4
#>  110% (84,700t) 120% (92,400t) 130% (100,100t)
#>             5.2            6.5             8.3
#>            48.0           61.7            73.0
#>            30.6           46.9            63.7
#>            56.8           75.2            87.0
jbplot_kobematrix(kio, colours = "kobe")

15.3.2 F options: GFCM and ICES

GFCM and ICES advice is usually based on F options. Named scenarios (scenarios in jb3_project()) are reported in the order and with the names given; each is one named value, with Catch, Fmsy (F/FMSY), F (harvest rate), Fsq or Csq (multipliers of the status quo).

F options relative to FMSYF_{MSY} (Fmsy = 0.8) apply F=0.8FMSYF = 0.8 F_{MSY} draw by draw, so P(F<FMSY)P(F < F_{MSY}) is 0 or 100%. As in the GFCM and ICES forecasts (e.g. SPiCT add.man.scenario(fabs = )), the F options are therefore set as absolute harvest rates from the point estimates of FMSYF_{MSY} and the current F (mean of the last three years): F=0F = 0, 0.5-2 FtgtF_{tgt} (Ftgt=FMSYF_{tgt} = F_{MSY}), FcurF_{cur}, and the precautionary FMSYF_{MSY} PA (35th percentile of FMSYF_{MSY}):

rp <- fit$refpts
Fmsy <- rp["Fmsy", "est"]
Fcur <- mean(tail(fit$ts$est[fit$ts$quant == "F"], 3))
Fmsy.pa <- exp(qnorm(0.35, log(Fmsy), rp["Fmsy", "se.log"]))
mult <- c(0, 0.5, 0.75, 1, 1.25, 1.5, 2)
fopt <- c(setNames(lapply(mult, function(m) c(F = m*Fmsy)),
                   c("F0", "0.5Ftgt", "0.75Ftgt", "Ftgt", "1.25Ftgt", "1.5Ftgt", "2Ftgt")),
          list(Fcur = c(F = Fcur), "Fmsy PA" = c(F = Fmsy.pa)))
pf <- jb3_project(fit, scenarios = fopt, nyears = 10, imp.years = 1)
jbplot_projection(pf)

With absolute F options, P(F<FMSY)P(F < F_{MSY}) is the probability that the option is below the uncertain FMSYF_{MSY}: 50% for FtgtF_{tgt}, so the joint probability of the green quadrant cannot exceed 50% at FtgtF_{tgt}, even where the median biomass is above BMSYB_{MSY}.

jb3_kobematrix_gfcm() gives the three matrices of the GFCM advice summary sheet: (a) P(F<FtgtP(F < F_{tgt} and B>Btgt)B > B_{tgt}), (b) P(B>Bthr)P(B > B_{thr}) and (c) the risk P(B<Blim)P(B < B_{lim}), with Btgt=BMSYB_{tgt} = B_{MSY}, Ftgt=FMSYF_{tgt} = F_{MSY}, Bthr=0.5BMSYB_{thr} = 0.5 B_{MSY} and Blim=0.3BMSYB_{lim} = 0.3 B_{MSY} by default (btgt, ftgt, bthr, blim):

kg <- jb3_kobematrix_gfcm(pf)
kg
#> a) Probability that F < Ftgt and B > Btgt (%)
#>  scenario 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027
#>        F0   14   19   51   79   92   97   98  100  100  100
#>   0.5Ftgt   14   19   37   55   69   80   84   89   90   92
#>  0.75Ftgt   14   17   29   40   50   56   62   66   68   70
#>      Ftgt   14   11   16   24   28   32   34   37   39   41
#>  1.25Ftgt   14    5    7   11   12   14   15   16   17   17
#>   1.5Ftgt   14    2    2    4    4    5    6    6    6    7
#>     2Ftgt   14    0    0    1    1    1    1    1    1    1
#>      Fcur   14    6    8   12   14   16   17   18   20   20
#>   Fmsy PA   14   14   22   30   38   43   45   48   50   52
#> 
#> b) Probability that B > Bthr (%)
#>  scenario 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027
#>        F0   98   97  100  100  100  100  100  100  100  100
#>   0.5Ftgt   98   97   99  100  100  100  100  100  100  100
#>  0.75Ftgt   98   97   99  100  100  100  100  100  100  100
#>      Ftgt   98   97   98   99   99   99   98   99   98   98
#>  1.25Ftgt   98   97   98   98   96   96   94   93   92   90
#>   1.5Ftgt   98   97   97   94   91   87   83   79   75   73
#>     2Ftgt   98   97   91   77   61   51   44   39   38   36
#>      Fcur   98   97   98   98   97   97   96   94   93   92
#>   Fmsy PA   98   97   99  100   99   99   99  100  100   99
#> 
#> c) Probability that B < Blim (%)
#>  scenario 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027
#>        F0    0    0    0    0    0    0    0    0    0    0
#>   0.5Ftgt    0    0    0    0    0    0    0    0    0    0
#>  0.75Ftgt    0    0    0    0    0    0    0    0    0    0
#>      Ftgt    0    0    0    0    0    0    0    0    0    0
#>  1.25Ftgt    0    0    0    0    0    0    0    0    0    0
#>   1.5Ftgt    0    0    0    0    0    0    0    1    1    3
#>     2Ftgt    0    0    0    0    2    5   10   15   20   24
#>      Fcur    0    0    0    0    0    0    0    0    0    0
#>   Fmsy PA    0    0    0    0    0    0    0    0    0    0

Probabilities are shaded darker (greener) the higher they are, risks darker (redder) the higher the risk, on finer classes (risk.breaks):

jbplot_kobematrix(kg, colours = "kobe")

For ICES-type advice, jb3_kobematrix_ices() gives (a) P(F<FMSYP(F < F_{MSY} and B>Bpa)B > B_{pa}) and (b) the risk P(B<Blim)P(B < B_{lim}), to compare with the ICES 5% threshold, with the SPM proxies Bpa=0.5BMSYB_{pa} = 0.5 B_{MSY} and Blim=0.3BMSYB_{lim} = 0.3 B_{MSY} (bpa, blim):

jb3_kobematrix_ices(pf)

Other combinations follow from jb3_kobematrix() with bref and fref (multiples of BMSYB_{MSY} and FMSYF_{MSY}, optionally named; NULL drops one) and risk = TRUE for the complement, e.g. jb3_kobematrix(pf, what = "all", bref = c(Btrigger = 0.5)).

15.4 Short-term advice with a hockey-stick HCR

Short-term advice under a harvest control rule (as in the GFCM Type 1 management procedure with JABBA’s fw_jabba_ctrl() and jb_hockeystick()) takes three steps: a forecast with intermediate years at the status quo catch followed by FtgtF_{tgt}, the hockey-stick rule applied to B/BMSYB/B_{MSY} in the first implementation (TAC) year to obtain the advised FadvF_{adv}, and the forecast of the management options.

Forecast controls (jb3_fwd(), as fw_jabba_ctrl()) are data frames with one row per year and quant "Catch", "Fmsy" (F/FMSY), "F", "Csq", "Fsq" or "HCR"; here two intermediate years at the status quo catch (mean of the last three years) and two TAC years:

y0  <- max(fit$years)
yrs <- y0 + 1:4
csq <- mean(tail(fit$data$catch, 3))
fsq <- mean(tail(fit$ts$est[fit$ts$quant == "F/Fmsy"], 3))
ctrl <- function(v, q) data.frame(year = yrs, value = c(csq, csq, v, v), quant = c("Catch", "Catch", q, q))
ctrl(1, "Fmsy")
#>   year    value quant
#> 1 2018 79020.93 Catch
#> 2 2019 79020.93 Catch
#> 3 2020     1.00  Fmsy
#> 4 2021     1.00  Fmsy

jb3_hcr() evaluates the rule (F/FMSY=FtgtF/F_{MSY} = F_{tgt} above BtriggerB_{trigger}, decreasing linearly below) on B/BMSYB/B_{MSY} in the TAC year of the FtgtF_{tgt} forecast. Bigeye is well above the GFCM default Btrigger=0.5BMSYB_{trigger} = 0.5 B_{MSY}, where the rule hardly changes F; to illustrate the rule, the example uses Btrigger=0.8BMSYB_{trigger} = 0.8 B_{MSY}:

hcr <- jb3_hcr(jb3_fwd(fit, list(Ftgt = ctrl(1, "Fmsy"))), ftgt = 1, btrigger = 0.8, blim = 0.3)
hcr
#> Hockey-stick HCR (Ftgt 1.00 Fmsy, Btrigger 0.80 Bmsy) in 2020: B/Bmsy median 0.812, P(B < Btrigger) 0.47
#>   F_adv/Fmsy: 1.000 (median B), 0.911 (precautionary, across draws) -> 0.911
jbplot_hcr(hcr)
Hockey-stick HCR (black line: F/Fmsy against B/Bmsy) with Blim, Btrigger and Bmsy. The blue density is the projected B/Bmsy at the start of the TAC year: each draw is projected from its terminal-year estimate through the intermediate years at the status quo catch, with process error, so the distribution is wider than the current-state posterior. The point is its median and the horizontal bar its 90% interval, drawn at the height of the advised F (F_adv, precautionary: the rule averaged over all draws).

Hockey-stick HCR (black line: F/Fmsy against B/Bmsy) with Blim, Btrigger and Bmsy. The blue density is the projected B/Bmsy at the start of the TAC year: each draw is projected from its terminal-year estimate through the intermediate years at the status quo catch, with process error, so the distribution is wider than the current-state posterior. The point is its median and the horizontal bar its 90% interval, drawn at the height of the advised F (F_adv, precautionary: the rule averaged over all draws).

The distribution in the plot is not the current state: it is B/BMSYB/B_{MSY} at the start of the TAC year, projected from each draw’s terminal-year estimate through the intermediate years, and so includes their process error. The rule can be evaluated in another forecast year with year, e.g. jb3_hcr(fwd, year = y0 + 1) for the year after the assessment.

15.4.1 Why FadvF_{adv} is below FtgtF_{tgt} when the median is above BtriggerB_{trigger}

jb3_hcr() offers two ways of turning the uncertain B/BMSYB/B_{MSY} into one advised F:

  • Deterministic (uncertainty = FALSE, Fadv.det): the rule is applied once, to the median B/BMSYB/B_{MSY}. Here the median is above BtriggerB_{trigger}, so Fadv=FtgtF_{adv} = F_{tgt}.
  • Precautionary (uncertainty = TRUE, the default, Fadv.pa; as JABBA’s jb_hockeystick(uncertainty = TRUE)): the rule is applied to every draw, and the advised F is the mean of the resulting F values, Fadv=1n∑iHCR(Bi/BMSY)F_{adv} = \frac{1}{n}\sum_i HCR(B_i/B_{MSY}). This is an expectation over the draws, not a fractile of B/BMSYB/B_{MSY}.

Draws above BtriggerB_{trigger} get FtgtF_{tgt}; draws below it get a reduced F, Ftgt(Bi/BMSY)/BtriggerF_{tgt} (B_i/B_{MSY})/B_{trigger} (with bclose = 0). Because the rule is capped at FtgtF_{tgt}, uncertainty can only pull the mean down: the precautionary FadvF_{adv} is never above the deterministic one, and it drops below FtgtF_{tgt} as soon as a share of the draws falls below BtriggerB_{trigger}, even when the median is above it. The decomposition:

bt <- 0.8
f.i <- JABBA3:::.hockey(hcr$b, ftgt = 1, btrigger = bt, bclose = 0, fmin = 0.001)   # F/Fmsy for each draw
below <- hcr$b < bt
data.frame(`median B/Bmsy` = median(hcr$b),
           `P(B < Btrigger)` = mean(below),
           `mean F, draws below` = mean(f.i[below]),
           `mean F, draws above` = mean(f.i[!below]),
           `Fadv.det` = hcr$Fadv.det,
           `Fadv.pa` = hcr$Fadv.pa, check.names = FALSE)
#>   median B/Bmsy P(B < Btrigger) mean F, draws below mean F, draws above Fadv.det   Fadv.pa
#> 1     0.8117593           0.473           0.8111542                   1        1 0.9106759

so Fadv=P(B<Btrigger)×F‾below+(1−P(B<Btrigger))×FtgtF_{adv} = P(B < B_{trigger}) \times \bar F_{below} + (1 - P(B < B_{trigger})) \times F_{tgt}. The wider the distribution of B/BMSYB/B_{MSY} in the TAC year (larger estimation uncertainty, process error, longer intermediate period), the larger the precautionary reduction. With Btrigger=0.5BMSYB_{trigger} = 0.5 B_{MSY} only a few draws are below the trigger and FadvF_{adv} stays close to FtgtF_{tgt} (jb3_hcr(..., btrigger = 0.5)$Fadv).

15.4.2 Management options

The options with FadvF_{adv}, FtgtF_{tgt}, FsqF_{sq}, CsqC_{sq} and F=0F = 0 in the TAC years, with BtriggerB_{trigger} marked on the biomass panel:

fc <- list(Fadv = ctrl(hcr$Fadv, "Fmsy"), Ftgt = ctrl(1, "Fmsy"), Fsq = ctrl(fsq, "Fmsy"),
           Csq = ctrl(csq, "Catch"), F0 = ctrl(0, "Fmsy"))
stf <- jb3_fwd(fit, fc)
jbplot_projection(stf, bthr = c(Btrigger = bt))

jb3_fwdtable() summarises the fishing opportunities in the GFCM format (as FLRef::fwd2type1()): the catch and F/FtgtF/F_{tgt} in the TAC year yy, the biomass response at the start of the following year y+1y+1 (start-of-year biomass, By+1=By+P(By)−CyB_{y+1} = B_y + P(B_y) - C_y), its change relative to By−1B_{y-1}, and the probabilities of being above BlimB_{lim}, BpaB_{pa} (here BtriggerB_{trigger}, bthr) and BtgtB_{tgt}:

knitr::kable(jb3_fwdtable(stf, bthr = bt))
Basis C 2020 F/Ftgt 2020 B/Btgt 2021 B change P(B>Blim) P(B>Bpa) P(B>Btgt)
Fadv 61423 0.911 0.860 6.1 99.9 61.2 25.7
Ftgt 67448 1.000 0.844 4.1 99.9 59.1 22.7
Fsq 81046 1.202 0.809 -0.1 99.9 51.8 16.9
Csq 79021 1.172 0.822 1.4 99.1 52.1 24.2
F0 0 0.000 1.009 24.5 100.0 80.8 51.9

Alternatively, quant = "HCR" applies the rule draw by draw in every projection year (value = FtgtF_{tgt}, rule settings in hcr), e.g. for a medium-term projection under the rule:

hcr.ctrl <- data.frame(year = y0 + 1:10, value = c(csq, csq, rep(1, 8)),
                       quant = c("Catch", "Catch", rep("HCR", 8)))
pm <- jb3_fwd(fit, list(HCR = hcr.ctrl), hcr = list(btrigger = bt))
jbplot_projection(pm, bthr = c(Btrigger = bt))

For a weighted ensemble, pass a jb3_ensemble() instead of the single fit; the steps are the same.

Constant catch scenarios remain available, e.g. for TAC options:

pc <- jb3_project(rec, catch = c(60000, 70000, 80000), nyears = 10)
knitr::kable(jb3_projtable(pc)[, 1:9])
scenario F/Fmsy F Catch 2018 B/Bmsy 2018 dB% 2018 P(B>=Bmsy) 2018 P(B<Blim) 2018 P(F<=Fmsy) 2018
Catch = 60000 0.796 0.153 60000 0.808 2.53 0.27 0.001 0.718
Catch = 70000 0.929 0.178 70000 0.808 2.53 0.27 0.001 0.570
Catch = 80000 1.060 0.204 80000 0.808 2.53 0.27 0.001 0.436

16 Comparing runs and risk

16.1 Ensembles and sensitivity runs

jbplot_ensemble() compares a list of fits (scenarios, sensitivity runs, the steps of a workflow), as JABBA’s plot of the same name: trajectories coloured by run and a Kobe plot with each run’s terminal uncertainty and its median. With joint = TRUE the runs are pooled with equal weights into one ensemble.

fsch <- jabba3(d, jb3_priors(d, r = c(0.2, 0.5)), jb3_model(shape = "schaefer"), osa = FALSE)
runs <- list(Fox = fit, Schaefer = fsch, `Lag + AR(1)` = rec)
jbplot_ensemble(runs)

jbplot_ensemble(runs, joint = TRUE)

jbplot_summary() gives the overview of JABBA’s jbplot_summary(): B, F, B/BMSYB/B_{MSY}, F/FMSYF/F_{MSY} and B/KB/K by run, and the production curves with BMSYB_{MSY} and MSY.

jbplot_summary(runs)

16.1.1 Sensitivity runs with update()

A fit stores its data, priors, model and settings, so update() refits it with only the inputs that change. Priors and model options are changed by name, with the arguments of jb3_priors() and jb3_model(); all other inputs and settings (engine, draws, OSA, workflow) are taken from the fit. With lapply() a sensitivity analysis takes one line per factor:

sens.r <- lapply(c(0.1, 0.2, 0.4), function(r)
  update(fit, priors = list(r = c(r, 0.5)), run = paste("r =", r)))
sens.sdb <- lapply(c(0.05, 0.1, 0.2), function(s)
  update(fit, priors = list(sdb = c(s, 0.3)), run = paste("sdb =", s)))
names(sens.r)   <- sapply(sens.r, `[[`, "run")
names(sens.sdb) <- sapply(sens.sdb, `[[`, "run")
t(sapply(c(sens.r, sens.sdb), function(f){
  s <- f$ts[f$ts$year == max(f$years) & f$ts$quant %in% c("B/Bmsy", "F/Fmsy"), ]
  stats::setNames(round(s$est, 2), s$quant) }))
#>            B/Bmsy F/Fmsy
#> r = 0.1      0.78   1.23
#> r = 0.2      0.79   1.17
#> r = 0.4      0.80   1.13
#> sdb = 0.05   0.74   1.30
#> sdb = 0.1    0.77   1.23
#> sdb = 0.2    0.80   1.15
jbplot_ensemble(sens.r)

Some priors are derived from others when jb3_priors() is called: the FishLife prior on the process-error SD (sdb) and the default kdyn from r, and the default K from the catch. By default update() changes only the priors that are named, so the r runs above keep the sdb prior of the base fit. Dependent priors can be set explicitly (priors = list(r = c(0.4, 0.5), sdb = c(0.15, 0.3))), or re-derived from the new values with recompute = TRUE:

fr <- update(fit, priors = list(r = c(0.4, 0.5)), recompute = TRUE)
rbind(base = fit$priors$sdb, `r = 0.4` = sens.r[[3]]$priors$sdb, `r = 0.4, recompute` = fr$priors$sdb)
#>                        median log.sd on
#> base               0.08101641    0.3  1
#> r = 0.4            0.08101641    0.3  1
#> r = 0.4, recompute 0.16203281    0.3  1

The same works for model options, the workflow and the engine, e.g. a final NUTS run of the selected configuration:

update(fit, model = list(lag = 3, rho = 0.75), run = "lag + AR(1)")   # model options
update(fit, workflow = "tier1", amat = 3)                             # rerun as a workflow
update(fit, engine = "nuts", nuts = list(iter = 2000))                # same inputs, NUTS
update(fit, data = d.new)                                             # new data, same settings

kobe = FALSE drops the Kobe panel in jbplot_summary() and jbplot_ensemble(). jabbaplot3() takes a list of runs too, with a choice of panels:

jabbaplot3(runs, panels = c("B/Bmsy", "F/Fmsy", "Catch", "kobe", "production", "procdev"))

16.1.2 Weighted ensemble

jb3_ensemble() combines the runs into one weighted ensemble, as the GFCM/ICCAT JABBA ensembles: each run contributes a number of draws proportional to its weight, and the joint draws give the ensemble trajectories, reference points and status. jb3_weights() scores each run on diagnostics (convergence, runs tests, RMSE, and optionally hindcast MASE and Mohn’s rho with hindcast and retro); weight = "equal" gives equal weights:

w <- jb3_weights(runs)
w
#>           run converged  runs rmse mase mohn score    weight
#> 1         Fox      TRUE FALSE TRUE   NA   NA   0.5 0.3333333
#> 2    Schaefer      TRUE FALSE TRUE   NA   NA   0.5 0.3333333
#> 3 Lag + AR(1)      TRUE FALSE TRUE   NA   NA   0.5 0.3333333
ens <- jb3_ensemble(runs, weights = w$weight)
ens
#> JABBA3 ensemble of 3 runs, 3000 draws
#>          run weight draws
#>          Fox  0.333  1000
#>     Schaefer  0.333  1000
#>  Lag + AR(1)  0.333  1000
#>   status 2017 : B/Bmsy 0.726  F/Fmsy 1.224

The ensemble behaves like a fit in the plots, tables and projections:

jbplot_ensemble(ens)

16.1.3 Short-term advice with the HCR (GFCM)

jb3_fwd() and jb3_hcr() take the ensemble as they take a single fit (chapter Projections): each member’s own model (production function, lag, AR(1) process error) is projected on its share of the draws, so the forecast carries the structural uncertainty between the runs. As in the GFCM Type 1 management procedure: two intermediate years at the status quo catch, the hockey-stick rule (Btrigger=Bthr=0.5BMSYB_{trigger} = B_{thr} = 0.5 B_{MSY}) applied to the ensemble B/BMSYB/B_{MSY} in the TAC year, and the fishing opportunities for FadvF_{adv}, FtgtF_{tgt}, FsqF_{sq}, CsqC_{sq} and F=0F = 0:

y0  <- max(ens$years)
yrs <- y0 + 1:4
csq <- mean(tail(fit$data$catch, 3))
fsq <- mean(tail(ens$ts$est[ens$ts$quant == "F/Fmsy"], 3))
ctrl <- function(v, q) data.frame(year = yrs, value = c(csq, csq, v, v), quant = c("Catch", "Catch", q, q))
hcr.ens <- jb3_hcr(jb3_fwd(ens, list(Ftgt = ctrl(1, "Fmsy"))), ftgt = 1, btrigger = 0.5, blim = 0.3)
hcr.ens
#> Hockey-stick HCR (Ftgt 1.00 Fmsy, Btrigger 0.50 Bmsy) in 2020: B/Bmsy median 0.744, P(B < Btrigger) 0.12
#>   F_adv/Fmsy: 1.000 (median B), 0.980 (precautionary, across draws) -> 0.980
jbplot_hcr(hcr.ens)

fc.ens <- list(Fadv = ctrl(hcr.ens$Fadv, "Fmsy"), Ftgt = ctrl(1, "Fmsy"), Fsq = ctrl(fsq, "Fmsy"),
               Csq = ctrl(csq, "Catch"), F0 = ctrl(0, "Fmsy"))
stf.ens <- jb3_fwd(ens, fc.ens)
jbplot_projection(stf.ens)

The fishing opportunities table gives the catch and F in the TAC year yy and the biomass response at the start of the following year y+1y+1 (osa = TRUE, the default): the biomass is the start-of-year biomass, By+1=By+P(By)−CyB_{y+1} = B_y + P(B_y) - C_y, so the effect of the TAC in yy appears in By+1B_{y+1}. The change in biomass is By+1B_{y+1} relative to By−1B_{y-1}, the start of the last intermediate year, as in FLRef::fwd2type1():

knitr::kable(jb3_fwdtable(stf.ens))
Basis C 2020 F/Ftgt 2020 B/Btgt 2021 B change P(B>Blim) P(B>Bpa) P(B>Btgt)
Fadv 62869 0.980 0.783 5.4 99.8 92.2 21.7
Ftgt 64127 1.000 0.780 5.1 99.8 92.1 21.5
Fsq 80609 1.257 0.743 0.0 99.7 90.6 16.4
Csq 79021 1.232 0.747 0.5 98.2 85.4 22.7
F0 0 0.000 0.919 23.7 99.9 96.1 39.3

16.1.4 Long-term TAC projections

For the medium- to long-term consequences of TAC levels, catch scenarios as multiples of the current catch (Csq, mean of the last three years), with three intermediate years at the current catch and a horizon of about two generation times:

cr <- seq(0, 1.6, 0.2)
prjens <- jb3_project(ens, scenarios = setNames(lapply(cr, function(m) c(Csq = m)), paste0(100*cr, "% Csq")),
                      nyears = 31, imp.years = 3)
jbplot_projection(prjens, type = c("B/Bmsy", "Catch"))

Catches above the surplus production deplete the stock in the long term; the projected catch is capped at 95% of the biomass, so the catch falls once the stock is depleted. The Kobe matrices take the ensemble projection in the same way as a single fit, e.g. jb3_kobematrix(prjens, what = "all", percent = TRUE).

16.2 Risk curves

jbplot_crisk() plots, as JABBA’s jbplot_Crisk(), the probability that B<BMSYB < B_{MSY}, that F>FMSYF > F_{MSY} and that B<0.5BMSYB < 0.5 B_{MSY} (bfrac) against the scenario value (catch or F/FMSY), one line per projection year. It takes any projection with several catch or F scenarios, of a single fit (e.g. jbplot_crisk(pj) for the F/FMSY scenarios of the chapter Projections) or of an ensemble. The catch level at which a risk curve crosses a chosen probability (e.g. 0.5, or a lower risk tolerance) in a given year is the corresponding catch advice.

16.2.1 U.S. advice: risk plots with MSST

Risk plots of this kind support U.S. advice (NOAA, SEDAR assessments), where the biomass limit is the minimum stock size threshold, e.g. MSST=(1−M)BMSYMSST = (1 - M) B_{MSY} as in the JABBA assessment of great hammerhead for SEDAR 77 (SEDAR 2024). A named bfrac labels the panel, and x = "ratio" shows the catch relative to the current catch, as type = "ratio" in JABBA’s fw_jabba(). For the ensemble projection:

M <- 0.3                                          # natural mortality (illustrative)
jbplot_crisk(prjens, years = seq(2025, 2045, 5), bfrac = c(MSST = 1 - M), x = "ratio")

MSST can also be drawn on the projection plot, jbplot_projection(prjens, bthr = c(MSST = 1 - M), blim = NULL).

17 The rebuilding protocol: Atlantic blue marlin

Bigeye tuna is the standard example of this guide. This chapter is the more complex one: it introduces the BioProcDyn rebuilding protocol on a stock where it matters. The 2018 ICCAT assessment of Atlantic blue marlin (Makaira nigricans) used JABBA and Stock Synthesis (SS3), and the two differed markedly in how fast the stock was projected to rebuild. This chapter reproduces the 2018 JABBA base case, applies the BioProcDyn protocol step by step (life-history process error prior, production lag, persistent AR(1) process error) and compares status, diagnostics and forecasts.

17.1 The 2018 base case

The 2018 base case was a Pella-Tomlinson model with BMSY/K=0.36B_{MSY}/K = 0.36, an r prior of 0.098 (CV 0.18), an uninformative K prior, initial depletion near unfished, ten CPUE indices with an additional observation error of 0.25, and the process error fixed at σ=0.07\sigma = 0.07 and process deviations starting with the first index year. In JABBA3 (the additional observation variance is estimated by index):

bum <- iccat$bum
d.bum  <- jb3_data(bum$catch, bum$cpue, bum$se, stock = "bum")
pr.bum <- jb3_priors(d.bum, r = c(0.098, 0.18), K = c(50000, sqrt(log(1 + 2^2))),
                     bkinit = c(1, sqrt(log(1 + 0.25^2))))
m.base <- jb3_model(shape = "pella", BmsyK = 0.36, sdb.fixed = 0.07, start = "index")
bum.base <- jabba3(d.bum, pr.bum, m.base, run = "2018 base")
bum.base
#> JABBA3 fit: 2018 base ( bum )  engine: rtmb  
#>   model: pella    
#>   convergence: ok (max gradient 1.3e-09, Newton decrement 1.0e-20)
#>   estimates (mode, 95% CI):
#>             est      lci      uci
#> K      9.15e+04 6.83e+04 1.22e+05
#> r      9.47e-02 6.99e-02 1.28e-01
#> bkinit 1.22e+00 1.11e+00 1.35e+00
#> sdb    7.00e-02       NA       NA
#> q1     1.58e-05 1.13e-05 2.21e-05
#> q2     1.60e-05 1.03e-05 2.48e-05
#> q3     3.07e-05 2.11e-05 4.45e-05
#> q4     3.43e-05 2.31e-05 5.09e-05
#> q5     2.57e-05 1.63e-05 4.07e-05
#> q6     2.91e-05 1.79e-05 4.73e-05
#> q7     1.55e-05 1.03e-05 2.33e-05
#> q8     2.54e-05 1.74e-05 3.72e-05
#> q9     3.42e-05 2.24e-05 5.23e-05
#> q10    2.43e-05 1.14e-05 5.16e-05
#> sdi1   1.20e-01 7.17e-02 2.00e-01
#> sdi2   6.65e-01 4.82e-01 9.17e-01
#> sdi3   1.86e-01 9.70e-02 3.56e-01
#> sdi4   2.10e-01 1.29e-01 3.43e-01
#> sdi5   2.12e-01 5.04e-02 8.92e-01
#> sdi6   6.46e-01 4.60e-01 9.08e-01
#> sdi7   6.55e-01 4.94e-01 8.67e-01
#> sdi8   4.04e-01 2.88e-01 5.68e-01
#> sdi9   1.61e-01 1.81e-02 1.42e+00
#> sdi10  9.92e-01 8.20e-01 1.20e+00
#> m      9.58e-01       NA       NA
#> Bmsy   3.29e+04 2.46e+04 4.41e+04
#> Fmsy   9.89e-02 7.30e-02 1.34e-01
#> MSY    3.25e+03 2.70e+03 3.93e+03
#>   status 2016: B/Bmsy 0.78 (0.55-1.13), F/Fmsy 0.80 (0.49-1.29)

The same fit follows from the original JABBA input with the converter (jbinput2jabba3(), chapter Converting from JABBA and SPiCT):

jb.bum <- JABBA::build_jabba(catch = bum$catch, cpue = bum$cpue, se = bum$se,
  assessment = "BUM", scenario = "2018 base", model.type = "Pella", BmsyK = 0.36,
  K.prior = c(50000, 2), r.prior = c(0.098, 0.18), psi.prior = c(1, 0.25),
  fixed.obsE = 0.25, proc.dev.all = FALSE, sigma.proc = 0.07, verbose = FALSE)
x.bum <- jbinput2jabba3(jb.bum, keep.igamma = TRUE)
bum.base <- jabba3(x.bum$data, x.bum$priors, x.bum$model, run = "2018 base")
plot(bum.base)

The fit is close to the 2018 JAGS assessment. Note the process deviations: with σ\sigma fixed at a low value they form long runs of the same sign, a lag-1 autocorrelation of

pd <- bum.base$ts$est[bum.base$ts$quant == "Process deviation"]
round(acf(pd, plot = FALSE)$acf[2], 2)
#> [1] 0.78

This is the persistence that the BioProcDyn simulations identify as the source of rebuilding optimism: a model with independent process error absorbs the persistent part of the production anomalies into r and K.

17.2 Joint versus separate indices

Chapter Data exploration combined the ten indices into one joint index (bum.joint) and found some conflicts among them. Does it matter for the assessment whether the production model is fitted to the ten separate indices or to the joint index? Same priors and settings, the joint index with its own log-scale SE:

if(!exists("bum.joint")) bum.joint <- jb3_jointindex(jb3_trend(bum$cpue, bum$se))
d.joint  <- jb3_data(bum$catch, bum.joint, stock = "bum")
pr.joint <- jb3_priors(d.joint, r = c(0.098, 0.18), K = c(50000, sqrt(log(1 + 2^2))),
                       bkinit = c(1, sqrt(log(1 + 0.25^2))))
bum.ji <- jabba3(d.joint, pr.joint, m.base, run = "joint index")
bum.js <- list(`10 indices` = bum.base, `joint index` = bum.ji)
pt <- jb3_partable(bum.js, format = "wide")
knitr::kable(pt[pt$Parameter %in% c("K", "r", "MSY", "B/Bmsy", "F/Fmsy"), ], row.names = FALSE)
Parameter 10 indices joint index
K 91,500 (68,300-122,000) 93,100 (69,400-125,000)
r 0.0947 (0.0699-0.128) 0.0935 (0.069-0.127)
MSY 3,250 (2,700-3,930) 3,270 (2,710-3,960)
B/Bmsy 0.784 (0.545-1.13) 0.775 (0.572-1.05)
F/Fmsy 0.798 (0.494-1.29) 0.803 (0.52-1.24)
jabbaplot3(bum.js, panels = c("B/Bmsy", "F/Fmsy", "kobe", "spdyn"))

patchwork::wrap_plots(jbplot_fits(bum.ji), jbplot_runs(bum.ji), ncol = 2)

dg <- lapply(bum.js, jb3_diags)
knitr::kable(do.call(rbind, lapply(names(dg), function(n) data.frame(run = n, dg[[n]][, c("index", "n", "RMSE", "SDNR", "runs.p", "flag")]))),
             digits = 3, row.names = FALSE, caption = "Residual diagnostics (OSA residuals) by index")
Residual diagnostics (OSA residuals) by index
run index n RMSE SDNR runs.p flag
10 indices JAP.LL.hist 40 0.226 1.108 0.100 FALSE
10 indices VEN.Rec 40 0.718 1.008 0.002 TRUE
10 indices TAI.1st 22 0.684 0.991 0.001 TRUE
10 indices BRA.LL 28 0.453 1.053 0.389 FALSE
10 indices TAI.2nd 8 0.190 1.151 0.015 TRUE
10 indices VEN.LL 19 0.444 0.663 0.002 TRUE
10 indices VEN.GIL 22 0.620 0.910 0.391 TRUE
10 indices USA.LL 24 0.240 1.026 0.500 FALSE
10 indices BRA.Rec 19 0.692 1.130 0.598 FALSE
10 indices GHA.GIL 10 1.055 1.074 0.004 TRUE
joint index joint 58 0.199 1.087 0.020 TRUE

Status, reference points and productivity are practically the same: B/BMSYB/B_{MSY} in 2016 of about 0.78 and F/FMSYF/F_{MSY} of 0.80 with either input, and the joint index gives a slightly narrower interval for B/BMSYB/B_{MSY}. The ten indices carry one common signal, and the production model extracts the same signal from the joint index. The separate fit flags six of the ten indices on their residual diagnostics; the joint index has a small RMSE (0.20) but its OSA residuals still fail the runs test (p = 0.02), which reflects the low fixed process error of the base case rather than conflict among indices.

The rest of this chapter continues with the ten separate indices, as in the 2018 assessment: each index keeps its own catchability and observation variance, and the diagnostics can still point to individual series. The joint index is a useful check on the combined signal and a simpler alternative where the separate indices are numerous and short.

17.3 Applying the protocol

Three steps, each added to the previous one:

  1. Life-history prior on the process error scale (the JABBA3 default, σLH=σRmin(0.9HMSY,1.15)\sigma_{LH} = \sigma_R \min(0.9\,H_{MSY}, 1.15) at the 2.5th percentile) instead of the fixed σ=0.07\sigma = 0.07;
  2. production lag at the age at maturity (here 3 years);
  3. AR(1) process deviations with ρ=0.75\rho = 0.75 (the default; blue marlin falls in the 6-10 year generation-time class of jb3_rho_table()).
# pr.bum already carries the life-history sdb prior (default); the base case fixed sdb in the model
mod <- function(lag = 0, rho = 0) jb3_model(shape = "pella", BmsyK = 0.36, start = "index", lag = lag, rho = rho)
bum.runs <- list(
  `2018 base`     = bum.base,
  `sdb prior`     = jabba3(d.bum, pr.bum, mod(),        run = "sdb prior"),
  `+ lag`         = jabba3(d.bum, pr.bum, mod(3),       run = "+ lag"),
  `+ lag + AR(1)` = jabba3(d.bum, pr.bum, mod(3, 0.75), run = "+ lag + AR(1)"))
pt <- jb3_partable(bum.runs, format = "wide")
knitr::kable(pt[pt$Parameter %in% c("K", "r", "Bmsy", "Fmsy", "MSY", "sigma.proc", "rho", "B/Bmsy", "F/Fmsy"), ], row.names = FALSE)
Parameter 2018 base sdb prior + lag + lag + AR(1)
K 91,500 (68,300-122,000) 92,400 (64,800-132,000) 95,200 (67,600-134,000) 94,300 (59,300-150,000)
r 0.0947 (0.0699-0.128) 0.0979 (0.0708-0.135) 0.0966 (0.0707-0.132) 0.102 (0.0731-0.143)
Bmsy 32,900 (24,600-44,100) 33,200 (23,300-47,400) 34,300 (24,300-48,200) 34,000 (21,300-54,100)
Fmsy 0.0989 (0.073-0.134) 0.102 (0.0739-0.141) 0.101 (0.0738-0.138) 0.107 (0.0764-0.149)
MSY 3,250 (2,700-3,930) 3,400 (2,620-4,400) 3,460 (2,690-4,440) 3,630 (2,440-5,390)
sigma.proc 0.07 0.119 (0.0847-0.167) 0.116 (0.0808-0.166) 0.0881 (0.0571-0.136)
rho 0 0 0 0.75
B/Bmsy 0.784 (0.545-1.13) 0.643 (0.429-0.964) 0.62 (0.41-0.939) 0.469 (0.246-0.896)
F/Fmsy 0.798 (0.494-1.29) 0.932 (0.549-1.58) 0.95 (0.56-1.61) 1.2 (0.624-2.29)
jabbaplot3(bum.runs, panels = c("B/Bmsy", "F/Fmsy", "Catch", "kobe", "spdyn", "procdev"))

Each step lowers the estimated status. The base case had B/BMSY≈0.8B/B_{MSY} \approx 0.8 in 2016; with the life-history prior, the lag and persistent process error the estimate is about 0.45, with F>FMSYF > F_{MSY}.

17.4 Diagnostics

Retrospective patterns and index prediction skill do not distinguish the runs; both are acceptable in all of them. As in the simulations, the standard diagnostics cannot tell whether a model is optimistic about rebuilding.

bum.hc <- lapply(bum.runs, jb3_hindcast, n = 5)
bum.rt <- lapply(bum.runs, jb3_retro, n = 5)
mase <- sapply(bum.hc, function(h){ m <- h$mase; stats::setNames(m$MASE, m$index)[is.finite(m$MASE)] })
mohn <- sapply(bum.rt, function(r) stats::setNames(r$rho$rho, r$rho$quant))
knitr::kable(round(rbind(mase, mohn[c("B/Bmsy", "F/Fmsy"), , drop = FALSE]), 2),
             caption = "Hindcast MASE by index and Mohn's rho")
Hindcast MASE by index and Mohn’s rho
2018 base sdb prior + lag + lag + AR(1)
BRA.Rec 0.56 0.57 0.56 0.56
USA.LL 0.87 0.89 0.89 0.93
VEN.GIL 0.40 0.23 0.24 0.09
B/Bmsy 0.09 0.09 0.09 0.09
F/Fmsy -0.11 -0.11 -0.11 -0.11

Hindcasts for the two indices that extend to the end of the series and dominate the recent trend (US and Brazilian recreational/longline CPUE), for the 2018 base case and the protocol:

patchwork::wrap_plots(
  jbplot_hcxval(bum.hc$`2018 base`, indices = c("USA.LL", "BRA.Rec"), ncol = 1) + ggplot2::ggtitle("2018 base"),
  jbplot_hcxval(bum.hc$`+ lag + AR(1)`, indices = c("USA.LL", "BRA.Rec"), ncol = 1) + ggplot2::ggtitle("Lag + AR(1) protocol"),
  ncol = 2)

17.5 Forecasts

The runs differ most in their forecasts. Constant-catch projections of 1500, 2000 and 2500 t, with the AR(1) process continued from the last estimated deviation in the persistent model:

bum.pc <- lapply(bum.runs[c("2018 base", "+ lag + AR(1)")], jb3_project,
                 catch = c(1500, 2000, 2500), nyears = 10)
lapply(bum.pc, function(p) knitr::kable(jb3_kobematrix(p)[, c(1, 2, 4, 6, 11)],
       caption = "P(green) by year"))
#> $`2018 base`
#> 
#> 
#> Table: P(green) by year
#> 
#> |  TAC| 2017| 2019| 2021| 2026|
#> |----:|----:|----:|----:|----:|
#> | 1500| 0.13| 0.33| 0.55| 0.86|
#> | 2000| 0.13| 0.28| 0.43| 0.71|
#> | 2500| 0.13| 0.24| 0.33| 0.50|
#> 
#> $`+ lag + AR(1)`
#> 
#> 
#> Table: P(green) by year
#> 
#> |  TAC| 2017| 2019| 2021| 2026|
#> |----:|----:|----:|----:|----:|
#> | 1500| 0.02| 0.07| 0.15| 0.41|
#> | 2000| 0.02| 0.06| 0.12| 0.29|
#> | 2500| 0.02| 0.05| 0.09| 0.20|
patchwork::wrap_plots(
  jbplot_projection(bum.pc$`2018 base`, type = "B/Bmsy") + ggplot2::ggtitle("2018 base"),
  jbplot_projection(bum.pc$`+ lag + AR(1)`, type = "B/Bmsy") + ggplot2::ggtitle("Lag + AR(1) protocol"))

At 2000 t the base case projects a 70% probability of being in the green Kobe quadrant by 2026, the protocol 28%: the base case expects the stock to rebuild much faster. In simulation (BioProcDyn), forecasts of this kind from a model with independent process error were optimistic by 25-45% in B/BMSYB/B_{MSY} during rebuilding, and almost two thirds of stocks still below BMSYB_{MSY} were classified as rebuilt, whereas the lag and persistent process error brought the truth close to the median of the estimated distribution.

The comparison with the 2018 SS3 assessment will be added here.

18 Other data features

The data-exploration chapter looked at index trends, catchabilities and conflicts among indices of one stock. This chapter covers other common data situations, with two anonymised example datasets:

data(jara_examples)
names(jara_examples)
#> [1] "areas"   "regions"
names(jara_examples$areas)
#> [1] "catch"  "idx"    "idx.se" "bio"    "bio.se"
names(jara_examples$regions)
#>  [1] "year"      "areaA"     "areaB"     "C.survey1" "C.survey2" "C.cpue1"   "C.cpue2"  
#>  [8] "C.cpue3"   "C.cpue4"   "C.cpue5"
  • areas: a catch history from six fleets or areas, two of them with missing early years; relative survey indices with log-SEs for four areas; and swept-area survey biomass for the same four areas;
  • regions: indices from three regions, a survey each in two adjacent areas (areaA, areaB) and two surveys and five CPUE series in a third region (C.*).

18.1 Catch history with missing years

Two fleets report only in the later years (fleet4, fleet5):

cc <- jara_examples$areas$catch
colSums(!is.na(cc[, -1]))
#> fleet1 fleet2 fleet3 fleet4 fleet5 fleet6 
#>     19     21     24     10     10     26

A census trend model (one state per fleet, summed to a total) interpolates the missing values. Where a fleet’s early catches are not known at all, start values anchor the interpolation: here fleet4 is assumed to have caught 10 t in the first year and fleet5 the same as fleet2. The start values get a larger log-SE (0.2) than the reported catches (0.05); jb3_catchfill() takes the SE as a data frame with the same layout as the catch. A time block lets the trend change after a given year, here when the catches peaked:

cc[1, "fleet5"] <- cc[1, "fleet2"]; cc[1, "fleet4"] <- 10
sc <- cc; sc[, -1] <- 0.05; sc[1, c("fleet4", "fleet5")] <- 0.2
cf <- jb3_catchfill(cc, se = sc, timeblock = 2016)
jbplot_trend(attr(cf, "fit"))          # fleet fits and the total

The total catch with its year-specific log-SE, larger where fleets with assumed start values are interpolated:

jbplot_catchfill(cf)

knitr::kable(as.data.frame(cf)[c(1:3, 15:18, 24:26), c("year", "catch", "se.log", "lci", "uci")],
             digits = 3, row.names = FALSE)
year catch se.log lci uci
1996 2097.300 0.039 1947.461 2266.393
1997 2360.185 0.060 2086.894 2639.184
1998 2167.053 0.087 1822.092 2561.615
2010 3137.244 0.146 2354.137 4171.678
2011 3051.221 0.120 2403.248 3850.117
2012 2659.563 0.026 2528.645 2805.143
2013 2707.469 0.058 2418.475 3041.539
2019 5436.590 0.106 4420.018 6690.056
2020 5000.580 0.109 4047.269 6201.394
2021 5123.100 0.024 4893.222 5366.658

The filled table, with the original series, the missing values replaced by predictions, and the total:

knitr::kable(head(jb3_fill_table(cf, digits = 1), 6), row.names = FALSE)
year fleet1 fleet2 fleet3 fleet4 fleet5 fleet6 Total
1996 334.2 307.5 954.0 10.0 307.5 184.1 2097.3
1997 498.3 496.9 852.7 11.7 334.5 166.0 2360.2
1998 240.6 492.8 972.1 14.0 363.0 84.6 2167.1
1999 210.7 508.8 626.3 16.6 393.8 70.6 1826.9
2000 308.0 629.9 727.9 19.8 427.3 66.4 2179.3
2001 457.3 776.9 836.5 23.5 463.6 85.1 2643.0

The reconstructed catch goes into jb3_data() with its year-specific SE, which the catch error of the model uses in place of the constant sdc; the jb3catchfill object can be passed directly as the catch:

d.cf <- jb3_data(cf, jara_examples$areas$idx, jara_examples$areas$idx.se, stock = "areas")
round(range(d.cf$catch.se), 3)
#> [1] 0.022 0.200

18.2 Swept-area surveys in several areas

A survey covering four areas gives two kinds of index: relative indices by area (idx, with log-SEs) and swept-area biomass estimates (bio). The relative indices are combined into a joint index as in the data-exploration chapter:

a <- jara_examples$areas
ji.a <- jb3_trend(a$idx, a$idx.se, run = "relative")
jdx.a <- jb3_jointindex(ji.a)
jbplot_jointindex(ji.a)

The swept-area estimates are absolute and additive over areas, so a census model fits each area separately and sums the area states to a total biomass with uncertainty, smoothing through years with missing surveys:

bi <- jb3_trend(a$bio, a$bio.se, type = "census", run = "swept-area census")
jbplot_trend(bi)

The census total and the relative joint index, both scaled to their means:

tb <- bi$total
sc1 <- mean(jdx.a$index, na.rm = TRUE); sc2 <- mean(tb$est)
cmp2 <- rbind(data.frame(year = jdx.a$year, index = jdx.a$index/sc1, lci = jdx.a$lci/sc1, uci = jdx.a$uci/sc1,
                         series = "relative joint index"),
              data.frame(year = tb$year, index = tb$est/sc2, lci = tb$lci/sc2, uci = tb$uci/sc2,
                         series = "census total biomass"))
round(cor(log(jdx.a$index), log(tb$est[match(jdx.a$year, tb$year)]), use = "complete.obs"), 2)
#> [1] 0.87
ggplot2::ggplot(cmp2, ggplot2::aes(year, index, colour = series, fill = series)) +
  ggplot2::geom_ribbon(ggplot2::aes(ymin = lci, ymax = uci), alpha = 0.15, colour = NA) + ggplot2::geom_line() +
  ggplot2::labs(y = "Index (scaled to mean)", colour = NULL, fill = NULL) + theme_jabba3()

The two agree closely. They answer different questions, however: the joint index weights areas by the precision of their indices, the census total by their biomass, so an area with much of the biomass but a noisy index counts more in the census. Where the trends differ, the census total is the better measure of the whole stock; it can also go into the production model as an index of its own, with the log-SE of the census total.

18.3 Do indices among areas conflict? Stock structure

When indices come from several regions, the question is whether they follow a common trend, in which case the regions can be assessed together, or diverge, which may point to separate stocks or at least to regions with different dynamics. The regions data have surveys of two adjacent areas and seven indices of a third region C:

rg <- jara_examples$regions
colSums(!is.na(rg[, -1]))
#>     areaA     areaB C.survey1 C.survey2   C.cpue1   C.cpue2   C.cpue3   C.cpue4   C.cpue5 
#>        33        24        28        21        32        14        18        26         6

Within regions. First the joint index of each region: A and B together (adjacent areas), and C:

tr.AB <- jb3_trend(rg[, c("year", "areaA", "areaB")], run = "A + B")
tr.C  <- jb3_trend(rg[, c("year", grep("^C\\.", names(rg), value = TRUE))], run = "C")
tr.C
#> JABBA3 trend fit (relative): C
#>   indices: C.survey1, C.survey2, C.cpue1, C.cpue2, C.cpue3, C.cpue4, C.cpue5 | years 1991 - 2023 
#>   convergence: ok (max gradient 2.8e-11) 
#>   process SD = 0.225 
#>   drift r:
#>           trend
#> 1991-2023 0.023
#>      index      q    sdi
#>  C.survey1 1.0000 0.5610
#>  C.survey2 0.6080 0.2920
#>    C.cpue1 1.0500 0.0508
#>    C.cpue2 1.4400 0.0941
#>    C.cpue3 0.0662 0.1750
#>    C.cpue4 0.3300 0.0618
#>    C.cpue5 0.5010 0.0706
jbplot_indexcor(tr.C)

The five CPUE series of region C are strongly correlated (r 0.77-0.94); the two surveys are noisier and agree less with each other and with the CPUE (the large sdi values). Within region C, the indices share one trend.

Between regions. The joint indices of the two regions on one plot, and their correlation:

jAB <- jb3_jointindex(tr.AB, name = "A + B"); jC <- jb3_jointindex(tr.C, name = "C")
reg <- rbind(data.frame(jAB, region = "A + B"), data.frame(jC, region = "C"))
reg <- do.call(rbind, lapply(split(reg, reg$region), function(z){ m <- mean(z$index, na.rm = TRUE)
  z$index <- z$index/m; z$lci <- z$lci/m; z$uci <- z$uci/m; z }))
ggplot2::ggplot(reg, ggplot2::aes(year, index, colour = region, fill = region)) +
  ggplot2::geom_ribbon(ggplot2::aes(ymin = lci, ymax = uci), alpha = 0.15, colour = NA) +
  ggplot2::geom_line() + ggplot2::geom_point(size = 0.8) +
  ggplot2::labs(y = "Joint index (scaled to mean)", colour = NULL, fill = NULL) + theme_jabba3()

J <- merge(data.frame(year = jAB$year, AB = jAB$index), data.frame(year = jC$year, C = jC$index))
ok <- is.finite(J$AB) & is.finite(J$C)
cor.test(log(J$AB[ok]), log(J$C[ok]))[c("estimate", "p.value")]
#> $estimate
#>        cor 
#> 0.05500221 
#> 
#> $p.value
#> [1] 0.7768844

All indices in one model. If the regions were one stock, a single trend model with all nine indices should fit them without systematic residuals. The pairwise correlations and residual diagnostics of the joint fit:

tr.all <- jb3_trend(rg, run = "all regions")
jbplot_indexcor(tr.all)

The additional observation SD each index needs, fitted within its region and in the model with all regions:

sdi <- function(f) stats::setNames(f$sdi, f$indices)
knitr::kable(data.frame(index = tr.all$indices, within.region = c(sdi(tr.AB), sdi(tr.C))[tr.all$indices],
                        all.regions = sdi(tr.all)), digits = 3, row.names = FALSE)
index within.region all.regions
areaA 0.075 0.290
areaB 0.233 0.386
C.survey1 0.561 0.544
C.survey2 0.292 0.282
C.cpue1 0.051 0.058
C.cpue2 0.094 0.081
C.cpue3 0.175 0.256
C.cpue4 0.062 0.076
C.cpue5 0.071 0.071
jbplot_residuals(tr.all)

p.reg <- jbplot_runs(tr.all)
p.reg

attr(p.reg, "runs")[, c("index", "p.runs", "test")]
#>               index p.runs   test
#> areaA         areaA  0.028 Failed
#> areaB         areaB  0.018 Failed
#> C.survey1 C.survey1  0.001 Failed
#> C.survey2 C.survey2  0.448 Passed
#> C.cpue1     C.cpue1  0.392 Passed
#> C.cpue2     C.cpue2  0.145 Passed
#> C.cpue3     C.cpue3  0.000 Failed
#> C.cpue4     C.cpue4  0.885 Passed
#> C.cpue5     C.cpue5  0.500 Passed

The regional joint indices do not agree: the two regions are uncorrelated (r = 0.06 over 29 shared years), with A + B lowest in the late 1980s and the last years and C highest around 1998-1999 and stable or increasing since 2012. Within regions the indices agree (A and B r = 0.35; the region C CPUE series r 0.77-0.94). Forced onto one trend, the common state follows the numerous and precise region C CPUE series, and the cost falls on the A and B surveys: their additional SD rises from 0.08 to 0.29 (areaA) and from 0.23 to 0.39 (areaB), while the region C CPUE series fit almost as well as on their own, and none of the A or B pairs with region C indices are significantly correlated. The residuals of A and B run negative in the last years, where region C is stable. The abundance data are thus not consistent with a single unit: A and B can be combined, but region C should be assessed separately, or a combined assessment checked against separate ones.

How to use this. Agreement among regions (positive correlations, no residual patterns that separate the regions, similar trends in the regional joint indices) supports assessing the regions together with one joint index or with all indices in one model. Conflict between regions, while the indices within each region agree, suggests that the regions have different dynamics: assess them separately, or at least test the combined assessment against separate ones. The trend models cannot by themselves establish stock structure, which needs biological evidence (genetics, tagging, life history), but they show whether the abundance data are consistent with a single unit.

19 Special feature: catch-only assessment and auxiliary data

Most stocks have no reliable abundance index. This chapter shows how JABBA3 handles the data-limited end of the range: catch-only assessments with priors on stock status, auxiliary data such as fishing effort or an index of exploitation, and how each kind of data changes the estimate of stock status.

The effort and F/Fmsy series used here are hypothetical. Bigeye tuna has no effort or F/Fmsy series in the package. Both series below (iccat$bet$effort_hyp and iccat$bet$ffmsy_hyp) were simulated from the F trajectory of the bigeye example fit: effort with 2% annual effort creep and lognormal noise (SD 0.15), and F/Fmsy with noise (SD 0.3) for 1990-2009 only. They are not real data. They are used only to show the methods, and their fits are partly circular, because they were simulated from an assessment that used the same catch.

19.1 Concept: hierarchical assessment framework

Kell et al. (2025) set out a hierarchical assessment framework (HAF) for biomass dynamic models, in which the assessment method follows the data available. There are four tiers:

Tier Data Method
Robust quantitative assessment reliable abundance indices and catch JABBA
Preliminary quantitative assessment partial or short indices, catch JABBA with scenarios and sensitivity runs
Auxiliary data auxiliary indices (length-based F/Fmsy, effort), catch auxiliary data as priors or as time series of exploitation
Data-limited catch only catch-only model with predictive priors (e.g. current depletion)

The aim is risk equivalence: the risk of misclassifying stock status against BMSYB_{MSY} and FMSYF_{MSY} should be the same in every tier. It is measured by classification skill, for example the true skill statistic (sensitivity + specificity - 1) for B<BMSYB < B_{MSY} or F>FMSYF > F_{MSY}. Each tier starts from prior predictive modelling (PPM): the model is run with the priors and the catch but without the data, as a reality check of what the assumptions alone imply. Kell et al. found that auxiliary F/Fmsy indices, especially from periods of high exploitation, substantially improve the classification of status.

JABBA3 covers all tiers with one model:

  • jb3_data(catch, indices = NULL) gives a catch-only data set;
  • jb3_priors(status = jb3_bprior(...)) adds priors on B/BMSYB/B_{MSY}, B/KB/K or F/FMSYF/F_{MSY} in any year, as JABBA’s b.prior;
  • jb3_data(auxiliary = , auxiliary.type = ) adds auxiliary series of type "effort", "f", "ffmsy", "bbmsy", "bk" or "z";
  • jabba3(..., prior.only = TRUE) switches off the likelihood of the indices and auxiliary data (the catch still drives the dynamics), which gives the prior predictive run.

Without an index, the posterior mode and its Laplace approximation are unreliable: there is nothing to pin down the states. jabba3() therefore samples with NUTS by default when there is no index or when prior.only = TRUE (engine = "rtmb" can still be set explicitly).

The runs below move up the tiers for bigeye tuna:

  1. catch only (tier 4): the prior predictive run, then the same with a terminal-year B/BMSYB/B_{MSY} prior;
  2. catch + auxiliary data (tier 3): hypothetical effort with 2% creep (and a no-creep sensitivity), and a hypothetical F/Fmsy index from a period of high exploitation;
  3. catch + index (tier 1): the two Japanese longline CPUE series;
  4. catch + auxiliary data + index.

All runs use the Fox model with the r prior of the bigeye example, the default K and initial depletion priors, and NUTS with three chains of 4000 iterations (2000 warm-up; the jabba3() default).

bet <- iccat$bet
pr.r <- c(0.2, 0.5)
mod  <- jb3_model(shape = "fox")
nu   <- list(chains = 3, cores = 3)   # 4000 iterations per chain (default), 2000 warm-up

19.2 Catch only: prior predictive and status priors

With catch only, the information comes from the priors on r, K and initial depletion, and from the catch itself, which has to be sustainable under the estimated production function. The prior predictive run shows what these assumptions imply:

d0  <- jb3_data(bet$catch, NULL, stock = "bet")
d0
#> JABBA3 data:bet
#>   years 1950-2017 (68), catch range 808-135000
#>   catch-only: no abundance index
pr0 <- jb3_priors(d0, r = pr.r)
co.ppm <- jabba3(d0, pr0, mod, prior.only = TRUE, nuts = nu, run = "Prior predictive")

Next, a prior on current status. As in JABBA’s b.prior, jb3_bprior() places a lognormal prior on B/BMSYB/B_{MSY} (or B/KB/K, F/FMSYF/F_{MSY}) in a given year; with year = NULL the prior applies to the terminal year. Here B/BMSY=0.7B/B_{MSY} = 0.7 in 2017 with a CV of 0.2, the kind of prior that might come from expert judgement or a length-based method:

pr.b <- jb3_priors(d0, r = pr.r, status = jb3_bprior(0.7, cv = 0.2, type = "bbmsy"))
pr.b$status
#>   year  type median    log.sd
#> 1   NA BBmsy    0.7 0.1980422
co.b <- jabba3(d0, pr.b, mod, nuts = nu, run = "Catch + B/Bmsy prior")

The JABBA form status = c(0.5, 0.2, 2010, "bbmsy") is accepted too, and several priors are combined with rbind() (for example rbind(jb3_bprior(0.7, 0.2), jb3_bprior(1.2, 0.3, 2000, "ffmsy"))).

jbplot_priorpost_trj() compares the two catch-only runs: trajectories, and the marginal distributions of r, K and terminal B/BMSYB/B_{MSY}:

jbplot_priorpost_trj(list(`Prior predictive` = co.ppm, `Catch + B/Bmsy prior` = co.b))

The prior predictive run is the reality check: with the catch and the default priors alone, bigeye would be lightly exploited (B/BMSYB/B_{MSY} around 2 in 2017, P(B<BMSY)<0.1P(B < B_{MSY}) < 0.1), with a wide interval. This is driven by the default K prior (8 times the maximum catch) and initial depletion near unfished: with a large K, the catch history barely dents the biomass. The prior predictive run makes such implications visible before any data are fitted. The terminal-year status prior pulls B/BMSYB/B_{MSY} down to its median of 0.7 and, through the catch, also the recent trajectory, K and r; but the result is only as good as the prior.

19.3 Catch + auxiliary data

Auxiliary data enter jb3_data() as a data frame (one column per series, with auxiliary.type) or as a named list of series. The observation model is lognormal, with the input log-scale SE plus an additional observation SD estimated per series (jb3_model(aux.sd = NULL), the default) or fixed (aux.sd = 0.15):

  • effort: logEt∼N(logFt−logqE−(t−t0)log(1+c),σ2)\log E_t \sim N(\log F_t - \log q_E - (t - t_0)\log(1 + c),\ \sigma^2), where cc is the annual effort creep (the increase in catchability per unit effort). The creep is fixed with jb3_model(effort.creep = 0.02) or estimated with effort.creep = "estimate" and a normal prior jb3_priors(creep = c(0.02, 0.02)). qEq_E is estimated.
  • ffmsy, bbmsy, bk: the status quantity itself with q=1q = 1 (absolute status estimates, e.g. from length-based indicators or another assessment; set aux.q = NA to estimate a scaling instead);
  • f (q=1q = 1) and z (estimated qq, as JABBA).

The hypothetical bigeye series:

head(bet$effort_hyp, 3)
#>   year effort
#> 1 1960  89.51
#> 2 1961 143.10
#> 3 1962 210.60
head(bet$ffmsy_hyp, 3)
#>   year  ffmsy  se
#> 1 1990 0.4797 0.3
#> 2 1991 0.7083 0.3
#> 3 1992 0.9433 0.3
ax <- rbind(data.frame(year = bet$effort_hyp$year, value = bet$effort_hyp$effort, series = "Hypothetical effort"),
            data.frame(year = bet$ffmsy_hyp$year, value = bet$ffmsy_hyp$ffmsy, series = "Hypothetical F/Fmsy"))
ggplot2::ggplot(ax, ggplot2::aes(year, value)) + ggplot2::geom_line() + ggplot2::geom_point(size = 1) +
  ggplot2::facet_wrap(~series, scales = "free_y") + ggplot2::expand_limits(y = 0) +
  ggplot2::labs(x = "Year", y = NULL, title = "Hypothetical auxiliary data (simulated, not real data)") + theme_jabba3()

Catch + hypothetical effort, with the 2% creep it was simulated with, and with no creep as a sensitivity:

d.e <- jb3_data(bet$catch, NULL, stock = "bet", auxiliary = bet$effort_hyp, auxiliary.type = "effort")
d.e
#> JABBA3 data:bet
#>   years 1950-2017 (68), catch range 808-135000
#>   catch-only: no abundance index
#>   auxiliary effort (effort): 58 obs, 1960-2017
co.e  <- jabba3(d.e, pr0, jb3_model(shape = "fox", effort.creep = 0.02), nuts = nu, run = "Catch + effort (creep 2%)")
co.e0 <- jabba3(d.e, pr0, jb3_model(shape = "fox", effort.creep = 0),    nuts = nu, run = "Catch + effort (no creep)")

Catch + hypothetical F/Fmsy index, 1990-2009 only, with its SE of 0.3:

d.f <- jb3_data(bet$catch, NULL, stock = "bet", auxiliary = bet$ffmsy_hyp[, c("year", "ffmsy")],
                auxiliary.se = bet$ffmsy_hyp[, c("year", "se")], auxiliary.type = "ffmsy")
co.f <- jabba3(d.f, pr0, mod, nuts = nu, run = "Catch + F/Fmsy index")
patchwork::wrap_plots(
  jbplot_auxfits(list(`creep 2%` = co.e, `no creep` = co.e0), title = "Hypothetical effort"),
  jbplot_auxfits(co.f, title = "Hypothetical F/Fmsy index"), ncol = 2, widths = c(1, 1))

Effort informs the trend in F, not its scale (qEq_E is estimated), and the creep assumption is decisive: without creep, the same nominal effort implies a steadily falling F in recent years, and the stock looks lightly exploited (B/BMSYB/B_{MSY} about 2 in 2017). With the 2% creep the series was simulated with, the estimate is close to the index-based assessment, which is partly by construction (the effort was simulated from that assessment’s F). An absolute F/Fmsy index informs the scale of exploitation: in 1990-2009 the F/Fmsy estimates of the catch + F/Fmsy run are about as precise as those of the index-based run. After 2009 there is no information on F, and the terminal F/Fmsy interval widens again.

19.4 Catch + index, and catch + auxiliary data + index

d.i  <- jb3_data(bet$catch, bet$cpue, bet$se, stock = "bet")
co.i <- jabba3(d.i, jb3_priors(d.i, r = pr.r), mod, engine = "nuts", nuts = nu, run = "Catch + index")
d.ie <- jb3_data(bet$catch, bet$cpue, bet$se, stock = "bet",
                 auxiliary = bet$effort_hyp, auxiliary.type = "effort")
co.ie <- jabba3(d.ie, jb3_priors(d.ie, r = pr.r), jb3_model(shape = "fox", effort.creep = 0.02),
                engine = "nuts", nuts = nu, run = "Catch + effort + index")

19.5 Moving up the tiers

co.runs <- list(`Prior predictive` = co.ppm, `Catch + B/Bmsy prior` = co.b, `Catch + effort` = co.e,
                `Catch + effort (no creep)` = co.e0, `Catch + F/Fmsy index` = co.f, `Catch + index` = co.i,
                `Catch + effort + index` = co.ie)
jabbaplot3(co.runs, panels = c("B/Bmsy", "F/Fmsy", "B/K", "kobe"), ncol = 2)

pt <- jb3_partable(co.runs, format = "wide")
knitr::kable(pt[pt$Parameter %in% c("K", "r", "MSY", "qA.effort", "sdA.effort", "sdA.ffmsy", "B/Bmsy", "F/Fmsy"), ],
             row.names = FALSE, caption = "Posterior medians (95% intervals); the effort and F/Fmsy data are hypothetical")
Posterior medians (95% intervals); the effort and F/Fmsy data are hypothetical
Parameter Prior predictive Catch + B/Bmsy prior Catch + effort Catch + effort (no creep) Catch + F/Fmsy index Catch + index Catch + effort + index
K 1,460,000 (601,000-4,550,000) 1,320,000 (689,000-2,960,000) 1,220,000 (747,000-2,340,000) 1,630,000 (873,000-3,740,000) 1,310,000 (751,000-2,630,000) 1,350,000 (819,000-2,630,000) 1,290,000 (815,000-2,330,000)
r 0.269 (0.0977-0.68) 0.174 (0.0786-0.37) 0.184 (0.0924-0.319) 0.187 (0.093-0.339) 0.158 (0.0758-0.313) 0.165 (0.0829-0.291) 0.173 (0.0905-0.289)
MSY 134,000 (69,500-506,000) 85,200 (57,200-138,000) 83,100 (66,700-100,000) 109,000 (72,200-201,000) 78,000 (53,700-105,000) 82,700 (64,100-103,000) 82,300 (67,400-97,100)
B/Bmsy 2 (0.563-3.16) 0.772 (0.517-1.15) 0.812 (0.612-1.07) 1.92 (1.44-2.54) 0.723 (0.145-1.68) 0.799 (0.528-1.19) 0.803 (0.622-1.03)
F/Fmsy 0.282 (0.057-1.74) 1.18 (0.578-2.22) 1.09 (0.78-1.51) 0.344 (0.164-0.609) 1.38 (0.514-7.84) 1.18 (0.681-1.97) 1.1 (0.807-1.51)
qA.effort 0.0000934 (0.000048-0.00016) 0.0000909 (0.0000372-0.000181) 0.0000892 (0.0000482-0.000147)
sdA.effort 0.0474 (0.0206-0.104) 0.0475 (0.0204-0.103) 0.0481 (0.0206-0.101)
sdA.ffmsy 0.0955 (0.0247-0.323)
stat <- do.call(rbind, lapply(names(co.runs), function(n){ f <- co.runs[[n]]; ly <- as.character(max(f$years))
  rbind(data.frame(run = n, quant = "B/Bmsy 2017", value = f$draws$`B/Bmsy`[, ly]),
        data.frame(run = n, quant = "F/Fmsy 2017", value = f$draws$`F/Fmsy`[, ly])) }))
stat$run <- factor(stat$run, rev(names(co.runs)))
ggplot2::ggplot(stat, ggplot2::aes(value, run)) + ggplot2::geom_vline(xintercept = 1, linetype = 2) +
  ggplot2::geom_boxplot(outlier.size = 0.3, fill = "grey85") + ggplot2::scale_x_log10() +
  ggplot2::facet_wrap(~quant, scales = "free_x") + ggplot2::labs(x = NULL, y = NULL) + theme_jabba3()

The probability of being overfished, P(B<BMSY)P(B < B_{MSY}), and of overfishing, P(F>FMSY)P(F > F_{MSY}), in 2017:

knitr::kable(do.call(rbind, lapply(names(co.runs), function(n){ f <- co.runs[[n]]
  data.frame(run = n, `P(B<Bmsy)` = mean(f$draws$`B/Bmsy`[, "2017"] < 1), `P(F>Fmsy)` = mean(f$draws$`F/Fmsy`[, "2017"] > 1),
             check.names = FALSE) })), digits = 2)
run P(B<Bmsy) P(F>Fmsy)
Prior predictive 0.08 0.07
Catch + B/Bmsy prior 0.90 0.69
Catch + effort 0.93 0.69
Catch + effort (no creep) 0.00 0.00
Catch + F/Fmsy index 0.75 0.72
Catch + index 0.87 0.73
Catch + effort + index 0.96 0.75

Prior against posterior for the full assessment (catch + effort + index), with the prior predictive run as the reference:

jbplot_priorpost_trj(co.ppm, co.ie, labels = c("Prior predictive", "Catch + effort + index"))

Moving up the tiers changes the classification of the stock. The prior predictive run classifies bigeye as not overfished (P(B<BMSY)<0.1P(B < B_{MSY}) < 0.1); every run with information on the exploitation history, whether a status prior, effort with creep, an F/Fmsy index or the CPUE indices, classifies it as overfished with probability 0.75-0.96, with similar medians of B/BMSYB/B_{MSY} around 0.7-0.8. They differ in precision. The status prior fixes the terminal estimate wherever the prior is placed, so its value lies entirely in how well the prior is founded. The hypothetical F/Fmsy index covers only 20 years of high exploitation, yet moves the classification from “not overfished” to “overfished”, as Kell et al. (2025) found for auxiliary F/Fmsy indices from periods of high exploitation; without information after 2009 its terminal interval stays wide. Effort carries the trend in exploitation, but its result depends on the assumed creep, which should be treated as a key uncertainty (fixed scenarios, or estimated with an informed prior). With the CPUE indices, the effort narrows the interval of B/BMSYB/B_{MSY} somewhat, but here the agreement is partly built in, because the hypothetical effort was simulated from the index-based assessment.

19.6 How much do the data add? Prior-posterior contraction

The prior predictive run is also the reference for a diagnostic of what each tier adds. jb3_contraction() compares each quantity of a fit with the prior predictive run (log scale):

  • contraction = 1 − var(posterior)/var(prior predictive), the share of the prior uncertainty removed by the data (0: the data add nothing; 1: fully determined by the data);
  • shift = (mean(posterior) − mean(prior predictive))/sd(prior predictive), how far the data move the estimate, in prior SDs.

Low contraction means a quantity is prior-driven; a large shift means the data pull it into the tail of the prior (prior-data conflict); high contraction with a moderate shift means it is informed by the data.

Source. The diagnostic is adapted from the posterior shrinkage versus posterior z-score plot of Betancourt (2018), part of the principled Bayesian workflow of Schad et al. (2021). Betancourt computes shrinkage =1−var(posterior)/var(prior)= 1 - \mathrm{var(posterior)}/\mathrm{var(prior)} and the z-score =(mean(posterior)−θtrue)/sd(posterior)=(\mathrm{mean(posterior)} - \theta_{true})/\mathrm{sd(posterior)} over simulated data sets with a known true value θtrue\theta_{true}, to check a model design before it is fitted to real data. A real assessment has no true value, so JABBA3 replaces the z-score by the shift from the prior predictive mean, which measures prior-data conflict rather than calibration, and uses the prior predictive run as the reference distribution; contraction.pdf, against the stated prior density, is the version closest to Betancourt’s shrinkage. The class names and the thresholds (contraction.min = 0.25, shift.max = 2) are JABBA3 choices, not from these papers. In simulation testing, where the truth is known, Betancourt’s original form applies directly. By default the prior predictive run is made with the fit’s own priors, model and catch (jb3_contraction(fit) runs it with NUTS). Here all runs are compared with the common prior predictive run co.ppm (catch and the r, K and initial-depletion priors), so that the status prior is treated as one of the tiers:

ct <- jb3_contraction(co.runs[-1], prior = rep(list(co.ppm), length(co.runs) - 1), years = c(1990, 2017))
w <- reshape(as.data.frame(ct)[c("run", "quant", "contraction")], idvar = "quant", timevar = "run", direction = "wide")
names(w) <- sub("^contraction\\.", "", names(w))
knitr::kable(w, digits = 2, row.names = FALSE, caption = "Contraction relative to the prior predictive run")
Contraction relative to the prior predictive run
quant Catch + B/Bmsy prior Catch + effort Catch + effort (no creep) Catch + F/Fmsy index Catch + index Catch + effort + index
K 0.48 0.70 0.49 0.61 0.66 0.73
r 0.36 0.60 0.54 0.46 0.57 0.64
MSY 0.82 0.96 0.74 0.90 0.95 0.97
bkinit 0.04 0.03 -0.04 0.04 0.07 0.07
B/Bmsy 1990 -0.32 0.75 0.73 0.29 0.50 0.80
B/Bmsy 2017 0.78 0.89 0.89 -1.05 0.77 0.91
F/Fmsy 1990 0.71 0.94 0.75 0.92 0.88 0.95
F/Fmsy 2017 0.83 0.96 0.84 0.33 0.90 0.96
jbplot_contraction(ct)

The initial depletion is prior-driven in every run: no tier informs it. All tiers with information on exploitation remove most of the prior uncertainty in terminal status (contraction 0.8-0.9) and move it by about 1.5 prior SDs towards overfished, which says that the default priors (K of 8 times the maximum catch, an unfished start) are optimistic for bigeye. The tiers differ in where they inform: the terminal status prior contracts only the terminal year, whereas B/BMSYB/B_{MSY} in 1990 is not informed at all (contraction about −0.4); effort and the indices inform the whole trajectory. The hypothetical F/Fmsy index informs F/Fmsy in 1990 (0.92) but not the terminal status: its posterior for B/BMSYB/B_{MSY} in 2017 is wider than the prior predictive (contraction −0.88) and shifted by more than two prior SDs, a flag that the auxiliary data move the stock into a region the rest of the model constrains poorly.

A catch-only fit compared with its own prior predictive run, which keeps the status prior, has a contraction of zero by construction, and the diagnostic says so:

cb <- jb3_contraction(co.b, nuts = nu)
knitr::kable(as.data.frame(cb)[c("quant", "prior.median", "post.median", "contraction", "contraction.pdf", "class")],
             digits = 3, row.names = FALSE)
quant prior.median post.median contraction contraction.pdf class
K 1.32e+06 1.32e+06 0 NA prior-driven
r 1.74e-01 1.74e-01 0 0.379 prior-driven
MSY 8.52e+04 8.52e+04 0 NA prior-driven
bkinit 8.58e-01 8.58e-01 0 0.207 prior-driven
B/Bmsy 2017 7.72e-01 7.72e-01 0 NA prior-driven
F/Fmsy 2017 1.18e+00 1.18e+00 0 NA prior-driven

contraction.pdf compares the posterior of r, K and initial depletion with the stated prior density rather than with the prior predictive run. It shows what the catch and the status prior do to the r and K priors even without any data: the variance of log K is reduced by about 75% and that of log r by about 35%, because only combinations under which the stock survives the catch history and ends near the status prior remain (the CMSY logic). This is a check of the priors (whether much of the prior is incompatible with the catch), not a reason to narrow them: using the catch-conditioned r and K as priors would count the catch twice.

19.7 Non-centred process deviations

When the data say little about the states, as in a catch-only run, the process deviations and their SD form a “funnel” that NUTS samples poorly in the usual (centred) form. In the non-centred form NUTS samples standard normal innovations zt∼N(0,1)z_t \sim N(0, 1) instead, and the deviations follow from

dt=ρdt−1+σt1−ρ2zt,logPt=logP‾t+dt,d_t = \rho\, d_{t-1} + \sigma_t \sqrt{1 - \rho^2}\, z_t, \qquad \log P_t = \log \bar P_t + d_t,

with the production lag, bias correction, random walk and depletion-dependent SD exactly as in the centred form (the model is the same; only the coordinates of the sampler change). It is selected with jb3_model(param = "noncentred"); the default is "centred", and the posterior mode always uses the centred form, where the Laplace approximation needs the states themselves. jb3_nuts_ess() gives the bulk and tail ESS of the derived states, also per 1000 draws, to compare the two:

ess <- function(d, pr, p, ...) attr(jb3_nuts_ess(jabba3(d, pr, jb3_model(shape = "fox", param = p), nuts = nu, ...)), "summary")
rbind(ess(d.i, jb3_priors(d.i, r = pr.r), "centred", engine = "nuts"), ess(d.i, jb3_priors(d.i, r = pr.r), "noncentred", engine = "nuts"),
      ess(d0, pr.b, "centred"), ess(d0, pr.b, "noncentred"))
Data Form min / median bulk ESS per 1000 draws, B/Bmsy min tail ESS per 1000, B/Bmsy Divergent transitions Run time (s)
catch + index centred 43 / 54 92 0 33
catch + index non-centred 113 / 327 42 1016 227
catch + B/Bmsy prior centred 72 / 134 108 0 23
catch + B/Bmsy prior non-centred 313 / 813 133 394 280

Three chains of 2000 iterations (3000 post-warm-up draws); F/Fmsy behaves the same way.

The non-centred form gives a higher bulk ESS per draw, but many divergent transitions, so its draws are not reliable, and it is seven to twelve times slower. The reason is the production model: each state depends on all earlier innovations through the nonlinear surplus production and the catch removals, so the non-centred coordinates are strongly and nonlinearly correlated, and the curvature changes sharply where the catch approaches the biomass. The centred form had no divergences in either case and is the default. The non-centred form remains an option for short series or very weakly informed states, always to be checked with jb3_nuts_diags().

The NUTS runs of this chapter took 6.4 minutes in total (three chains of 4000 iterations each, run in parallel).

20 Special feature: Selex

Standard JABBA3, like JABBA, models the exploitable biomass (EB) that the fishery and the indices see. Where the fishery selects fish before maturity, or selectivity changes over time, EB and spawning biomass (SB) diverge, and an SPM on EB gives biased status relative to the SB-based reference points of advice. The Selex model (JABBA-Select; Winker et al. 2020) takes SB as the state and maps the indices and removals to it through the equilibrium ratio of the exploitable stock to SB as a function of depletion. This chapter covers

  • the Selex model and the EB/SB curves from life history and length-based selectivity (jb3_selex());
  • a change in selectivity, with the r prior from the age-structured equilibrium (jb3_asem_prior()): the simulated KOBsim data of JABBA-Select, with the truth;
  • indices in numbers: the bigeye joint longline index.

20.1 The Selex model

With ebsb the state is spawning biomass and the indices and removals are mapped to it through the equilibrium ratio of exploitable to spawning biomass, a function of depletion given as a curve c(u1, u2, u3, P1, P2) (or a named list of curves, one per selectivity), assigned to indices with ebsb.index and to the removals with ebsb.catch. The priors are then on the spawning-biomass scale. The curves come from an age-structured equilibrium analysis (e.g. FLBRP) or from a JABBA Selex setup via jbinput2jabba3(). jb3_selex() computes the curves from life history and length-based selectivity, and jb3_asem_prior() the matching r prior (KOBsim example below).

jbplot_ebsb_status() shows the spawning biomass status (the state) with the exploitable biomass status implied by each curve, EB/EBMSY = (SB/SBMSY) ×\times ρ\rho(SB/K)/ρ\rho(SBMSY/K). With an illustrative curve:

fsel <- jabba3(d, pr, jb3_model(shape = "fox", ebsb = c(0.6, 1.2, 3, 0.1, 1)), osa = FALSE)
jbplot_ebsb_status(fsel)

20.2 EB/SB curves from length selectivity

With the Selex model (jb3_model(ebsb = )) the state is spawning biomass and the indices and removals are mapped through the equilibrium ratio of exploitable to spawning biomass, EB/SB, as a function of SB/SB0. jb3_selex() computes this curve for each fleet from lhpar and length-based selectivity, over a grid of F with Beverton-Holt recruitment, and fits the saturating curve c(u1,u2,u3,P1,P2)c(u_1, u_2, u_3, P_1, P_2). Selectivity parameters use the FLicc names and functions (logistic: SL50, SL95; dsnormal: mode, lsd, rsd; normal; binormal; bidsnormal), here as an FLPars as returned by FLicc::selpars_flicc(fit); selectivity at length is converted to age by integrating over the length-at-age distribution (CVL = 0.1). Curves are fitted to the equilibrium over SB/SB0 = 0.1–0.9 (fit.range, as JABBA-Select) and extend smoothly to the state bounds (P.lim = c(0.02, 1.3)), so that the likelihood has no kink where the states may lie.

selpar <- FLPars(Gillnet = FLPar(mode = 32, lsd = 4, rsd = 15),
                 Longline = FLPar(SL50 = 28, SL95 = 36))
sx <- jb3_selex(lh2, selpar)
sx
#> JABBA3 Selex inputs: 2 selectivity curve(s); sexes F, M ; steepness 0.75 
#>   Leslie r = 0.151, generation time = 18.0 years
#>             u1    u2    u3   P1  P2   units
#> Gillnet  1.205 0.889 1.486 0.02 1.3 biomass
#> Longline 1.110 1.047 1.726 0.02 1.3 biomass
#>   pass the object to jb3_model(ebsb = ); with several curves set ebsb.index and ebsb.catch
jbplot_selex(sx)

The JABBA 5-parameter selectivity (JABBA-Select; jb3_sel5(): SL50, SL95, then a descending limb from SLdesc with coefficient of variation CVdesc towards a minimum Smin) can be used at length, alongside the FLicc functions:

sx5 <- jb3_selex(lhpar, list(Logistic = c(SL50 = 28, SL95 = 36),
                             Dome5 = c(SL50 = 25, SL95 = 32, SLdesc = 42, CVdesc = 0.15, Smin = 0.1)))
jbplot_selex(sx5)

or at age (sel.type = "age"; parameters in years):

sxa <- jb3_selex(lhpar, list(Age5 = c(SL50 = 4, SL95 = 6, SLdesc = 15, CVdesc = 0.2, Smin = 0.2)),
                 sel.type = "age")
jbplot_selex(sxa, at = "age")

20.3 Example: a change in selectivity (KOBsim)

kobsim is the simulated silver kob data set of the JABBA-Select example (Winker et al. 2020): an age-structured operating model run for 40 years, in which the minimum size limit was raised in year 26 (length at 50% selectivity 300 → 500 mm). Both indices are split at the change (A1.S1, A1.S2, A2.S1, A2.S2) and share one catchability per index, so that the jump in exploitable biomass relative to spawning biomass is carried by the EB/SB curves rather than by a new catchability. The removal curve changes with the selectivity (ebsb.catch by year; reference points and projections use the curve of the last year).

data(kobsim)
sxk <- jb3_selex(kobsim$lhpar, kobsim$selpar)                   # EB/SB curves for S1 and S2
jbplot_selex(sxk)

The r prior from the age-structured equilibrium. rLeslie/2r_{Leslie}/2 ignores selectivity and the stock-recruitment curve beyond its slope (Chapter 5b). jb3_asem_prior() generates the r prior as the ASEM prior of JABBA-Select: a Monte Carlo over M and steepness through the age-structured equilibrium with the fishery’s selectivity gives, for each draw, FMSYF_{MSY}, the harvest rate at MSY and the production-function shape. The harvest rate that r must match depends on the model:

  • standard JABBA3 (state = "EB"): K=EB0K = EB_0, BMSY/K=EBMSY/EB0B_{MSY}/K = EB_{MSY}/EB_0 and r=mMSY/EBMSYr = m\,MSY/EB_{MSY};
  • Selex (state = "SB") with catch removed through the EB/SB curve (the default, ebsb.removal = TRUE): K=SB0K = SB_0, BMSY/K=SBMSY/SB0B_{MSY}/K = SB_{MSY}/SB_0 and r=mMSY/EBMSYr = m\,MSY/EB_{MSY};
  • Selex with catch removed from SB directly (ebsb.removal = FALSE, as JABBA-Select v1; removal = "SB"): r=mMSY/SBMSYr = m\,MSY/SB_{MSY}.

Here with the current selectivity (catch = "S2"):

prk <- jb3_asem_prior(kobsim$lhpar, kobsim$selpar, catch = "S2", M.cv = 0.25, h.sd = 0.08, nsim = 300)
prk
#> JABBA3 ASEM productivity prior (300 draws; state SB, catch removed from EB)
#>   F_MSY 0.164 | H_MSY 0.164 | B_MSY/K 0.293 (m = 0.652)
#>   r prior (shape fixed at the median): median 0.107, log.sd 0.319
#>   for comparison: r_Leslie/2 converted to this shape = 0.087
#>   use: jb3_model(BmsyK = $BmsyK), jb3_priors(r = $r)

The r prior is conditional on the shape fixed at the median BMSY/KB_{MSY}/K (jb3_model(BmsyK = prk$BmsyK)). To estimate the shape, prk$m can be used as the m prior (independent of r in JABBA3; JABBA-Select v1 used the correlated prior prk$lmvn on log(HMSY,m)\log(H_{MSY}, m)).

dk  <- jb3_data(kobsim$catch, kobsim$cpue, kobsim$se, stock = "kobsim")
eck <- ifelse(dk$years < kobsim$sel.change, "S1", "S2")         # removal curve by year
mk  <- jb3_model(BmsyK = prk$BmsyK, sets.q = c(1, 1, 2, 2), ebsb = sxk,
                 ebsb.index = c("S1", "S2", "S1", "S2"), ebsb.catch = eck)
fk  <- jabba3(dk, jb3_priors(dk, r = prk$r, K = c(8*max(dk$catch), 1)), mk, osa = FALSE)

The fit with jabbaplot3() (here without the biomass trigger and limit lines):

jabbaplot3(fk, bthr = NULL, blim = NULL, panels = c("B/Bmsy", "F/Fmsy", "procdev", "Catch"))

The estimated spawning-biomass depletion against the operating-model truth:

bkk <- fk$ts[fk$ts$quant == "B/K", ]
ggplot2::ggplot(bkk, ggplot2::aes(year, est)) +
  ggplot2::geom_ribbon(ggplot2::aes(ymin = lci, ymax = uci), fill = "grey80") + ggplot2::geom_line() +
  ggplot2::geom_line(data = data.frame(year = kobsim$truth$year, est = kobsim$truth$SB/kobsim$SB0), colour = "red") +
  ggplot2::geom_vline(xintercept = kobsim$sel.change - 0.5, linetype = 2) +
  ggplot2::labs(x = "Year", y = "SB/SB0", subtitle = "JABBA3 Selex (black, 95% CI) and operating model (red)") + theme_jabba3()

20.4 Example: an index in numbers (bigeye)

Many indices, in particular tuna longline CPUE, are in numbers. Because fishing shifts the exploitable stock towards smaller fish, exploitable numbers per unit SB rise more steeply with depletion than exploitable biomass, so an index in numbers declines less than one in weight, even when selectivity equals maturity and the EB/SB curve is flat. Mapped with the weight curve, the model reads this as less depletion and becomes optimistic. jb3_selex(units = "numbers") gives the curve of exploitable numbers to SB (EN/SB; I.unit = 0 in JABBA-Select). A fleet with catch in weight and an index in numbers needs both curves from the same selectivity: the index is mapped with the numbers curve (ebsb.index) and the catch with the weight curve (ebsb.catch).

The bigeye indices are the 2018 joint longline index, standardised as catch in number per hook (Hoyle et al. 2019). Like JABBA in the 2018 assessment, the other examples in this guide treat them as an index of exploitable biomass. The biology below is approximate (von Bertalanffy growth instead of the Richards curve of the 2018 assessment, M = 0.35 at all ages, maturity at age 3, steepness 0.8), and the longline selectivity is illustrative, so the example contrasts the two units rather than providing an assessment:

Lb  <- function(a) 217.3*(1 - exp(-0.18*(a + 0.709)))
lhb <- c(linf = 217.3, k = 0.18, t0 = -0.709, a = 2.396e-5, b = 2.9774, M = 0.35, s = 0.8,
         L50 = (Lb(2) + Lb(3))/2, L95 = Lb(3), amax = 15)
llb <- c(SL50 = 100, SL95 = 125)                                  # illustrative longline selectivity (cm)
sxb <- jb3_selex(lhb, list(LL = llb, LL.N = llb), units = c("biomass", "numbers"))
sxb
#> JABBA3 Selex inputs: 2 selectivity curve(s); sex F ; steepness 0.8 
#>   Leslie r = 0.427, generation time = 7.1 years
#>           u1      u2     u3   P1  P2   units
#> LL   0.50490 0.89380 3.7320 0.02 1.3 biomass
#> LL.N 0.01927 0.01135 0.9045 0.02 1.3 numbers
#>   pass the object to jb3_model(ebsb = ); with several curves set ebsb.index and ebsb.catch
jbplot_selex(sxb)

The same data fitted with standard JABBA3, and with Selex with the index mapped in weight and in numbers (r priors from the equilibrium for each model):

prb  <- jb3_asem_prior(lhb, llb, M.cv = 0.2, h.sd = 0.08, nsim = 300)
prbE <- jb3_asem_prior(lhb, llb, state = "EB", M.cv = 0.2, h.sd = 0.08, nsim = 300)
db   <- jb3_data(bet$catch, bet$cpue, bet$se, stock = "bet")
Kb   <- c(8*max(db$catch), 1)
fb <- list(
  standard        = jabba3(db, jb3_priors(db, r = prbE$r, K = Kb), jb3_model(BmsyK = prbE$BmsyK), osa = FALSE),
  selex.weight    = jabba3(db, jb3_priors(db, r = prb$r, K = Kb),
                           jb3_model(BmsyK = prb$BmsyK, ebsb = sxb, ebsb.index = "LL", ebsb.catch = "LL"), osa = FALSE),
  selex.numbers   = jabba3(db, jb3_priors(db, r = prb$r, K = Kb),
                           jb3_model(BmsyK = prb$BmsyK, ebsb = sxb, ebsb.index = "LL.N", ebsb.catch = "LL"), osa = FALSE))
t(sapply(fb, function(f){ s <- f$ts[f$ts$year == max(f$years) & f$ts$quant %in% c("B/Bmsy", "F/Fmsy"), ]
  stats::setNames(round(s$est, 2), s$quant) }))
#>               B/Bmsy F/Fmsy
#> standard        1.31   0.67
#> selex.weight    1.29   0.66
#> selex.numbers   0.96   0.92

Selectivity is close to maturity here, so the weight curve is nearly flat and the Selex fit with the index in weight is close to standard JABBA3. Read as numbers, however, the index declines less than the biomass, so mapping it as numbers implies a more depleted stock (lower B/BMSY, higher F/FMSY). The 2018 assessment combined across models gave B/BMSY = 0.59–0.82 and F/FMSY = 1.21–1.63 for 2017 (ICCAT 2018).

Check that the selectivity is plausible against the length compositions (e.g. with an FLicc fit) before using the curve: it determines how the exploitable-biomass indices map onto the spawning-biomass state.

21 From SPiCT: North Sea thornback ray

Thornback ray (Raja clavata) in Subarea 4 and divisions 3.a and 7.d (North Sea, Skagerrak, Kattegat and eastern English Channel; rjc.27.3a47d) was benchmarked at the ICES workshop WKBELASMO with SPiCT (ICES, 2023; Pedersen and Berg, 2017). This chapter converts the final SPiCT assessment to JABBA3, introduces the F random walk that JABBA3 uses for SPiCT-like fits and for index years without catch, adds the production lag and AR(1) process error, compares the result with the SPiCT assessment, and derives the ICES catch advice.

21.1 The benchmark assessment

The final assessment of WKBELASMO 2023 had:

Setting Final SPiCT assessment
Removals 1999–2021 (landings and dead discards; 1999–2008 reconstructed), with twice the catch SD before 2009 (stdevfacC = 2)
Index 1 (Q14) NS-IBTS-Q1 and FR-CGFS-Q4 combined, biomass of rays ≥ 30 cm, 1989–2021
Index 2 (Q3) NS-IBTS-Q3, BTS-Eng-Q3 and BTS-BEL-Q3 combined, biomass ≥ 30 cm, 1991–2021
r prior 0.15 (CV 0.3)
Shape Schaefer (n = 2)
Initial depletion bkfrac 0.15 (CV 0.5)
Process error sdb 0.07 (CV 0.5)
Time step dteuler = 1/4

data(rjc) holds the SPiCT input list of the final assessment (inp), the SPiCT fit as an FLStockR (spict.stk, from FLRef::spict2FLStockR(base, rel = TRUE)) and the life-history parameters of the benchmark (info):

data(rjc)
str(rjc$inp, max.level = 1)
#> List of 8
#>  $ timeC    : int [1:23] 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 ...
#>  $ obsC     : num [1:23] 1705 2012 2133 2142 2134 ...
#>  $ stdevfacC: num [1:23] 2 2 2 2 2 2 2 2 2 2 ...
#>  $ timeI    :List of 2
#>  $ obsI     :List of 2
#>  $ stdevfacI:List of 2
#>  $ dteuler  : num 0.25
#>  $ priors   :List of 6
rjc$info$lh
#>     Linf        k       t0      L50      L95        a        b        M     amax 
#> 123.6200   0.1290  -1.1540  73.7000  82.0000   0.0045   3.0961   0.1880  17.0000

With the spict package installed, the assessment refits with spict::fit.spict(rjc$inp).

21.2 Conversion

xs <- spictinp2jabba3(rjc$inp, stock = "rjc.27.3a47d")
xs$priors
#> JABBA3 priors (lognormal: median, log.sd; on = 1)
#>         median log.sd on
#> r       0.1430  0.300  1
#> K           NA  0.833  0
#> bkinit  0.1320  0.500  1
#> sdb     0.0618  0.500  1
#> m       2.0000  0.001  1
#> sdi.Q14 0.2690  0.200  1
#> sdi.Q3  0.3120  0.200  1
#> sdb: user lognormal 
#> q: flat on log q 
#> kdyn (dynamic sdb only): normal(0.77, 0.15), mean max(0, 0.148 - 0.235 log Hmsy) with the model shape (table: m = 2)
#> max catch (max): 2,827

The indices start ten years before the catch, so the model years are 1989–2021 as in SPiCT; the catch in 1989–1998 is estimated (next section). The index observation SD is SPiCT’s sdi[index] * stdevfacI, with one sdi prior per index, and the catch SD is sdc * stdevfacC (0.2 before 2009, 0.1 after). The annual model refers the indices to the start of the year; SPiCT uses the survey timing within the year (Q3 at 0.7).

fr <- jabba3(xs$data, xs$priors, xs$model, run = "JABBA3")
fr$pars[c("K", "r", "bkinit", "sdb", "sdi1", "sdi2", "sdf"), c("est", "lci", "uci")]
#>                 est          lci          uci
#> K      1.477982e+05 5.273621e+04 4.142184e+05
#> r      2.228182e-01 1.491212e-01 3.329369e-01
#> bkinit 1.203148e-01 5.788305e-02 2.500846e-01
#> sdb    4.295976e-02 1.942733e-02 9.499713e-02
#> sdi1   2.757920e-01 2.215920e-01 3.432490e-01
#> sdi2   3.120434e-01 2.468942e-01 3.943839e-01
#> sdf    1.252342e-01 8.317204e-02 1.885683e-01

21.3 Special feature: the F random walk

By default JABBA3 is conditioned on catch, as JABBA: the catch of each year enters the biomass equation, with lognormal catch error when catch.error = TRUE. SPiCT instead models fishing mortality as a random walk in all years and treats the catch as an observation of it. jb3_model(frw = ) chooses between them (chapter JABBA-like and SPiCT-like set-ups), and the SPiCT conversion uses the SPiCT-like frw = "all". With the JABBA-like frw = "gaps", the random walk is used only where the catch series has gaps or is shorter than the indices (jb3_data(catch.gaps = "estimate"), set here by the converter):

  • Years with catch stay catch-conditioned, as before.
  • Years without catch get a harvest rate HtH_t as a random effect, and the catch follows from it: Ĉt=HtKPt\hat{C}_t = H_t K P_t.
  • The random walk links the harvest rates on the log scale, logHt∼N(logHt−1,σF2)\log H_t \sim N(\log H_{t-1}, \sigma_F^2), for every step that involves a year without catch. The walk is therefore anchored to the harvest rate implied by the first observed catch (1999 here, H=C/(KP)H = C/(K P)), and the index information on biomass in 1989–1998 informs the catch in those years.
  • σF\sigma_F has the prior jb3_priors(sdf = ) (median 0.3, log-SD 0.5 by default; a SPiCT logsdf prior is carried over).
  • With frw = "all" (the conversion here) the random walk applies to all years. σF\sigma_F is then also informed by the years with catch, which tends to shrink it and to smooth F through the gaps, and the smooth F together with the catch informs the scale (K).

jbplot_catcherror() shows the observed catch (1999–2021) against the estimated catch over all model years. The years without catch are shaded: the catch there is predicted from the random walk and the biomass, and its uncertainty narrows towards the first observed catch.

jbplot_catcherror(fr)

21.4 Alternative runs: catch-conditioned, lag and AR(1)

Two alternatives to the converted run: the JABBA-like catch-conditioned dynamics (frw = "gaps"), and the protocol for process error of JABBA3, a production lag at the age at maturity with AR(1) process deviations. Age at maturity follows from the benchmark growth parameters and the length at 50% maturity (73.7 cm), and the AR(1) persistence is the default ρ=0.75\rho = 0.75:

fa <- update(fr, model = list(frw = "gaps"), run = "Catch-conditioned (gaps)")
lh <- rjc$info$lh
amat <- round(lh[["t0"]] - log(1 - lh[["L50"]]/lh[["Linf"]])/lh[["k"]])
amat
#> [1] 6
fl <- update(fr, model = list(lag = amat, rho = 0.75), run = "Lag 6 + AR(1)")
jabbaplot3(list(JABBA3 = fr, `Catch-conditioned (gaps)` = fa, `Lag 6 + AR(1)` = fl),
           bthr = NULL, blim = NULL, panels = c("Catch", "F/Fmsy", "B/Bmsy", "procdev"))

Terminal status (2021) of the three runs:

st <- function(f){ x <- f$ts[f$ts$year == 2021 & f$ts$quant %in% c("B/Bmsy", "F/Fmsy"), ]
  stats::setNames(sprintf("%.2f (%.2f-%.2f)", x$est, x$lci, x$uci), x$quant) }
noquote(t(sapply(list(JABBA3 = fr, `Catch-conditioned (gaps)` = fa, `Lag 6 + AR(1)` = fl), st)))
#>                          B/Bmsy           F/Fmsy          
#> JABBA3                   0.99 (0.52-1.86) 0.35 (0.24-0.51)
#> Catch-conditioned (gaps) 0.94 (0.45-1.95) 0.28 (0.17-0.48)
#> Lag 6 + AR(1)            1.11 (0.40-3.06) 0.39 (0.19-0.82)

The converted run reproduces the SPiCT perception: depleted in the 1990s, F below FMSYF_{MSY} since the mid-2000s and a rebuilding stock close to BMSYB_{MSY} in 2021 (B/BMSYB/B_{MSY} 0.99 and F/FMSYF/F_{MSY} 0.35, against 1.03 and 0.36 in SPiCT at the start of 2021), with K close to SPiCT’s (148,000 t against 138,000 t). K is 52 × the maximum catch, so jabba3() warns that it lies above the plausibility bound (24 ×) for this r; a slow-growing ray can be that large relative to its catch, and SPiCT agrees, so the warning is noted here. The catch-conditioned run puts K higher still (78 × max catch) and F lower (F/FMSYF/F_{MSY} 0.28): without the random walk the scale is less constrained by the catch. With the lag and AR(1) process error, the process deviations become persistent (below average production in the 1990s, above average from the mid-2000s, when the stock rebuilt), status is slightly higher, and the intervals are wider: the persistence of the production anomalies shows as uncertainty.

21.5 Comparison with the SPiCT assessment

jb3_FLStockR() converts a JABBA3 fit to an FLStockR with posterior draws. jbplot_advice() takes FLStock/FLStockR objects as well as fits, so the lag + AR(1) run can be shown with the SPiCT assessment as an FLStocks (or a list mixing fits and stocks). The SPiCT FLStockR holds the estimated trajectory only, so the intervals are shown for JABBA3. The lag + AR(1) run follows the SPiCT B/BMSYB/B_{MSY} trajectory closely:

stks <- FLCore::FLStocks(`JABBA3 lag 6 + AR(1)` = jb3_FLStockR(fl, ndraws = 1000), SPiCT = rjc$spict.stk)
jbplot_advice(stks, colours = c("dodgerblue", "black"), ncol = 3)

The same with FLRef::plotAdvice(), with the colours set manually:

FLRef::plotAdvice(stks, ncol = 3, type = "spm") +
  ggplot2::scale_fill_manual(values = c("dodgerblue", "black")) +
  ggplot2::scale_colour_manual(values = c("dodgerblue", "black"))

21.6 ICES catch advice: HCR and catch fractiles

ICES advice for stocks assessed with surplus production models follows a fixed routine (as for SPiCT stocks; the WKBELASMO forecast used it with SPiCT). jb3_advice() runs it in one call:

Step What happens jb3_advice()
1. Intermediate year From the last assessment year (2021), the stock is projected to the advice year with status quo F (mean of the last 3 years) imp.years = 1, imp = "Fsq"
2. Harvest control rule In the advice year (2023), the ICES MSY hockey-stick rule F=FMSY×min(1,B/Btrigger)F = F_{MSY} \times \min(1, B/B_{trigger}), with Btrigger=0.5BMSYB_{trigger} = 0.5\,B_{MSY}, is applied to each draw of B/BMSYB/B_{MSY} at the start of the year: this gives the distribution of the catch in the advice year ftgt = 1, btrigger = 0.5
3. Catch fractile The advised catch is a lower percentile of that distribution: the 35th percentile in the ICES advice rule, a lower one (15th or 25th) where status is uncertain fractiles = c(0.35, 0.25, 0.15)
4. Advice table Each advised catch is projected: F in the advice year, B/BMSYB/B_{MSY} at the start of 2024 and the probability of falling below Blim=0.3BMSYB_{lim} = 0.3\,B_{MSY} (the precautionary check: at most 5%) blim = 0.3

The assessment of 2022 uses data up to 2021, so there is one intermediate year (2022) before the advice year (2023). Other catch options, such as the status quo catch and a 20% increase (two of the WKBELASMO scenarios), are added with catch. The advice is derived for the converted run and for the lag + AR(1) run:

csq <- mean(tail(fr$data$catch, 2))          # average removals 2020-2021
opts <- c(`Status quo catch` = csq, `Status quo catch +20%` = 1.2*csq)
adv0 <- jb3_advice(fr, fractiles = c(0.35, 0.25, 0.15), imp.years = 1, catch = opts, ndraws = 4000)
adv  <- jb3_advice(fl, fractiles = c(0.35, 0.25, 0.15), imp.years = 1, catch = opts, ndraws = 4000)
adv
#> Catch advice for 2023 (assessment to 2021), MSY hockey-stick rule: F = 1.00 Fmsy x min(1, B/0.50 Bmsy)
#> Intermediate year 2022: status quo F (median catch 3134)
#> Advice-year catch under the HCR: median 8030; 35th percentile: 6839; 25th percentile: 6096; 15th percentile: 5282
#> 
#>                  Basis C 2023 F/Ftgt 2023 B/Btgt 2024 B change P(B>Blim) P(B>Bpa) P(B>Btgt)
#>            HCR, median   8030       0.995       1.184      3.1      99.6     94.8      63.0
#>   HCR, 35th percentile   6839       0.848       1.198      4.3      99.6     95.0      63.8
#>   HCR, 25th percentile   6096       0.756       1.208      5.2      99.6     95.2      64.3
#>   HCR, 15th percentile   5282       0.655       1.219      6.2      99.6     95.4      65.0
#>       Status quo catch   2783       0.345       1.253      9.0      99.7     96.4      67.1
#>  Status quo catch +20%   3340       0.414       1.245      8.4      99.7     96.1      66.6
#>  P(B<Blim) PA (P(B<Blim) <= 5%)
#>        0.4                  yes
#>        0.4                  yes
#>        0.4                  yes
#>        0.4                  yes
#>        0.3                  yes
#>        0.3                  yes

The two runs side by side:

cmp <- function(a, f){
  tb <- a$table; r <- function(b) tb[tb$Basis == b, ]
  fmt <- function(b) sprintf("%s (F/Fmsy %.2f)", format(round(r(b)[[2]]), big.mark = ","), r(b)[[3]])
  c(`B/Bmsy 2021` = sprintf("%.2f", f$ts$est[f$ts$quant == "B/Bmsy" & f$ts$year == 2021]),
    MSY = format(round(f$refpts["MSY", "est"]), big.mark = ","),
    `CV of the 2023 catch under the HCR` = sprintf("%.2f", stats::sd(log(a$catch))),
    `Median catch 2023` = format(round(stats::median(a$catch)), big.mark = ","),
    `35th percentile (ICES advice)` = fmt("HCR, 35th percentile"),
    `25th percentile` = fmt("HCR, 25th percentile"),
    `15th percentile` = fmt("HCR, 15th percentile"),
    `P(B 2024 < Blim) at the 35th` = sprintf("%.1f%%", r("HCR, 35th percentile")$`P(B<Blim)`))
}
knitr::kable(cbind(JABBA3 = cmp(adv0, fr), `Lag 6 + AR(1)` = cmp(adv, fl)))
JABBA3 Lag 6 + AR(1)
B/Bmsy 2021 0.99 1.11
MSY 8,233 6,563
CV of the 2023 catch under the HCR 0.20 0.40
Median catch 2023 9,193 8,030
35th percentile (ICES advice) 8,507 (F/Fmsy 0.92) 6,839 (F/Fmsy 0.85)
25th percentile 8,025 (F/Fmsy 0.87) 6,096 (F/Fmsy 0.76)
15th percentile 7,446 (F/Fmsy 0.81) 5,282 (F/Fmsy 0.66)
P(B 2024 < Blim) at the 35th 0.0% 0.4%

For the lag + AR(1) run: the distribution of the advice-year catch under the HCR, with the median and the fractiles,

jbplot_advicecatch(adv)

the forecast of the catch options (adv$options, a jb3_fwd() projection),

jbplot_projection(adv$options, nyears = 10)+ ggplot2::facet_wrap(~quant, scales = "free_y", ncol = 3)

and the advice table (adv$table):

knitr::kable(adv$table)
Basis C 2023 F/Ftgt 2023 B/Btgt 2024 B change P(B>Blim) P(B>Bpa) P(B>Btgt) P(B<Blim) PA (P(B<Blim) <= 5%)
HCR, median 8030 0.995 1.184 3.1 99.6 94.8 63.0 0.4 yes
HCR, 35th percentile 6839 0.848 1.198 4.3 99.6 95.0 63.8 0.4 yes
HCR, 25th percentile 6096 0.756 1.208 5.2 99.6 95.2 64.3 0.4 yes
HCR, 15th percentile 5282 0.655 1.219 6.2 99.6 95.4 65.0 0.4 yes
Status quo catch 2783 0.345 1.253 9.0 99.7 96.4 67.1 0.3 yes
Status quo catch +20% 3340 0.414 1.245 8.4 99.7 96.1 66.6 0.3 yes

What the comparison shows:

  • Lag + AR(1) gives the more precautionary advice, although it estimates the stock slightly higher. Two effects lower the advice: MSY is lower, and the forecast catch is much less certain. The persistent process deviations carry into the forecast years, so the CV of the advice-year catch nearly doubles.
  • The fractile takes a larger cut where the uncertainty is larger. The 35th percentile is about 93% of the median catch in the converted run and about 85% with lag + AR(1); the 15th percentile about 82% and 66%. The fractile acts through the uncertainty, not the point estimate, which is how the rule is meant to work.
  • The SPiCT advice lies between the two runs. WKBELASMO gave 8051 t at the 35th percentile (F/Fmsy 0.92, B/Bmsy 1.14 at the start of 2024), 7074 t at the 15th percentile and 3441 t for a 20% increase on the realised removals. The converted run gives about 8,500 t and the lag + AR(1) run about 6,800 t at the 35th percentile.
  • With the uncertainty modelled, a very low fractile may be overly cautious. Allowing for persistence widens the forecast uncertainty, and with a fixed fractile that turns directly into precaution, so a 15th percentile on top of it lowers F to about 0.65 FMSYF_{MSY}.

22 FLR outputs

jb3_flqs() returns the time series as FLQuants (stock = B/Bmsy, harvest = F/Fmsy, biomass, F and catch), with the draws as iterations when the fit has draws; jb3_flpar() returns parameters, reference points and current status as an FLPar.

fq <- jb3_flqs(fit)
names(fq)
#> [1] "stock"   "harvest" "biomass" "F"       "catch"
dim(fq$stock)
#> [1]    1   68    1    1    1 1000
jb3_flpar(fit)
#> An object of class "FLPar"
#> params
#>        K        r        m     Bmsy     Fmsy      MSY    BmsyK      sdb   B.Bmsy   F.Fmsy 
#> 1.14e+06 1.97e-01 1.00e+00 4.21e+05 1.97e-01 8.31e+04 3.68e-01 8.68e-02 7.89e-01 1.17e+00 
#> units:  NA NA NA NA NA NA NA NA NA NA

These plot with ggplotFL and can be used in FLR workflows (e.g. as the output of an estimator in mse):

library(ggplotFL)
plot(fq[c("stock", "harvest", "catch")]) + ggplot2::geom_hline(yintercept = 1, linetype = 2)

22.1 FLStockR

jb3_FLStockR() converts the fit to a biomass-dynamic FLStockR, as FLRef::jabba2FLStockR(): biomass in stock (and ssb()), catch, and the harvest rate in harvest, with the draws as iterations. The refpts slot holds FMSYF_{MSY}, BMSYB_{MSY}, MSY, BthrB_{thr} and BlimB_{lim} (by default 0.5 and 0.3 BMSYB_{MSY}, the SPiCT benchmark defaults) and B0B_0. Advice from surplus production models is given in relative terms, so by default the stock is in B/BMSYB/B_{MSY} and F/FMSYF/F_{MSY}; rel = FALSE gives absolute biomass and harvest rate.

stk <- jb3_FLStockR(fit, ndraws = 500)        # relative (B/Bmsy, F/Fmsy) by default
stk@refpts
#> An object of class "FLPar"
#> params
#>     Fmsy     Bmsy      MSY     Bthr     Blim       B0 
#>     1.00     1.00 83077.15     0.50     0.30     2.72 
#> units:  NA
FLRef::plotAdvice(stk, type = "spm") + ggplot2::facet_wrap(~qname, ncol = 1, scales = "free_y")

Absolute biomass and harvest rate with rel = FALSE:

FLRef::plotAdvice(jb3_FLStockR(fit, rel = FALSE, ndraws = 500), type = "spm") +
  ggplot2::facet_wrap(~qname, ncol = 1, scales = "free_y")

23 Converting from JABBA and SPiCT

23.1 JABBA: jbinput2jabba3()

jbinput2jabba3() takes the object returned by JABBA::build_jabba(), or a fitted JABBA::fit_jabba() object, and returns list(data, priors, model) for jabba3(). It carries over the priors (r, K, psi to bkinit, shape, catchability, status priors), the production lag, catch error, catchability and variance groups, proc.dev.all, the BioProcDyn process-error options, auxiliary data and the Selex curves, and reports each difference:

  • the observation error is carried over exactly: the index se are JABBA’s total input SD, sqrt(SE2) (se and fixed.obsE combined), with se.min = 0;
  • JABBA’s gamma(a, b) prior on the inverse process variance (build_jabba(igamma = ), default c(4, 0.01)) is kept exactly when it is informative (jb3_priors(sdb = "igamma", igamma = c(a, b))); the diffuse inverse-gamma(0.001, 0.001) can collapse to sdb = 0 at the posterior mode and is replaced by a proxy (igamma.proxy): the JABBA posterior of sigma.proc as a lognormal prior on sdb ("posterior", the default for a fit) or sdb fixed at its posterior median ("fixed"), and the FishLife prior for a build_jabba() object ("fishlife"); "igamma" keeps it (for engine = "nuts");
  • q gets a flat prior on log q (q.uniform = TRUE reproduces the JAGS uniform prior on q);
  • JABBA reports posterior medians, JABBA3 the posterior mode (unless engine = "nuts").

For a fit, the JABBA trajectories are returned in x$jabba$ts (same format as fit$ts) for a direct comparison:

jbfit <- JABBA::fit_jabba(jb, ni = 30000, nt = 5, nb = 10000, nc = 2)   # JAGS
x  <- jbinput2jabba3(jbfit)                # data, priors and settings of the fit
f3 <- jabba3(x$data, x$priors, x$model)
merge(f3$ts[f3$ts$quant == "B/Bmsy", c("year", "est")],
      x$jabba$ts[x$jabba$ts$quant == "B/Bmsy", c("year", "est")], by = "year", suffixes = c(".jabba3", ".jabba"))

ICCAT bigeye, JABBA Fox model in JAGS (sigma.est = FALSE, fixed.obsE = 0.01): with JABBA’s default inverse-gamma(4, 0.01) carried over exactly, the JABBA3 B/BMSYB/B_{MSY} and F/FMSYF/F_{MSY} are within 2% of the JABBA medians in every year (K 1.21 vs 1.23 million t); with the diffuse inverse-gamma(0.001, 0.001) and the posterior proxy within 4%, and with sdb fixed at the posterior median within 3%.

jb <- JABBA::build_jabba(catch = bet$catch, cpue = bet$cpue, se = bet$se, model.type = "Fox",
                         r.prior = c(0.2, 0.5), psi.prior = c(0.9, 0.25), verbose = FALSE)
options(scipen = 0)          # build_jabba() sets options(scipen = 999)
x  <- jbinput2jabba3(jb)
f2 <- jabba3(x$data, x$priors, x$model, osa = FALSE)
signif(f2$pars[c("K", "r", "sdb"), c("est", "lci", "uci")], 4)
#>           est       lci       uci
#> K   1.208e+06 8.117e+05 1.797e+06
#> r   1.812e-01 1.137e-01 2.886e-01
#> sdb 4.402e-02 2.952e-02 6.564e-02

With JABBA’s default inverse-gamma(4, 0.01) process-error prior carried over, K = 1.21 million t and B/BMSYB/B_{MSY} = 0.74 in 2017 (the JABBA3 FishLife prior gives K = 1,174,749 and 0.797, chapter JABBA-like or SPiCT-like).

23.2 SPiCT: spictinp2jabba3()

spictinp2jabba3() takes a SPiCT input list (inp, as passed to spict::fit.spict()). JABBA3 is an annual model: catches are summed by calendar year and several index observations in a year are averaged (geometric mean). The model years span the catch and the indices, as in SPiCT; the catch in index years without catch is estimated with the hybrid F random walk (see the thornback ray chapter). SPiCT’s observation-error form is used (obs.error = "spict"): the observation SD is sdi[index] * stdevfacI, and the catch SD sdc * stdevfacC. The priors logr, logK, logbkfrac, logsdb, logn, logsdi (one prior per index when given by index) and logsdf carry over with their on/off switches, a fixed n (phase -1) fixes the shape, and logngamma becomes a lognormal prior on m. By default (spict.like = TRUE) the conversion keeps SPiCT’s process structure: a random walk on F in all years (frw = "all"), which is how SPiCT identifies the scale when the catch is known; the catch SD estimated when SPiCT has a logsdc prior; no K prior unless SPiCT has one, no cap on K, and the best of several starting values (including K-profile starts); jabba3() warns when K exceeds the r-based plausibility bound. spict.like = FALSE gives the catch-conditioned (JABBA-like) conversion. The alpha and beta priors (ratios of observation to process SDs) have no JABBA3 equivalent and are reported as dropped. Chapter JABBA-like or SPiCT-like explains the settings and shows the manual set-up; the thornback ray chapter converts a full ICES benchmark assessment.

A SPiCT-style input list built from the bigeye data:

ok1 <- is.finite(bet$cpue[, 2]); ok2 <- is.finite(bet$cpue[, 3])
inp <- list(obsC = bet$catch[, 2], timeC = bet$catch[, 1],
            obsI = list(bet$cpue[ok1, 2], bet$cpue[ok2, 3]),
            timeI = list(bet$cpue[ok1, 1] + 0.5, bet$cpue[ok2, 1] + 0.5),
            priors = list(logr = c(log(0.2), 0.5, 1), logn = c(log(2), 2, 0), logbkfrac = c(log(0.8), 0.5, 1)),
            ini = list(logn = log(2)), phases = list(logn = -1))
xs <- spictinp2jabba3(inp, stock = "bet")
fs <- jabba3(xs$data, xs$priors, xs$model, osa = FALSE)
signif(fs$pars[c("K", "r", "sdb"), c("est", "lci", "uci")], 4)
#>           est       lci       uci
#> K   1.181e+06 6.845e+05 2.039e+06
#> r   3.093e-01 1.707e-01 5.602e-01
#> sdb 8.867e-02 6.240e-02 1.260e-01

With the spict package installed, its example data convert the same way:

data(pol, package = "spict")
xp <- spictinp2jabba3(pol$albacore, stock = "albacore")
fp <- jabba3(xp$data, xp$priors, xp$model)
fp
#> JABBA3 fit: albacore ( albacore )  engine: rtmb  
#>   model: schaefer    
#>   convergence: ok (max gradient 1.6e-10, Newton decrement 2.1e-21)
#>   estimates (mode, 95% CI):
#>             est      lci      uci
#> K      284.0000 167.0000 483.0000
#> r        0.2630   0.1260   0.5500
#> bkinit   1.1300   0.7480   1.7000
#> sdb      0.0575   0.0345   0.0958
#> q1       0.2080   0.0993   0.4350
#> sdi1     0.1110   0.0780   0.1580
#> m        2.0000       NA       NA
#> sdf      0.2660   0.1840   0.3840
#> Bmsy   142.0000  83.5000 241.0000
#> Fmsy     0.1320   0.0630   0.2750
#> MSY     18.7000  13.9000  25.1000
#>   status 1989: B/Bmsy 0.71 (0.48-1.07), F/Fmsy 1.89 (1.16-3.06)

24 Model equations

Process equation. Biomass relative to K, Pt=Bt/KP_t = B_t/K, with process error acting after the catch (Winker et al. 2018) and a production lag LL:

logPt=log[Pt−1+rm−1Pt−1−L(1−Pt−1−Lm−1)−Ct−1K]+dt, \log P_t = \log\left[P_{t-1} + \frac{r}{m-1} P_{t-1-L}\left(1 - P_{t-1-L}^{\,m-1}\right) - \frac{C_{t-1}}{K}\right] + d_t ,

where mm is the Pella-Tomlinson shape (m=2m = 2 Schaefer, m→1m \to 1 Fox) and P1P_1 = bkinit. Years before the start use the initial depletion for the lagged term.

Process deviations. Stationary AR(1), with σt\sigma_t the marginal SD:

d1∼N(0,σ12),dt∼N(ρdt−1,σt2(1−ρ2)), d_1 \sim N(0, \sigma_1^2), \qquad d_t \sim N\left(\rho\, d_{t-1},\ \sigma_t^2 (1-\rho^2)\right),

ρ=0\rho = 0 giving the independent process error of JABBA and SPiCT. Either σt=σMSY\sigma_t = \sigma_{MSY} (constant) or σt=σMSYxt−k\sigma_t = \sigma_{MSY} x_t^{-k} with xt=Bt/BMSYx_t = B_t/B_{MSY} bounded to xlim (dynamic).

Reference points.

BMSYK=m−1/(m−1),FMSY=rm,MSY=FMSYBMSY. \frac{B_{MSY}}{K} = m^{-1/(m-1)}, \qquad F_{MSY} = \frac{r}{m}, \qquad MSY = F_{MSY} B_{MSY}.

What F means in JABBA3. F=C/B‾F = C/\bar B is catch over mean-of-year exploitable biomass. A surplus production model has no within-year timing; the mean-of-year interpretation comes from the life-history priors, which equate r/mr/m with MSY/EB‾MSYMSY/\bar{EB}_{MSY} of age-structured models. On this scale the catch equation gives C=FEB‾C = F\,\bar{EB}, so JABBA3’s FF equals the fishing mortality of fully selected fish, and F/FMSYF/F_{MSY} is directly comparable with F/FMSYF/F_{MSY} of age-structured assessments. Absolute FF differs from FbarF_{bar} only through selectivity over the FbarF_{bar} age range. FF is not the start-of-year exploitation fraction U=1−e−FU = 1 - e^{-F} of Hilborn and Walters or sraplus, so no −log(1−U)-\log(1-U) conversion applies; FF (the harvest rate at MSY, HMSYH_{MSY}, in the process-error prior) can exceed 1 for fast-growing species.

Observations. Index ii in year tt:

logIi,t=logqi+log(KPt)+εi,t,εi,t∼N(0,sei,t2+sdii2) \log I_{i,t} = \log q_i + \log(K P_t) + \varepsilon_{i,t}, \qquad \varepsilon_{i,t} \sim N\left(0,\ se_{i,t}^2 + sdi_i^2\right)

(obs.error = "additive"), or εi,t∼N(0,(sdiiwi,t)2)\varepsilon_{i,t} \sim N(0, (sdi_i\,w_{i,t})^2) (obs.error = "spict"). Catch: logCtobs∼N(logCt,sdc2)\log C^{obs}_t \sim N(\log C_t, sdc^2) when catch.error = TRUE.

Estimation. The states logPt\log P_t and catch deviations are random effects, integrated by the Laplace approximation (engine = "rtmb") or sampled with the fixed effects (engine = "nuts").

25 Summary of checks and functions

# Check Red flag Action
1 data (jbplot_data) no contrast; conflicting indices r prior, status priors; separate sdi; sensitivity runs
2 prior and posterior (jbplot_priorpost) posterior = prior; posterior at the edge report; revisit priors
3 convergence (jb3_convergence) gradient, Hessian, Newton decrement restarts; priors on r or K; fewer groups
4 residuals (jbplot_residuals, jbplot_runs, jb3_diags) trends, failed runs or Ljung-Box tests lag + AR(1); index conflict
5 retrospective (jb3_retro) Mohn’s rho beyond -0.15 to 0.20 recent data, q
6 hindcast (jb3_hindcast) MASE > 1 index without prediction skill
7 process deviations (jbplot_procdev) long runs of one sign rho = 0.75, lag = amat
8 NUTS (jb3_nuts_diags, jbplot_nuts) R̂>1.01\hat{R} > 1.01, low ESS, divergences, E-BFMI < 0.3 longer chains; adapt_delta; priors
Topic Recommendation
Process error lag at the age at maturity + AR(1) with ρ=0.75\rho = 0.75 (sensitivity 0.5, 0.9); FishLife prior on σMSY\sigma_{MSY}
Shape Pella with BMSY/K=0.4B_{MSY}/K = 0.4 unless known; convert the r prior with the shape
Engine posterior mode for exploration, diagnostics, retro and hindcast; NUTS for final runs, and for catch-only and prior predictive runs
Data-limited start with the prior predictive run (prior.only = TRUE); add status priors or auxiliary data and report how far each moves status
Simulation testing and MSE se = FALSE, osa = FALSE

25.1 Function reference

Area Functions
Example data iccat, kobsim, jara_examples, rjc (thornback ray, ICES WKBELASMO SPiCT assessment)
Data jb3_data() (catch-only with indices = NULL; auxiliary data), jb3_data_jabba()
Data exploration (JARA) jb3_trend() (relative joint index, census, time blocks), jb3_jointindex(), jb3_catchfill(), jb3_fill_table(), jb3_qtable() (relative catchabilities), jbplot_trend(), jbplot_jointindex(), jbplot_catchfill(), jbplot_q(), jbplot_indexcor() (pairwise index correlations); diagnostics with jbplot_fits(), jbplot_runs(), jbplot_residuals(), jbplot_ppc()
Priors and model jb3_priors(), jb3_bprior() (status priors), jb3_model() (incl. effort.creep, aux.q, aux.sd, param)
Fitting jabba3() (incl. prior.only = TRUE), update() (refit with changed priors, model options, data or settings; sensitivity runs), jb3_draws()
Workflows jb3_workflow(), jb3_tier1(), jb3_tier2()
Convergence jb3_convergence()
Residual diagnostics jb3_osa(), jb3_diags(), jb3_runs(), jb3_retro(), jb3_hindcast()
NUTS diagnostics jb3_nuts_diags(), jb3_nuts_ess(), jbplot_nuts(), jbplot_nutsdiags(), jbplot_trace(), jbplot_rank(), jbplot_mcmcdens(), jbplot_mcmcacf(), jbplot_pairs(), jbplot_rhat(), jbplot_energy()
Projections jb3_project() (F/Fmsy scenarios by default, or constant catch; optional intermediate years), jb3_fwd() (forecast controls, as fw_jabba_ctrl())
Ensembles and HCR jb3_ensemble(), jb3_weights(), jb3_hcr(), jbplot_hcr(), jb3_advice() (ICES HCR + catch fractile advice), jbplot_advicecatch(), jb3_fwdtable() (GFCM fishing opportunities)
FLR jb3_flqs(), jb3_flpar(), jb3_FLStockR()
Life history jb3_leslie(), jb3_fmsy2r(), jb3_r2fmsy(), jb3_rho_gt(), jb3_rho_table(), jb3_selex(), jb3_sel5(), jbplot_selex()
Tables jb3_partable(), jb3_tstable(), jb3_projtable(), jb3_kobematrix(), jb3_kobematrix_iotc(), jb3_kobematrix_gfcm(), jb3_kobematrix_ices(), jbplot_kobematrix(), jb3_nuts_diags()
FLR outputs jb3_flqs(), jb3_flpar()
Converters jbdat2flr(), jbcatch2flq(), jbidx2FLIndices(), flr2jbdat(), jbinput2jabba3(), spictinp2jabba3()
Graphics: data jbplot_data(), jbplot_indices()
Graphics: estimates jbplot_advice(), jbplot_trj(), jbplot_kobe(), jbplot_biplot(), jbplot_procdev(), jbplot_catch(), jbplot_catcherror(), jbplot_spphase(), jbplot_spdyn(), jbplot_production(), jbplot_ebsb_status()
Graphics: priors jbplot_priorpost(), jbplot_priorpost_trj() (prior predictive vs posterior), jbplot_bprior()
Graphics: diagnostics jbplot_fits(), jbplot_auxfits(), jbplot_residuals(), jbplot_stdresiduals(), jbplot_runs(), jbplot_spdiags(), jbplot_ppc(), jbplot_retro(), jbplot_hcxval()
Graphics: runs and projections jbplot_steps(), jbplot_ensemble(), jbplot_summary(), jbplot_projection(), jbplot_crisk(), jbplot_hcr()
Graphics: overview plot() / jabbaplot3() (3 x 3 panels, single fit or runs)
Graphics: all jbplot_all()
Graphics helpers theme_jabba3(), scale_x_year(), jb3cols()
Information jabba3_info()

Planned: multi-fleet Selex, auxiliary-data lags (JABBA auxiliary.lag), a worked simulation-testing example.

26 References

Betancourt, M. (2018). Calibrating model-based inferences and decisions. arXiv:1803.08393. https://arxiv.org/abs/1803.08393

Carvalho, F., Winker, H., Courtney, D., Kapur, M., Kell, L., Cardinale, M., Schirripa, M., Kitakado, T., Yemane, D., Piner, K.R., Maunder, M.N., Taylor, I., Wetzel, C.R., Doering, K., Johnson, K.F. and Methot, R.D. (2021). A cookbook for using model diagnostics in integrated stock assessments. Fisheries Research 240: 105959.

Conn, P.B. (2010). Hierarchical analysis of multiple noisy abundance indices. Canadian Journal of Fisheries and Aquatic Sciences, 67, 108-120. doi:10.1139/F09-175

Francis, R.I.C.C. (2011). Data weighting in statistical fisheries stock assessment models. Canadian Journal of Fisheries and Aquatic Sciences, 68, 1124-1138.

Hoyle, S.D., Huang, J.H.-W., Kim, D.N., Lee, M.K., Matsumoto, T. and Walter, J. (2019). Collaborative study of bigeye tuna CPUE from multiple Atlantic Ocean longline fleets in 2018. Collective Volume of Scientific Papers ICCAT 75(7): 2033-2080 (SCRS/2018/058).

ICCAT (2018). Report of the 2018 ICCAT bigeye tuna stock assessment meeting. International Commission for the Conservation of Atlantic Tunas, Madrid. https://www.iccat.int/Documents/Meetings/Docs/2018/REPORTS/2018_BET_SA_ENG.pdf

ICES (2023). Benchmark workshop on selected elasmobranch stocks (WKBELASMO). ICES Scientific Reports 5:45. 117 pp. doi:10.17895/ices.pub.22760042

Kell, L.T., Cardinale, M., Mosqueira, I., Winker, H. and Sharma, R. (2025). Transforming data and capacity-limited stock assessment: achieving risk equivalence with hierarchical assessment frameworks and auxiliary data. Sustainability 17: 9383. doi:10.3390/su17219383

Kell, L.T., Mosqueira, I., Grosjean, P., Fromentin, J.-M., Garcia, D., Hillary, R., Jardim, E., Mardle, S., Pastoors, M.A., Poos, J.J., Scott, F. and Scott, R.D. (2007). FLR: an open-source framework for the evaluation and development of management strategies. ICES Journal of Marine Science 64(4): 640-646.

Kell, L.T., Sharma, R., Kitakado, T., Winker, H., Mosqueira, I., Cardinale, M. and Fu, D. (2021). Validation of stock assessment methods: is it me or my model talking? ICES Journal of Marine Science 78(6): 2244-2255.

Kristensen, K., Nielsen, A., Berg, C.W., Skaug, H. and Bell, B.M. (2016). TMB: automatic differentiation and Laplace approximation. Journal of Statistical Software 70(5): 1-21.

Meyer, R. and Millar, R.B. (1999). BUGS in Bayesian stock assessments. Canadian Journal of Fisheries and Aquatic Sciences 56: 1078-1086.

Monnahan, C.C. and Kristensen, K. (2018). No-U-turn sampling for fast Bayesian inference in ADMB and TMB: introducing the adnuts and tmbstan R packages. PLoS ONE 13(5): e0197954.

Pedersen, M.W. and Berg, C.W. (2017). A stochastic surplus production model in continuous time. Fish and Fisheries 18(2): 226-243.

Schad, D.J., Betancourt, M. and Vasishth, S. (2021). Toward a principled Bayesian workflow in cognitive science. Psychological Methods, 26, 103-126. Preprint: https://arxiv.org/abs/1904.12765

SEDAR (2024). SEDAR 77 Stock Assessment Report: HMS Hammerhead Sharks. SEDAR, North Charleston, SC. https://sedarweb.org/documents/sedar-77-hms-hammerhead-sharks-final-stock-assessment-report/

Sherley, R.B. et al. (2020). Ecology and Evolution (JARA census model applied to absolute abundance indices). doi:10.1002/ece3.6554

Thorson, J.T. (2020). Predicting recruitment density dependence and intrinsic growth rate for all fishes worldwide using a data-integrated life-history model. Fish and Fisheries 21(2): 237-251.

Thorson, J.T., Shelton, A.O., Ward, E.J. and Skaug, H.J. (2015). Geostatistical delta-generalized linear mixed models improve precision for estimated abundance indices for West Coast groundfishes. ICES Journal of Marine Science, 72, 1297-1310.

Thygesen, U.H., Albertsen, C.M., Berg, C.W., Kristensen, K. and Nielsen, A. (2017). Validation of ecological state space models using the Laplace approximation. Environmental and Ecological Statistics 24(2): 317-339.

Vehtari, A., Gelman, A., Simpson, D., Carpenter, B. and Bürkner, P.-C. (2021). Rank-normalization, folding, and localization: an improved R̂\hat{R} for assessing convergence of MCMC. Bayesian Analysis 16(2): 667-718.

Winker, H. et al. (2026). Process error in surplus production models: scale, persistence and inflation (BioProcDyn). In preparation.

Winker, H., Carvalho, F. and Kapur, M. (2018). JABBA: Just Another Bayesian Biomass Assessment. Fisheries Research 204: 275-288.

Winker, H., Carvalho, F., Thorson, J.T., Kell, L.T., Parker, D., Kapur, M., Sharma, R., Booth, A.J. and Kerwath, S.E. (2020). JABBA-Select: incorporating life history and fisheries’ selectivity into surplus production models. Fisheries Research 222: 105355.

Winker, H., Thorson, J.T., Fairweather, T., Leslie, R. and Durholtz, D. (2017). Towards improving precision in South African demersal trawl survey indices using geostatistical GLMMs. MARAM/IWS/2017/Hake/BG8. University of Cape Town.