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):
FLQuant, indices
as FLIndices; status, reference points and parameters out
as FLQuants and FLPar.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) |
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.
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:
| 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.
rstancompiles 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 withpkgbuild::has_build_tools(debug = TRUE)before installingrstan. JABBA3 runs without NUTS; onlyengine = "nuts", the NUTS chapters and catch-only runs need it.
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 TRUEAtlantic 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 NAThree 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.
plot(fit)plot(fit) (or jabbaplot3(fit)) is the
one-page summary of a fit, as SPiCT’s plot():
plot(fit, "simple") gives a 2 x 2 version
(,
,
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")).
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, style = "contours") # filled 50/80/95% regions, as jbplot_biplot(); contours = FALSE: points onlyjbplot_all(fit, dir) writes all standard plots of a fit
to PNG files.
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_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:
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] TRUEAll functions that take the data work the same way with FLR input;
jbplot_data() also takes the FLR objects directly:
Several catch columns give FLQuants (one per fleet)
unless fleets = FALSE. jbcatch2flq() and
jbidx2FLIndices() convert the catch and the indices
separately.
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 39Index 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.
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 |
Before fitting a production model it pays to look at the abundance indices on their own: do they tell the same story, how do they scale against each other, and do some of them conflict? JABBA3 includes the trend models of JARA, refitted in RTMB, for this: a state-space random walk with drift on log abundance, observed through one or several indices. For index in year :
The common state
is the joint trend; each index has its own catchability
,
relative to the first (reference) index with
,
and its own additional observation SD
(variance.weighting = "model"; "equal"
estimates one common value, "fixed" none;
fixed.obsE is
).
The joint index follows the hierarchical analysis of multiple noisy
abundance indices of Conn (2010), widely used in US (SEDAR) assessments:
JARA’s random-walk form gives practically the same joint index as Conn’s
independent year effects (state = "iid").
The fits carry the same diagnostics as a jabba3() fit
(fits, runs tests, joint residuals, posterior predictive checks), with
one-step-ahead (OSA) residuals by default and
type = "ordinary" for the log residuals used in JARA
reports.
Log-scale standard errors. All models use observation errors on the log scale. From a design-based SD of the untransformed index, use and (close to the CV for CV < 0.4); from a 95% interval, .
The joint-index models rest on the hierarchical framework of Conn (2010). Each index is taken to measure the same relative abundance , but through its own catchability , with two kinds of error: process error , from year-to-year variation in catchability or in the spatial distribution of the stock relative to the fishery or survey, and sampling error , known from the input CV of each value:
Only differences between the
are identifiable, so one constraint is needed: a reference index with
(;
JABBA3) or an anchor on the mean of the
or
.
Conn treats the
as independent year effects; JABBA3 (following JARA) places a random
walk with drift on
(state = "rw"), which carries the trend through years with
few or no observations, and fits Conn’s form with
state = "iid". The estimated index-specific
correspond to JABBA3’s additional observation SD
(variance.weighting = "model"). The outputs follow
directly: each
is the scale of index
relative to the reference index, not an absolute catchability;
the joint index is the estimated
with its uncertainty; and residual patterns that persist for one index
against the common trend point to conflicts between indices rather than
to noise.
The two Japanese longline CPUE series of bigeye cover consecutive periods (1959-1978 and 1979-2017) and do not overlap. A relative trend model aligns them on one consistent trend, each index scaled by its catchability:
tr.bet <- jb3_trend(bet$cpue, bet$se, run = "bigeye")
tr.bet
#> JABBA3 trend fit (relative): bigeye
#> indices: JR2_early, JR2_late | years 1959 - 2017
#> convergence: ok (max gradient 2.3e-12)
#> process SD = 0.068
#> drift r:
#> trend
#> 1959-2017 -0.027
#> index q sdi
#> JR2_early 1.00 0.0483
#> JR2_late 2.36 0.0413jb3_qtable() gives the catchability of each index
relative to the reference index (the first one, q = 1 by definition)
with its 95% interval, and jbplot_q() its distribution,
with the reference as a vertical line at 1:
| index | q | lci | uci | log.se | n | years | reference |
|---|---|---|---|---|---|---|---|
| JR2_early | 1.00 | 1.00 | 1.00 | NA | 20 | 1959-1978 | TRUE |
| JR2_late | 2.36 | 1.55 | 3.59 | 0.215 | 39 | 1979-2017 | FALSE |
The late series has a catchability about 2.4 times that of the early series. Because the series do not overlap, the scaling rests on the continuity of the trend across 1978/79, and the interval is correspondingly wide. In the production model, the two series keep their own q; the trend model shows how much the data alone say about their relative scale.
Differences in q between series are rarely a nuisance parameter only. In fishery-independent surveys, abrupt changes in catchability follow changes of research vessel or trawl gear. A comparison of design-based swept-area estimates and geostatistical delta-GLMM indices (Thorson et al. 2015) for eight species of a demersal trawl survey (Winker et al. 2017) found clear vessel effects for several species, seen as abrupt steps in the index at the change of research vessel, and a gear effect (lower catchability with the new gear) for one species. Both estimators showed the same steps, so the change was in q, not in the estimator. Such a change should be modelled as a change in q, not read as a change in abundance: split the index at the known change and let the trend model (or the production model) estimate a q for each period.
jb3_splitindex() does the split. A hypothetical example:
a survey index whose new vessel, from 2009, catches 40% less than the
old one (q ratio 0.6).
a <- jara_examples$areas
s <- a$idx[c("year", "area3")]; se <- a$idx.se[c("year", "area3")]
new.v <- 0.6*s$area3 # what the new vessel would catch
obs <- s; obs$area3[s$year >= 2009] <- new.v[s$year >= 2009]
# (a) no overlap: the old vessel stops in 2008
x0 <- jb3_splitindex(obs, se, "area3", at = 2009, labels = c("vessel.old", "vessel.new"))
# (b) three calibration years (2009-2011) fished with both vessels
obs1 <- obs; cy <- 2009:2011; obs1$area3[s$year %in% cy] <- s$area3[s$year %in% cy]
x1 <- jb3_splitindex(obs1, se, "area3", at = 2009, overlap = cy, new = new.v[s$year %in% cy],
labels = c("vessel.old", "vessel.new"))
q.split <- rbind(cbind(design = "no overlap", jb3_qtable(jb3_trend(x0$I, x0$se), digits = 3)[2, ]),
cbind(design = "3 calibration years", jb3_qtable(jb3_trend(x1$I, x1$se), digits = 3)[2, ]))
knitr::kable(q.split[, c("design", "index", "q", "lci", "uci")], row.names = FALSE,
caption = "q of the new vessel relative to the old (true value 0.6)")| design | index | q | lci | uci |
|---|---|---|---|---|
| no overlap | vessel.new | 1.060 | 0.544 | 2.080 |
| 3 calibration years | vessel.new | 0.644 | 0.458 | 0.906 |
Without overlap the trend model cannot tell a lower q from a decline in the stock: the estimated ratio is close to 1 with a wide interval, and the step appears as a decline in the common trend. Three calibration years recover the ratio (about 0.64, interval excluding 1). The same holds for the bigeye longline series above, whose relative q rests on the continuity of the trend alone. Other indices help to identify a change in q only if they follow the same trend; indices from areas with different trends (chapter Other data features) do not.
Survey indices from a design-based swept-area estimator assume that density is homogeneous within each stratum. For patchy species, or species found in only part of the survey area, the catch rates of randomly placed stations then vary widely, and the index is imprecise and shows spikes that are implausible for the population (Winker et al. 2017). Model-based standardisation, such as the geostatistical delta-GLMM, accounts for the spatial correlation of density and reduces both the observation error and this year-to-year “process noise”. In the survey comparison of Winker et al. (2017), the geostatistical indices had lower observation-error CVs for all eight species (e.g. 0.12 against 0.18 for one hake species, 0.27 against 0.39 for a patchy by-catch species), and lower process-error CVs (Francis 2011), with the largest reductions for the patchy by-catch species (0.49 to 0.35) and for the most commonly caught hake (0.53 to 0.46). The mean trends of the two estimators agreed.
For an assessment, process noise in an index is variation in
catchability or availability that the sampling error does not capture.
It is what the additional SD of each index against the common trend,
(Conn 2010), estimates. jb3_noise() sets three measures
side by side: the mean input CV, the loess process CV of Francis (2011)
from a smoother through the log index, and, for a trend fit,
and the RMSE against the common trend.
The 2018 blue marlin assessment used ten CPUE series of different
fleets and periods. Before combining them, check whether they agree. A
first look: correlations of the log indices over the years each pair
shares (jbplot_indexcor(); blank where fewer than five
years overlap):
Of the 34 pairs with at least five shared years, 14 are negatively correlated, though none significantly, while five positive correlations are significant. Correlations over few shared years are a weak test, so the trend model’s residuals are the main check. The joint residual plot shows the residuals of all indices against the common trend, with their RMSE and a loess smoother; conflicting indices show opposite residual patterns in the same years:
Runs tests by index (OSA residuals) and posterior predictive checks:
attr(p.runs, "runs")[, c("index", "p.runs", "test")]
#> index p.runs test
#> JAP.LL.hist JAP.LL.hist 0.202 Passed
#> TAI.1st TAI.1st 0.001 Failed
#> TAI.2nd TAI.2nd 0.075 Passed
#> USA.LL USA.LL 0.865 Passed
#> VEN.LL VEN.LL 0.008 Failed
#> VEN.GIL VEN.GIL 0.168 Passed
#> VEN.Rec VEN.Rec 0.002 Failed
#> BRA.LL BRA.LL 0.524 Passed
#> BRA.Rec BRA.Rec 0.598 Passed
#> GHA.GIL GHA.GIL 0.004 Failedp.ppc <- jbplot_ppc(tr.bum)
attr(p.ppc, "ppc")
#> index Bayesian.p nobs
#> JAP.LL.hist JAP.LL.hist 0.528 40
#> TAI.1st TAI.1st 0.360 22
#> TAI.2nd TAI.2nd 0.456 8
#> USA.LL USA.LL 0.588 24
#> VEN.LL VEN.LL 0.764 19
#> VEN.GIL VEN.GIL 0.543 22
#> VEN.Rec VEN.Rec 0.462 40
#> BRA.LL BRA.LL 0.436 28
#> BRA.Rec BRA.Rec 0.176 19
#> GHA.GIL GHA.GIL 0.243 10Four indices fail the runs test against the common trend
(TAI.1st, VEN.LL, VEN.Rec,
GHA.GIL); three of them have among the largest additional
observation SDs (sdi in the print), i.e. the model already
down-weights them. The posterior predictive p-values are all between
0.17 and 0.78, so no index is grossly inconsistent with the joint model.
The relative catchabilities follow below. First, the noise of each
index:
| index | n | years | obs.cv | loess.cv | sd.extra | sd.total | rmse |
|---|---|---|---|---|---|---|---|
| JAP.LL.hist | 40 | 1959-1998 | 0.125 | 0.236 | 0.065 | 0.141 | 0.158 |
| TAI.1st | 22 | 1968-1989 | 0.103 | 0.314 | 0.645 | 0.654 | 0.691 |
| TAI.2nd | 8 | 1990-1997 | 0.102 | 0.124 | 0.127 | 0.163 | 0.140 |
| USA.LL | 24 | 1993-2016 | 0.183 | 0.223 | 0.174 | 0.253 | 0.203 |
| VEN.LL | 19 | 1991-2009 | 0.569 | 0.301 | 0.126 | 0.583 | 0.463 |
| VEN.GIL | 22 | 1991-2012 | 0.389 | 0.468 | 0.584 | 0.702 | 0.586 |
| VEN.Rec | 40 | 1961-2001 | 0.394 | 0.595 | 0.629 | 0.742 | 0.716 |
| BRA.LL | 28 | 1978-2005 | 0.229 | 0.446 | 0.395 | 0.456 | 0.450 |
| BRA.Rec | 19 | 1996-2014 | 0.448 | 0.631 | 0.104 | 0.460 | 0.700 |
| GHA.GIL | 10 | 2000-2009 | 0.262 | 0.335 | 0.953 | 0.988 | 1.103 |
Three of the four series flagged by the runs tests
(TAI.1st, VEN.Rec, GHA.GIL) carry
additional SDs of 0.6-1.0 against the common trend, well beyond their
input CVs (0.10-0.39). For VEN.Rec the loess CV is
similarly high (0.60): the series is noisy around its own trend. For
TAI.1st and GHA.GIL the additional SD is two
to three times the loess CV: the series are fairly smooth but follow a
different trend, which is a conflict with the other indices rather than
noise. VEN.LL, the fourth, is the reverse case: its input
CV (0.57) already exceeds its loess CV and RMSE, so its runs-test
failure reflects a residual pattern, not unaccounted noise. The relative
catchabilities:
| index | q | lci | uci | log.se | n | years | reference |
|---|---|---|---|---|---|---|---|
| JAP.LL.hist | 1.000 | 1.000 | 1.00 | NA | 40 | 1959-1998 | TRUE |
| TAI.1st | 0.993 | 0.752 | 1.31 | 0.1420 | 22 | 1968-1989 | FALSE |
| TAI.2nd | 2.060 | 1.800 | 2.35 | 0.0672 | 8 | 1990-1997 | FALSE |
| USA.LL | 2.210 | 1.840 | 2.65 | 0.0936 | 24 | 1993-2016 | FALSE |
| VEN.LL | 1.630 | 1.240 | 2.15 | 0.1400 | 19 | 1991-2009 | FALSE |
| VEN.GIL | 1.850 | 1.330 | 2.56 | 0.1660 | 22 | 1991-2012 | FALSE |
| VEN.Rec | 0.969 | 0.766 | 1.23 | 0.1200 | 40 | 1961-2001 | FALSE |
| BRA.LL | 1.640 | 1.370 | 1.97 | 0.0934 | 28 | 1978-2005 | FALSE |
| BRA.Rec | 2.220 | 1.740 | 2.82 | 0.1230 | 19 | 1996-2014 | FALSE |
| GHA.GIL | 1.520 | 0.794 | 2.92 | 0.3320 | 10 | 2000-2009 | FALSE |
The joint index combines the ten series into one, the precision-weighted mean of the q-scaled indices by year with its log-scale SE:
| year | trend | index | log.se | lci | uci | source |
|---|---|---|---|---|---|---|
| 1959 | 3.020 | 2.999 | 0.285 | 1.715 | 5.246 | indices |
| 1960 | 2.927 | 2.652 | 0.254 | 1.612 | 4.364 | indices |
| 1961 | 2.934 | 4.338 | 0.430 | 1.869 | 10.068 | indices |
| 1962 | 2.807 | 4.476 | 0.405 | 2.022 | 9.907 | indices |
| 1963 | 2.522 | 3.394 | 0.325 | 1.796 | 6.413 | indices |
| 1964 | 2.130 | 2.293 | 0.220 | 1.489 | 3.532 | indices |
bum.joint is used in the blue marlin case study (chapter
The rebuilding protocol) to compare an assessment on the joint
index with one on the ten separate indices.
Random walk (JARA) or independent year effects (Conn 2010). The blue marlin indices overlap enough for Conn’s form, which treats the years as independent effects rather than a random walk; the two joint indices are practically the same:
jc <- jb3_jointindex(jb3_trend(bum$cpue, bum$se, state = "iid", run = "Conn (iid)"))
ok <- is.finite(bum.joint$index) & is.finite(jc$index)
cmp <- data.frame(year = bum.joint$year[ok], rw = bum.joint$index[ok]/mean(bum.joint$index[ok]),
iid = jc$index[ok]/mean(jc$index[ok]))
round(cor(log(cmp$rw), log(cmp$iid)), 3)
#> [1] 0.994
ggplot2::ggplot(cmp, ggplot2::aes(year)) + ggplot2::geom_line(ggplot2::aes(y = rw, colour = "random walk (JARA)")) +
ggplot2::geom_point(ggplot2::aes(y = iid, colour = "iid (Conn 2010)")) + ggplot2::labs(y = "Joint index", colour = NULL) +
theme_jabba3()For series that do not overlap in time, such as the two bigeye indices, only the random walk can scale them against each other.
Catch reconstruction, swept-area surveys from several areas and checks for conflicts between regions are covered in chapter Other data features.
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 |
sdb |
"fishlife" |
process error SD at , 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
),
sd 0.15 |
depletion dependence of sdb (dynamic SD only);
|
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
instead of
:
c(median, log.sd); switches bkinit off |
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,
with
the median of the r prior,
the shape of the model and
the recruitment variability (sigR = 0.5 when unknown).
is the harvest rate at MSY, which equals
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
scales almost linearly with
up to a plateau at about
for very productive stocks
(
= 0.96; with the Leslie r as the predictor
= 0.65, and selectivity shifts the relation).
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
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
and a 95% prior interval of
to
(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
as the median. The centre is converted with the model’s shape when the
model is built; the printed priors show the Schaefer case
().
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.0The r prior refers to the JABBA parameterisation of the
Pella-Tomlinson model, in which
(section Model equations). An r prior derived for the Schaefer
model
(,
)
therefore has to be converted when the shape changes: for the same
,
the r for shape
is
.
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.1011584A Schaefer r of 0.2 () corresponds to r = 0.12 for and r = 0.1 for the Fox model. Leaving the r prior unchanged while changing the shape changes the implied .
A prior on depletion, or 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.3bbmsyinit)The initial depletion can be given as
rather than
.
bbmsyinit = c(median, log.sd) adds a status prior on
in the first year and switches the bkinit prior off. With a
fixed shape the two are equivalent (bkinit = median
),
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),
= 0.3, 0.4 and 0.5 imply an initial
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.25After 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:
After fitting, jbplot_priorpost() compares each prior
with the posterior.
| 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 |
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
jb3_leslie());jb3_fmsy2r());jb3_rho_gt());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.
Life-history parameters of the FLicc alfonsino example (von
Bertalanffy
and
,
natural mortality
,
length at 50% maturity, weight at length
;
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,
with
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,
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),
and logistic maturity at length
(,
;
default
),
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.9126jb3_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:
The Leslie
is the per-capita growth at low biomass. In the Pella-Tomlinson form of
JABBA3 this equals
,
while
:
using the Leslie
directly is only consistent for the Schaefer model. Matching the prior
on
keeps it consistent across shapes.
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.1683339The model structure is set with jb3_model(), separately
from the priors.
| Setting | Default | Role |
|---|---|---|
shape |
"pella" |
"pella" (shape from BmsyK),
"schaefer"
()
or "fox"
() |
BmsyK |
0.4 | 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 limit) |
sdb.form |
"const" |
"dyn": process error SD
|
sdb.fixed |
NULL |
fix the process error SD (used by Tier 2) |
xlim |
c(0.2, 3) |
bounds of 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
(JABBA); "spict": SD
|
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 |
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.7891855With the same r prior the three shapes imply different ; convert the r prior with the shape (section Priors) when comparing shapes.
The BioProcDyn simulations showed that the standard assumption of independent process error with no lag makes surplus production models over-optimistic about rebuilding, and more so for late-maturing stocks. The true process deviations are persistent (lag-1 autocorrelation 0.7-0.8 for most life histories) and a model with independent deviations absorbs this persistence into r and K. The recommended configuration is (worked through on Atlantic blue marlin in chapter The rebuilding protocol)
lag = amat;rec <- jabba3(d, pr, jb3_model(shape = "fox", lag = 3, rho = 0.75))
rec
#> JABBA3 fit: bet ( bet ) engine: rtmb
#> model: fox + lag 3
#> convergence: ok (max gradient 2.5e-12, Newton decrement 1.2e-24)
#> estimates (mode, 95% CI):
#> est lci uci
#> K 1.29e+06 6.61e+05 2.50e+06
#> r 1.94e-01 9.96e-02 3.80e-01
#> bkinit 9.08e-01 5.46e-01 1.51e+00
#> sdb 7.74e-02 4.86e-02 1.23e-01
#> q1 8.73e-07 3.60e-07 2.11e-06
#> q2 1.62e-06 6.64e-07 3.95e-06
#> sdi1 4.87e-02 1.65e-02 1.44e-01
#> sdi2 4.38e-02 1.66e-02 1.15e-01
#> m 1.00e+00 NA NA
#> rho 7.50e-01 NA NA
#> Bmsy 4.73e+05 2.43e+05 9.20e+05
#> Fmsy 1.94e-01 9.95e-02 3.79e-01
#> MSY 9.19e+04 6.67e+04 1.27e+05
#> status 2017: B/Bmsy 0.79 (0.43-1.45), F/Fmsy 1.06 (0.51-2.21)
is the default. The persistence of process deviations increases with
generation time (GT): across age-structured simulations for 486
bony-fish species of the FAO SOFIA list (FishLife life histories) the
lag-1 autocorrelation followed
(),
and the default corresponds to GT of about 6-10 years. For shorter- or
longer-lived stocks, adjust
with the guidance table or jb3_rho_gt(); GT comes from the
same Leslie matrix as the r prior (e.g. JABBA::jbleslie()
or FLSRTMB::productivity()). Performance in simulation was
flat between 0.5 and 0.9, so the adjustment matters mostly for
short-lived species, where persistence is weak.
| Generation time (years) | Case-study stocks (GT) | Calibration median | Suggested rho |
|---|---|---|---|
| <= 3 | very short-lived species | 0.30 | 0.3-0.4 |
| 3-6 | Bay of Biscay sardine (3.2), northern shrimp (3.8) | 0.63 | 0.6 |
| 6-10 | Baltic herring (6.6), North Sea plaice (6.7), southern hake (8.4) | 0.78 | 0.75 (default) |
| > 10 | Icelandic cod (11.1), western horse mackerel (11.4), Biscay sea bass (11.9), North Sea anglerfish (12.6) | 0.80 | 0.8 |
The scale prior on is tied to the harvest rate at MSY ( with at its 2.5th percentile; chapter Priors), so it follows the r prior and the shape in sensitivity runs.
can be estimated with a normal prior, by switching
priors$rho on; with a single index this is less stable than
fixing it.
sdb.form = "dyn" makes the process error SD increase at
low biomass,
with
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.
obs.error = "additive" (default, as JABBA) adds an
estimated SD sdi to the input standard errors,
.
obs.error = "spict" uses SPiCT’s form,
,
where the input SEs enter only as relative weights
(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.2361422With 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.
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.
JABBA and SPiCT are both state-space surplus production models, yet on the same data they can give very different stock sizes. The reason is where each model gets the scale (K) from. This chapter explains the mechanism, lists the JABBA3 options that control it, gives guidance on which settings suit which kind of data, and shows how to set up JABBA3 by hand to reproduce a JABBA assessment or to approximate a SPiCT assessment.
JABBA is catch-conditioned: the catch is removed from the biomass each year (with a small catch error), and the indices inform the trend. The scale comes from the response of the indices to the catch, and, when that response is weak, from the K prior (by default 8 × max catch, CV 1).
SPiCT treats fishing mortality as a random walk:
follows
with SD sdf, and the catch is an observation of
.
With the catch known,
,
so a smooth F constrains the biomass path, and with it K. SPiCT
therefore identifies K without a K prior in many cases where a
catch-conditioned model cannot. Removing SPiCT’s F process (sdf fixed at
a large value, annual time step) sends K to infinity, exactly as in a
catch-conditioned model with a flat K prior.
The time step and SPiCT’s stabilising priors do not matter for this; the F random walk does. Its information is partly an assumption: in years without an index, a smooth F reads a catch trend as a biomass trend. While catches rise in the development phase, this produces the upward bend of early biomass often seen in SPiCT fits; where catches fall before the index starts, it can be what pins K.
| Option | Values | Default |
|---|---|---|
jb3_model(frw = ) |
"gaps": random walk on log harvest rate only in years
without catch (catch-conditioned otherwise, as JABBA);
"index": catch-conditioned before the first index year,
random walk from there to the end; "all": random walk in
all years (SPiCT-like) |
"gaps" (spictinp2jabba3():
"all") |
jb3_priors(sdf = ) |
prior on the random-walk SD | LN(0.3, 1) |
jb3_model(sdc = , sdc.est = ) |
catch SD fixed (sdc, year-specific via
jb3_data(catch.se = )) or estimated
(sdc.est = TRUE, prior jb3_priors(sdc = ),
year-specific SDs as multipliers) |
fixed at 0.1 (JABBA catch.cv = 0.1) |
jb3_priors(K = ) |
"halfN": one-sided lognormal, N × max catch as the
expected value (flat below the bias-corrected median, half-normal on log
K above; see The K prior below); "half+r":
location from r (jb3_kr()); "jabba" /
"jabbaN": two-sided lognormal, 8 (N) × max catch as the
median, CV 1 (as JABBA); c(median, log.sd);
NULL: no K prior |
"half8" (spictinp2jabba3(): off unless
SPiCT has a logK prior) |
jb3_priors(K.cv = ) |
CV of the one-sided prior (log-SD ) | 1 (log-SD 0.83, as JABBA) |
jb3_priors(maxC = ) |
max catch for the K prior and the cap: "max" (annual
maximum, as JABBA) or "smooth" (maximum of the catch
smoothed with a normal kernel, bandwidth 3 years, as CMSY) |
"max" |
jb3_priors(K.max = ) |
deprecated (use K = "halfN" with K.cv):
upper cap at a multiple of max catch or "r" (7.6 ×
r^-0.587), half-normal SD 0.3 above |
NULL |
jb3_model(inits = ) |
starting values: "prior", "spict" (K = 4 ×
max catch, MSY from SPiCT’s catch/index regression) or
"best" (several starts plus K-profile starts, lowest
converged objective) |
"best" when the K prior is off, else
"prior" |
How soft is the default K prior?
K = "half8" adds nothing below 5.7 × max catch (8 × as the
expected value of a lognormal with CV 1, bias-corrected to the median)
and a half-normal on log K (SD 0.83) above it: 1.5 × that location adds
0.12 to the objective, 2 × adds 0.35, 3 × adds 0.87, 5 × adds 1.9. That
only stops a runaway K along a flat ridge and leaves a K that the data
identify where it is. A tighter prior, K.cv = 0.3 (location
7.7 ×, log-SD 0.29), adds 0.95 at 1.5 × and 2.8 at 2 ×: informative, for
stocks where the data do not identify the scale. The bigeye quick start
gives K = 8.4 × max catch with the default and 8.7 × with JABBA’s
two-sided prior, and the same
(0.80).
The K plausibility check. Without a one-sided K
prior (K = NULL, a two-sided prior, or a SPiCT conversion),
jabba3() warns when the K estimate exceeds the r-based
bound (7.6 × max catch × r^-0.587, the 95th percentile of K/max catch in
72 ICES stocks). The warning asks for a check, not a fix: profile K,
compare frw modes, and add a K prior only where the data do
not identify K. Lightly exploited, slow-growing stocks (rays, sharks,
deep-water species) often lie above the bound: North Sea thornback ray
(data(rjc)) has a SPiCT K of 49 × max catch.
K-profile starts. Some stocks have a finite-K mode
with a narrow basin and a flat ridge towards K → ∞ that the optimiser
finds from most starts. With inits = "best", JABBA3
therefore also fits with K fixed on a grid from 2 to 159 × max catch
(ratio 1.2), each grid point started both from the best fit so far and
from the prior medians, and releases K from each local minimum of that
profile; a near-deterministic start (process SD fixed at 0.02, then
released) is added as well. The lowest converged objective wins as
usual. For Nephrops FU32 (WKBMSYSPiCT3) this finds the mode at 5.6 × max
catch,
= 0.14 in 2023 (SPiCT 5.8 ×, 0.13), where all other starts gave K → ∞
with a higher objective (11.0 against 14.0). For blackspot seabream
(GFCM GSA 1 and 3), the free fit settled in a mode where process
deviations before the first index year lifted biomass above K; the
catch-driven mode (K about 5.5 × max catch) had a better objective (17.0
against 18.8) but a basin narrow enough to fall between coarser grid
points. The starts add a few seconds to a fit. They are the default with
the one-sided K prior or none; with a two-sided K prior
(e.g. "jabba") the default start is "prior":
set inits = "best" explicitly when the fit looks
suspicious.
sdf. With frw = "gaps" the data carry
little information on sdf and the prior sets it; it affects the
estimated catch in the gap years, not the status. With
"index" or "all" and catch known, sdf is
estimated from the harvest-rate path (typically 0.1–0.4). A prior
centred far above that, such as the LN(4, 0.5) used in many SPiCT
benchmarks, pulls the estimate up by 1.3–2 × and acts as a brake on
over-smoothing; it is not uninformative.
Starting values and NUTS. All NUTS chains start at
the optimiser’s mode, so inits = "best" decides which mode
they start from but adds nothing to the posterior. With a flat K prior
the chains can drift towards very large K; for NUTS, keep the one-sided
K prior (the default).
The choice of frw follows from where the information on
depletion and scale is in the data:
| Data | frw |
Initial depletion | Example |
|---|---|---|---|
| Long catch from near unfished, indices later | "gaps" (JABBA-like) |
near unfished: bkinit = c(0.9, 0.246) |
tRFMO tuna and billfish (S. Atlantic swordfish) |
| Catch and indices start together, stock already exploited | "all" (SPiCT-like) |
weak: wide bkinit or
bbmsyinit |
ICES coastal and survey-based stocks (WKBMSYSPiCT3) |
| Long or reconstructed catch before the first index | "index" (hybrid) |
weak | Blackspot seabream, North Sea sole |
| Years without catch | any +
jb3_data(catch.gaps = "estimate") |
as above | catch starting after the index |
| Simulation testing, MSE | "gaps", fixed catch SD |
fewer random effects, fast |
Why:
"gaps": the catch drives the decline
from a known start and the indices inform the response; no assumption on
F where there is no index."all": with an exploited start,
"gaps" has no information on the initial depletion and the
scale; the smooth F random walk supplies it. Keep the initial-depletion
prior weak so that it does not decide the outcome."index": before the index, a random
walk on F can only be informed by the catch, and the pattern it produces
there is spurious; "index" keeps the random walk where the
index informs it and conditions on the catch before.frw = "index" and "all" are identical when
an index starts in the first catch year. All three modes cost the same
(about 0.2 s per fit in RTMB mode).
Too much freedom. A random walk on F, like process
error, can absorb misfit that belongs elsewhere: F, the process
deviations, the production parameters and the initial depletion trade
off against each other. Where only the catch is observed, nothing
constrains that trade-off, and the model can compensate for a spurious
early pattern elsewhere. The terminal years may still look fine, but the
fit can become unstable (in the blackspot seabream example,
frw = "all" produced an early rise of biomass above K
before the first index year; "index" did not). That is why
"index" is the sensible compromise when the catch series
extends well before the indices.
Comparisons with age-structured assessments.
Integrated assessments such as SS3 are, for many stocks, largely
stochastic age-structured production models driven by the indices, with
little information from the size compositions. Where the series starts
at an exploited state, "all" or "index"
usually agree better with them than "gaps", because the
scale is informed by the index and F together rather than by a
catch-conditioned path from an assumed initial depletion.
Simulation evidence. Nine age-structured operating models (BioProcDyn, 20 iterations, data 1981–2025; median log error in terminal , positive = optimistic; current practice and the lag + persistence protocol of chapter Workflows):
| Data | frw |
Current practice | Protocol |
|---|---|---|---|
| Catch and index from 1981, initial-depletion prior | "gaps" |
+0.29 | +0.05 |
"all" |
+0.19 | 0.00 | |
| Catch and index from 1991 (stock already at 0.18 K), no initial-depletion prior | "gaps" |
+0.59 | +0.63 |
"all" |
+0.42 | +0.26 | |
| Catch from 1981, index from 2005 | "gaps" |
+0.72 | +0.90 |
"index" |
+0.49 | +0.70 |
With an index over the whole series, the mode matters little. With a
short series that starts depleted and no prior on the initial depletion,
"gaps" cannot identify the starting level (estimated
about 0.45 against 0.18), whereas the F random walk brings it closer
(0.29–0.35), and only then does the protocol remove most of the bias for
intermediate- and late-maturing stocks. No mode recovers a depletion
that happened before the first index year: this is an information limit,
which length data (e.g. an SPR-based depletion estimate) or an
informative status prior must fill.
Initial depletion. Inform it strongly only where the
catch series starts near the unfished state. Otherwise keep it weak, or
state it as
with bbmsyinit (chapter Priors), which keeps the
initial status the same when the shape changes in a sensitivity run.
"gaps": South Atlantic swordfish, the JABBA
paper example. Catch from 1950 starting near unfished, CPUE
indices from the 1970s–1990s: the tRFMO case. The original example of
Winker et al. (2018), set up by hand with its JABBA settings (Pella,
= 0.4; r LN(0.42, 0.37); K LN(250,000, CV 1); ψ LN(1, CV 0.25); fixed
observation error 0.2; no catch error; process error from the first
index year; the inverse-gamma(4, 0.01) process-variance prior matched by
LN(0.0534, 0.266)):
data(iccat); sw <- iccat$swos
dsw <- jb3_data(sw$catch, sw$cpue, sw$se, stock = "swos")
psw <- jb3_priors(dsw, r = c(0.42, 0.37), K = c(250000, sqrt(log(2))), bkinit = c(1, sqrt(log(1 + 0.25^2))),
sdb = c(0.0534, 0.266, 1))
msw <- jb3_model(shape = "pella", BmsyK = 0.4, catch.error = FALSE, se.min = 0.2, start = "index",
P.bound = c(0.02, 1.1), frw = "gaps")
fsw <- jabba3(dsw, psw, msw, osa = FALSE)
fsw$ts[fsw$ts$year == 2015 & fsw$ts$quant %in% c("B/Bmsy", "F/Fmsy"), c("quant", "est", "lci", "uci")]
#> quant est lci uci
#> 198 B/Bmsy 0.7904443 0.5838453 1.070150
#> 264 F/Fmsy 0.9661775 0.7155929 1.304511JABBA3 gives = 0.79 (0.58–1.07) and = 0.97 in 2015, against 0.75 (0.55–1.02) and 0.99 (0.72–1.31) published (JAGS posterior medians; K and r differ along the r–K ridge, mode against median: K 134,700 against 111,500). With the indices covering the decline from a near-unfished start, the three modes give the same result:
"all": WKBMSYSPiCT3 stocks. Catch and
survey or commercial indices starting together at an exploited level,
the ICES SPiCT case. For three accepted benchmark assessments
(spictinp2jabba3() on the benchmark inputs), the SPiCT-type
conversion (frw = "all", no K prior) reproduces SPiCT,
while the JABBA-like set-up (frw = "gaps", K prior 6 × max
catch) lacks information on depletion and scale: it is far too
optimistic for the depleted Nephrops FU32 (terminal
1.48 against 0.12 from SPiCT) and for anglerfish (1.60 against 1.15),
and only for dab, whose series starts near unfished, does it agree:
| Stock | SPiCT | JABBA3 "all" |
JABBA3 "gaps" (K prior 6 ×) |
|---|---|---|---|
| nep FU32 | 0.12 / 2.31 | 0.14 / 2.28 | 1.48 / 0.08 |
| aru.27.1234a | 1.15 / 0.80 | 1.11 / 0.71 | 1.60 / 0.31 |
| dab.27.22-32 | 2.28 / 0.03 | 1.95 / 0.03 | 2.37 / 0.03 |
(terminal
/
;
without the K prior, "gaps" runs K to infinity for nep and
aru.) The benchmark inputs and the SPiCT trajectories are in
data(spict_examples):
data(spict_examples); x <- spict_examples$dab
xs <- spictinp2jabba3(x$inp, stock = x$stock)
fd <- jabba3(xs$data, xs$priors, xs$model, osa = FALSE)
yl <- max(x$spict$year)
tl <- rbind(JABBA3 = fd$ts$est[fd$ts$year == yl & fd$ts$quant %in% c("B/Bmsy", "F/Fmsy")],
SPiCT = x$spict$est[x$spict$year == yl])
colnames(tl) <- paste(c("B/Bmsy", "F/Fmsy"), yl); round(tl, 2) # SPiCT: B at the start of the year, F as the yearly mean
#> B/Bmsy 2022 F/Fmsy 2022
#> JABBA3 1.95 0.03
#> SPiCT 2.18 0.04"index": blackspot seabream (GFCM GSA 1 and
3). Catch from 1983, two fishery CPUE indices from 2009 only,
compared with the 2025 SS3 assessment on the GFCM reference points
(;
JABBA3: 0.35 K). With the rebuilding protocol (lag 4 + AR(1) 0.82),
"index" follows SS3 in both biomass and fishing mortality
(
2024 0.08 against 0.06;
1.91 against 2.00). "all" produces the spurious early
pattern discussed above, a rise of biomass to 3.7
before the first index year; "gaps" places F about 30%
below SS3
(
1.40). The data, code and SS3 comparison are in BioProcDyn
(ss3sbr/example); the inputs, priors, SS3 trajectories and
the GFCM forecast table are in data(ss3_examples) (element
sbr).
| Topic | JABBA | JABBA3 |
|---|---|---|
| Estimation | JAGS (MCMC) | RTMB: posterior mode with Laplace approximation of the states
(fast), NUTS (tmbstan) for full posteriors |
| Process error | inverse-gamma prior on the variance, iid deviations, production from the previous year | life-history (FishLife) prior on sdb; optional AR(1) persistence
(rho), production lag (lag), state-dependent
variance, SD ramps (pe.ramp) |
| Catch dynamics | catch-conditioned | catch-conditioned (frw = "gaps"), hybrid
("index") or F random walk in all years
("all") |
| Missing catch | not allowed | jb3_data(catch.gaps = "estimate"): catch estimated with
a random walk on log F in years without catch |
| K prior | 8 × max catch, CV 1, used as the median | one-sided "half8" by default (8 × as the expected
value, CV 1, flat below 5.7 ×), "halfN" /
"half+r" / K.cv; "jabba"
reproduces JABBA; any lognormal or off (NULL) |
| Starting values | fixed inits | inits = "best": multi-start with K-profile and
near-deterministic starts |
| K cap | none | the upper half of the default K prior; K.max
deprecated; plausibility warning above the r-based bound when no
one-sided prior is used |
| Initial status | ψ = B1/K | bkinit, or bbmsyinit
(B1/BMSY) |
| Observation error | input SE + one estimated extra SD per index
(sigma.est) |
the same, or input SEs only (sdi.est = FALSE), or per
index (sdi.est = c(FALSE, TRUE)), or SPiCT-like
(obs.error = "spict") |
| Seasons, Selex | annual; JABBA-Select separate | nseason; Selex routine (chapter Special feature:
Selex) |
Index weighting. When an extra observation SD is
estimated for each index, a flat and smooth index can take almost all
the weight (its extra SD goes to zero) and a declining index is treated
as noise. Where that happens, keep the input SEs
(sdi.est = FALSE) and down-weight the suspect index,
e.g. for hyperstability, or estimate the extra SD only for selected
indices.
JABBA’s defaults map one to one to JABBA3:
JABBA (build_jabba()) |
JABBA3 |
|---|---|
model.type = "Fox" / "Schaefer" /
"Pella" |
jb3_model(shape = "fox" / "schaefer" / "pella", BmsyK = ) |
r.prior = c(0.2, 0.5) |
jb3_priors(r = c(0.2, 0.5)) |
K.prior = NULL (8 × max catch, CV 1) |
jb3_priors(K = "jabba") |
psi.prior = c(0.9, 0.25) (mean, CV) |
jb3_priors(bkinit = c(0.9, 0.246)) |
add.catch.CV = TRUE, catch.cv = 0.1 |
jb3_model(catch.error = TRUE, sdc = 0.1) |
| catch-conditioned dynamics | jb3_model(frw = "gaps") |
| inverse-gamma prior on the process variance | FishLife prior on sdb (jbinput2jabba3() reports the
change) |
| uniform prior on q | flat prior on log q (jbinput2jabba3(q.uniform = TRUE)
for the uniform) |
| two-sided K prior, no cap | jb3_priors(K = "jabba") (switches the one-sided default
off) |
The bigeye quick start written out with JABBA’s settings:
data(iccat); bet <- iccat$bet
d <- jb3_data(bet$catch, bet$cpue, bet$se, stock = "bet")
pr <- jb3_priors(d, r = c(0.2, 0.5), # JABBA r.prior
K = "jabba", # JABBA K.prior = NULL: 8 x max catch (median), CV 1
bkinit = c(0.9, 0.246)) # JABBA psi.prior = c(0.9, 0.25)
mod <- jb3_model(shape = "fox", catch.error = TRUE, sdc = 0.1, frw = "gaps")
fj <- jabba3(d, pr, mod, osa = FALSE)
signif(fj$pars[c("K", "r", "sdb"), c("est", "lci", "uci")], 4)
#> est lci uci
#> K 1.184e+06 7.069e+05 1.985e+06
#> r 1.903e-01 1.070e-01 3.385e-01
#> sdb 8.661e-02 5.718e-02 1.312e-01This reproduces the conversion of the JABBA run (
jbinput2jabba3(), chapter Converters): K = 1,174,749, = 0.797 in 2017. With the JABBA3 default (K = "half8"), K = 1,132,824 (8.4 × max catch) and = 0.798.
Where the information on K is. The profile likelihood of K is asymmetric: a steep wall on the left, because the observed catches cannot be taken from a stock that is too small, and a flat or weak right side, where many stocks cannot tell a large K from a very large one (in the profiles below, North Sea sole is flat to 80 × max catch and Nephrops FU32 has a finite mode followed by a ridge towards K → ∞). The data supply the lower bound; a prior is needed only on the upper side. A lognormal centred on the expected K spends half of its information where the data already decide and is weakest where it is needed.
The empirical scale. Across 73 ICES stocks, the
unfished exploitable biomass (Beverton–Holt equilibrium) was a median of
5.9 × the maximum catch, with a between-stock log-SD of 0.55
(interquartile range 3.8–8.2 ×); the ratio declines with productivity
(about 3 × for generation times up to 4 years, 5 × for 4–8 years, 6–7 ×
for longer ones). JABBA’s 8 × max catch with CV 1 is right as an
expected value: bias-corrected to the median of a lognormal,
= 5.7 × for σ = 0.83, almost the empirical median. JABBA documents 8 ×
as the mean but uses it as the median (the bias correction is commented
out in build_jabba()), which shifts the whole prior right
by
= 1.41.
The default: one-sided, bias-corrected
(K = "half8"). Combining both points, the JABBA3
default keeps JABBA’s scale and CV but applies them only where the data
are weak: no penalty below the bias-corrected median and a half-normal
on log K above it (a half-lognormal on K),
N is the expected value as a multiple of max catch
("half8": 8 ×, located at 5.7 ×), K.cv sets
the CV (1 by default, as JABBA). On default it acts as an upper control,
as the old two-sided default did, without pulling a K that the data
identify; K = NULL switches it off.
| Situation | K prior |
|---|---|
| Default, upper control | K = "half8" (8 × max catch as expected value, CV 1:
flat below 5.7 ×) |
| Intermediate starting point | K = "half6" (flat below 4.2 ×) |
| Short generation time / high productivity (GT < 5 years, r > 0.5); series that mostly reflect depleted or rebuilding states (the maximum catch was taken from an already reduced stock) | K = "half4" (flat below 2.8 ×) |
| Location predicted from r | K = "half+r": median 3.04 r^-0.583 × max catch
(jb3_kr()) |
| The data do not identify the scale | tighten: K.cv = 0.3 (log-SD 0.29; "half8"
then sits at 7.7 ×) |
| Two-sided lognormal at a chosen scale | K = "jabbaN" (N × max catch as median, CV 1) or
K = c(median, log.sd) |
| Reproducing a JABBA assessment | K = "jabba" (8 × max catch as median, CV 1) |
| No K prior | K = NULL |
K.max (an upper cap at a multiple of max catch with a
half-normal SD of 0.3) is kept for old scripts but deprecated: it is the
same one-sided prior, now set with K = "halfN" and
K.cv.
Posterior mode of K / max catch (profile likelihood + prior) against the K of the reference assessment:
| Stock (reference) | Reference | No prior | "jabba" (8 ×, CV 1) |
"half8" (default) |
"half8", K.cv = 0.3 |
|---|---|---|---|---|---|
| Blackspot seabream (SS3) | 8.1 | 10.5 | 9.6 | 9.0 | 8.6 |
| North Sea sole (SS3) | 6.7 | 12.3 | 10.6 | 9.7 | 9.2 |
| Nephrops FU32 (SPiCT) | 5.8 | 5.6 | 5.7 | 5.6 | 5.6 |
| Anglerfish aru.27.1234a (SPiCT) | 6.2 | 6.5 | 6.8 | 6.3 | 6.5 |
In full fits, the default leaves the SPiCT-type fits of Nephrops and
anglerfish unchanged, gives blackspot seabream
0.07 and
2.11 (SS3 0.08 and 1.65; two-sided "jabba": 0.07 and 2.16),
and turns the JABBA-like fit of Nephrops FU32 from
1.48 (two-sided 6 × prior) to 0.13 (SPiCT 0.12): the two-sided prior
pushed K up, the one-sided prior does not.
jb3_kr() returns the predicted median and log-SD from r
or the generation time (73 ICES stocks:
,
residual log-SD 0.55;
,
0.57), computed outside the fit, for use as the location of the
one-sided prior or as a two-sided prior:
jb3_kr(r = 0.2) # median multiple of max catch, log-SD
#> median log.sd
#> 7.769143 0.550000
mC <- jb3_priors(d)$maxC.value
kr <- jb3_kr(GT = 10, maxC = mC)
pr.def <- jb3_priors(d, r = c(0.2, 0.5)) # default: K = "half8", K.cv = 1
pr.inf <- jb3_priors(d, r = c(0.2, 0.5), K.cv = 0.3) # informative upper side
pr.r <- jb3_priors(d, r = c(0.2, 0.5), K = "half+r") # one-sided at the r prediction
pr.gt <- jb3_priors(d, r = c(0.2, 0.5), K = paste0("half", round(kr[["median"]]*exp(0.833^2/2), 1))) # at the GT prediction
pr.two <- jb3_priors(d, r = c(0.2, 0.5), K = c(kr[["K"]], kr[["log.sd"]])) # two-sided lognormalThese relations describe exploited ICES stocks, most fished below 0.2
K at some point; lightly exploited, slow-growing stocks (rays, sharks,
deep-water species) can lie well above them. The r relation can mislead
when the r prior itself is low for the life history (North Sea sole: r
0.181 for a generation time of 6.6 years predicts 8.2 ×, the generation
time 5.1 ×). Check the fit with jbplot_priorpost() and a K
profile: if the posterior of K sits on the prior, the data do not inform
the scale, and the K prior (or the choice of frw) decides
the status.
North Sea sole (data(ss3_examples), element
sol) is assessed with a fully age-structured SS3 model with
empirical weight-at-age. The catch starts in 1957 near unfished, the two
surveys (BTS and COAST) only in 1990, and the K profile is flat to 80 ×
max catch: the information on the scale is weak, so the K prior and the
process model decide. Set-up as for an index-type stock: F random walk
and process error from the first survey year
(frw = "index", start = "index"), r and
from the age-structured equilibrium of the 1970–80 biology:
data(ss3_examples); s <- ss3_examples$sol
ds <- jb3_data(s$catch, s$cpue, s$se, stock = "sol.27.4")
ms <- jb3_model(BmsyK = s$info$priors$BmsyK, frw = "index", start = "index")
f.def <- jabba3(ds, jb3_priors(ds, r = s$info$priors$r), ms, osa = FALSE) # K = "half8", K.cv = 1
f.inf <- jabba3(ds, jb3_priors(ds, r = s$info$priors$r, K.cv = 0.3), ms, osa = FALSE) # informative upper side
mCs <- jb3_priors(ds)$maxC.value
st <- function(f) c(K.maxC = f$pars["K", "est"]/mCs,
setNames(f$ts$est[f$ts$year == 2025 & f$ts$quant %in% c("B/Bmsy", "F/Fmsy")], c("B/Bmsy", "F/Fmsy")))
round(rbind(`half8, K.cv 1` = st(f.def), `half8, K.cv 0.3` = st(f.inf),
SS3 = c(6.7, s$ss3$est[s$ss3$year == 2025 & s$ss3$quant %in% c("B/Bmsy", "F/Fmsy")])), 2)
#> K.maxC B/Bmsy F/Fmsy
#> half8, K.cv 1 15.27 2.06 0.05
#> half8, K.cv 0.3 10.09 0.95 0.21
#> SS3 6.70 1.03 0.17With the default, K runs to 15 × max catch and the stock looks
lightly exploited
(
2.05,
0.05 in 2025). With K.cv = 0.3, K comes down to 10 × and
the fit follows SS3 over the whole survey period
(
0.96,
0.20; SS3 1.03 and 0.17). The BioProcDyn protocol (lag 2 = age at
maturity, AR(1) ρ = 0.72 from the generation time) is robust to the K
prior (K 9–10 × either way): it rescues the default fit, but with the
informative K prior the plain model tracks SS3 more closely, especially
F. The persistence term identifies MSY (about 27,000 t against 20,000 t
in SS3) rather than K, which places
about 30% low; the protocol is the better choice here only when the K
prior is weak.
SPiCT settings map to JABBA3 as follows
(spictinp2jabba3() does this automatically):
SPiCT (inp) |
JABBA3 |
|---|---|
obsC, timeC (any time step) |
annual catch (summed by calendar year) |
obsI, timeI |
annual indices (geometric mean within a year); within-year timing is not used |
stdevfacI |
index SEs as relative weights with
jb3_model(obs.error = "spict"): SD = sdi × stdevfacI |
stdevfacC |
catch SD multipliers:
jb3_data(catch.se = sdc × stdevfacC) |
F random walk (logsdf) |
jb3_model(frw = "all"); jb3_priors(sdf = )
from logsdf, otherwise no prior |
catch observation SD (logsdc) |
jb3_model(sdc.est = TRUE) with
jb3_priors(sdc = ) from logsdc; without a
SPiCT prior the catch SD stays fixed (its estimate tends to collapse to
0) |
| no K prior | jb3_priors(K = c(NA, 0.833, 0)) (off), with
inits = "best"; no cap on K |
logr, logbkfrac, logsdb,
logsdi, logn |
r, bkinit, sdb,
sdi, m (shape) priors |
logngamma |
lognormal prior on m with the same mean and SD of log n |
logalpha, logbeta (ratio priors) |
none: use the sdb and sdi priors |
dteuler |
annual model (jb3_model(nseason = ) for sub-annual
steps; it rarely changes the result) |
The thornback ray of chapter From SPiCT: North Sea thornback ray, set up by hand from the SPiCT input list:
data(rjc); inp <- rjc$inp; yrs <- 1989:2021
gm <- function(t, v){ g <- tapply(v, floor(t), function(z) exp(mean(log(z)))); as.numeric(g[as.character(yrs)]) }
am <- function(t, v){ g <- tapply(v, floor(t), mean); as.numeric(g[as.character(yrs)]) }
I <- data.frame(year = yrs, Q14 = gm(inp$timeI[[1]], inp$obsI[[1]]), Q3 = gm(inp$timeI[[2]], inp$obsI[[2]]))
W <- data.frame(year = yrs, Q14 = am(inp$timeI[[1]], inp$stdevfacI[[1]]), Q3 = am(inp$timeI[[2]], inp$stdevfacI[[2]]))
ds <- jb3_data(data.frame(year = inp$timeC, catch = inp$obsC), I, W,
catch.se = data.frame(year = inp$timeC, se = 0.1*inp$stdevfacC),
catch.gaps = "estimate", stock = "rjc")
P <- function(nm) exp(inp$priors[[nm]][1]) # SPiCT prior medians
ps <- jb3_priors(ds, r = c(P("logr"), 0.3), K = c(NA, 0.833, 0), bkinit = c(P("logbkfrac"), 0.5),
sdb = c(P("logsdb"), 0.5, 1),
sdi = list(c(exp(inp$priors$logsdi[[1]][1]), 0.2, 1), c(exp(inp$priors$logsdi[[2]][1]), 0.2, 1)),
sdc = c(P("logsdc"), 0.1, 1),
sdf = c(0.3, 1, 0)) # SPiCT has no sdf prior here
ms <- jb3_model(shape = "schaefer", obs.error = "spict", catch.error = TRUE, sdc = 0.1, sdc.est = TRUE,
frw = "all")
fs <- jabba3(ds, ps, ms, osa = FALSE)
signif(fs$pars[c("K", "r", "sdb", "sdf", "sdc"), c("est", "lci", "uci")], 3)
#> est lci uci
#> K 1.48e+05 5.27e+04 4.14e+05
#> r 2.23e-01 1.49e-01 3.33e-01
#> sdb 4.30e-02 1.94e-02 9.50e-02
#> sdf 1.25e-01 8.32e-02 1.89e-01
#> sdc 8.32e-02 6.89e-02 1.01e-01The hand-made set-up gives the same fit as
spictinp2jabba3(inp) (K = 148,000,
= 0.99 and
= 0.35 in 2021). SPiCT itself estimates K = 138,000,
= 1.06 and
= 0.36 (sdf 0.14, catch SD 0.09, close to JABBA3’s 0.13 and 0.08). K is
52 × max catch, so jabba3() warns that it lies above the
plausibility bound (24 ×); here the SPiCT fit agrees, and the warning
can be noted and left. With the spict package installed:
sp <- spict::fit.spict(inp)
round(spict::sumspict.states(sp)[3:4, 1:3], 3)
#> estimate cilow ciupp
#> B_2021.75/Bmsy 1.057 0.592 1.887
#> F_2021.75/Fmsy 0.361 0.241 0.542Without the F random walk (frw = "gaps", the
catch-conditioned conversion
spictinp2jabba3(inp, spict.like = FALSE)), the scale of
such stocks often runs to the K prior or, with the K prior off, drifts
upwards (thornback ray: K = 221,000, 78 × max catch,
= 0.28): compare the two before using a converted SPiCT assessment.
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 |
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() 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. ;
an extra
or
replaces the default), drop.last to drop the last year of F
and catch, proj to append projections and
probs for other bands.
and
(SPiCT benchmark defaults) are drawn by default (bthr,
blim; NULL to omit). A list of fits is
coloured by run.
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:
against
with the zones of a hockey-stick harvest control rule (target 0.8
,
threshold 0.2
)
and the 50/80/95% density contours of the terminal status.
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()).
For simulation testing, MSE and large grids,
se = FALSE, osa = FALSE skips the standard errors and
residuals:
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
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)jbplot_fits(fit, log = TRUE) plots on the log scale; the
shaded band is the posterior predictive interval including observation
error.
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
the stock is fished below
.
The hatched band left of
marks catches below the production curve but above that line.
jbplot_spdyn() plots the realised surplus production,
,
against the expected curve; departures are the process deviations (and
the lag) in production units. rel = TRUE gives
and
axes, and jbplot_production(fit, type = "phase" | "dyn")
calls either.
| 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 |
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.
| 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 |
| 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) |
| 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 |
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).
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, 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_ppc() compares, draw by draw, the discrepancy of
the observed indices from the fitted ones,
,
with that of indices replicated from the observation model (as JABBA’s
jbplot_PPC()). The Bayesian p-value
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
ppThe 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 (); red: failed.
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".
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
.
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 TRUEResidual 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.
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)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 |
Requirements. NUTS runs through
tmbstan, which needsrstanand 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
,
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] TRUEok is TRUE when
,
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_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" |
and ESS for all parameters, states included | , ESS > 100 per chain |
"energy" |
marginal energy against energy transitions | similar widths (E-BFMI > 0.3) |
Each type is also its own function: jbplot_trace(),
jbplot_rank(), jbplot_mcmcdens(),
jbplot_mcmcacf(), jbplot_pairs(),
jbplot_rhat() and jbplot_energy().
| What | Red flag | Action |
|---|---|---|
| , ESS | 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 andlogsdbform a funnel. Run longer for final results.
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 with the level tuned on step 1, , 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"Step by step, from an existing fit:
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.
jb3_project() projects the stock under constant
scenarios (fmsy, the default: 0, 0.5, 0.75, 1 and 1.25
)
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
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.25Process 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,
with
,
so the persistence carries into the forecast and the marginal SD stays
(with
this is the iid sampling of JABBA’s fw_jabba()).
procerr = "mean" uses only the conditional mean
and "none" deterministic production. Projection tables
report the risk
with
by default.
jbplot_projection() draws
and
(green), MSY on the catch panel, a biomass threshold bthr
(orange, default
)
and limit blim (red, default
).
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_advice(fit, proj = ) appends the projection
scenarios (dashed) to the assessment advice plot:
jb3_projtable() gives a catch options table in the style
of an ICES advice sheet:
,
and the catch in the first projection year, the median
in selected years with the change relative to the terminal year, and the
probabilities of
,
and of the Kobe green quadrant.
| 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).
| 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 |
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.
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)The ICCAT matrices (a) , (b) 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 6what = "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:
The IOTC format from the same projection: catch options relative to
the reference catch, and the probability (%) of violating the MSY-based
reference points,
and
,
and the limit reference points,
and
(defaults
,
;
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.0GFCM 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
(Fmsy = 0.8) apply
draw by draw, so
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
and the current F (mean of the last three years):
,
0.5-2
(),
,
and the precautionary
PA (35th percentile of
):
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)With absolute F options, is the probability that the option is below the uncertain : 50% for , so the joint probability of the green quadrant cannot exceed 50% at , even where the median biomass is above .
jb3_kobematrix_gfcm() gives the three matrices of the
GFCM advice summary sheet: (a)
and
,
(b)
and (c) the risk
,
with
,
,
and
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 0Probabilities are shaded darker (greener) the higher they are, risks
darker (redder) the higher the risk, on finer classes
(risk.breaks):
For ICES-type advice, jb3_kobematrix_ices() gives (a)
and
and (b) the risk
,
to compare with the ICES 5% threshold, with the SPM proxies
and
(bpa, blim):
Other combinations follow from jb3_kobematrix() with
bref and fref (multiples of
and
,
optionally named; NULL drops one) and
risk = TRUE for the complement, e.g.
jb3_kobematrix(pf, what = "all", bref = c(Btrigger = 0.5)).
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
,
the hockey-stick rule applied to
in the first implementation (TAC) year to obtain the advised
,
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 Fmsyjb3_hcr() evaluates the rule
(
above
,
decreasing linearly below) on
in the TAC year of the
forecast. Bigeye is well above the GFCM default
,
where the rule hardly changes F; to illustrate the rule, the example
uses
:
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.911Hockey-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
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.
jb3_hcr() offers two ways of turning the uncertain
into one advised F:
uncertainty = FALSE,
Fadv.det): the rule is applied once, to the median
.
Here the median is above
,
so
.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,
.
This is an expectation over the draws, not a fractile of
.Draws above
get
;
draws below it get a reduced F,
(with bclose = 0). Because the rule is capped at
,
uncertainty can only pull the mean down: the precautionary
is never above the deterministic one, and it drops below
as soon as a share of the draws falls below
,
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.9106759so
.
The wider the distribution of
in the TAC year (larger estimation uncertainty, process error, longer
intermediate period), the larger the precautionary reduction. With
only a few draws are below the trigger and
stays close to
(jb3_hcr(..., btrigger = 0.5)$Fadv).
The options with , , , and in the TAC years, with 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
in the TAC year
,
the biomass response at the start of the following year
(start-of-year biomass,
),
its change relative to
,
and the probabilities of being above
,
(here
,
bthr) and
:
| 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 =
,
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 |
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_summary() gives the overview of JABBA’s
jbplot_summary(): B, F,
,
and
by run, and the production curves with
and MSY.
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.15Some 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 1The 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 settingskobe = FALSE drops the Kobe panel in
jbplot_summary() and jbplot_ensemble().
jabbaplot3() takes a list of runs too, with a choice of
panels:
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.224The ensemble behaves like a fit in the plots, tables and projections:
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
()
applied to the ensemble
in the TAC year, and the fishing opportunities for
,
,
,
and
:
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.980fc.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
and the biomass response at the start of the following year
(osa = TRUE, the default): the biomass is the start-of-year
biomass,
,
so the effect of the TAC in
appears in
.
The change in biomass is
relative to
,
the start of the last intermediate year, as in
FLRef::fwd2type1():
| 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 |
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)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).
jbplot_crisk() plots, as JABBA’s
jbplot_Crisk(), the probability that
,
that
and that
(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.
Risk plots of this kind support U.S. advice (NOAA, SEDAR
assessments), where the biomass limit is the minimum stock size
threshold, e.g.
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).
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.
The 2018 base case was a Pella-Tomlinson model with , 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 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")The fit is close to the 2018 JAGS assessment. Note the process deviations: with 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.78This 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.
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) |
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")| 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: in 2016 of about 0.78 and of 0.80 with either input, and the joint index gives a slightly narrower interval for . 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.
Three steps, each added to the previous one:
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) |
Each step lowers the estimated status. The base case had in 2016; with the life-history prior, the lag and persistent process error the estimate is about 0.45, with .
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")| 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)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 during rebuilding, and almost two thirds of stocks still below 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.
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.*).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 26A 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 totalThe total catch with its year-specific log-SE, larger where fleets with assumed start values are interpolated:
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:
| 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:
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:
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.
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 6Within 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.0706The 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.7768844All 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:
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 |
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 PassedThe 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.
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_hypandiccat$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.
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 and should be the same in every tier. It is measured by classification skill, for example the true skill statistic (sensitivity + specificity - 1) for or . 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
,
or
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:
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).
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
(or
,
)
in a given year; with year = NULL the prior applies to the
terminal year. Here
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
:
The prior predictive run is the reality check: with the catch and the default priors alone, bigeye would be lightly exploited ( around 2 in 2017, ), 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 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.
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):
jb3_model(effort.creep = 0.02) or estimated with
effort.creep = "estimate" and a normal prior
jb3_priors(creep = c(0.02, 0.02)).
is estimated.aux.q = NA to estimate a scaling
instead);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 ( 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 ( 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.
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")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")| 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, , and of overfishing, , 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:
Moving up the tiers changes the classification of the stock. The prior predictive run classifies bigeye as not overfished (); 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 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 somewhat, but here the agreement is partly built in, because the hypothetical effort was simulated from the index-based assessment.
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):
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 and the z-score over simulated data sets with a known true value , 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 runco.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")| 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 |
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 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 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.
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 instead, and the deviations follow from
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).
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
jb3_selex());jb3_asem_prior()): the simulated KOBsim data
of JABBA-Select, with the truth;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)
(SB/K)/(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)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
.
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.catchThe 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")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.
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,
,
the harvest rate at MSY and the production-function shape. The harvest
rate that r must match depends on the model:
state = "EB"):
,
and
;state = "SB") with catch removed through the
EB/SB curve (the default, ebsb.removal = TRUE):
,
and
;ebsb.removal = FALSE, as JABBA-Select v1;
removal = "SB"):
.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
(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
).
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):
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()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.92Selectivity 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.
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.
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.0000With the spict package installed, the assessment refits with
spict::fit.spict(rjc$inp).
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,827The 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-01By 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):
jb3_priors(sdf = ) (median 0.3, log-SD 0.5 by
default; a SPiCT logsdf prior is carried over).frw = "all" (the conversion here) the random walk
applies to all years.
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.
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
:
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
since the mid-2000s and a rebuilding stock close to
in 2021
(
0.99 and
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
(
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.
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
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"))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 , with , is applied to each draw of 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, at the start of 2024 and the probability of falling below (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 yesThe 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,
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):
| 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:
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 NAThese 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)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
,
,
MSY,
and
(by default 0.5 and 0.3
,
the SPiCT benchmark defaults) and
.
Advice from surplus production models is given in relative terms, so by
default the stock is in
and
;
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")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:
sqrt(SE2) (se and
fixed.obsE combined), with se.min = 0;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.uniform = TRUE
reproduces the JAGS uniform prior on q);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 and 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-02With JABBA’s default inverse-gamma(4, 0.01) process-error prior carried over, K = 1.21 million t and = 0.74 in 2017 (the JABBA3 FishLife prior gives K = 1,174,749 and 0.797, chapter JABBA-like or SPiCT-like).
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-01With 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)Process equation. Biomass relative to K, , with process error acting after the catch (Winker et al. 2018) and a production lag :
where
is the Pella-Tomlinson shape
(
Schaefer,
Fox) and
= bkinit. Years before the start use the initial depletion
for the lagged term.
Process deviations. Stationary AR(1), with the marginal SD:
giving the independent process error of JABBA and SPiCT. Either
(constant) or
with
bounded to xlim (dynamic).
Reference points.
What F means in JABBA3. 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 with of age-structured models. On this scale the catch equation gives , so JABBA3’s equals the fishing mortality of fully selected fish, and is directly comparable with of age-structured assessments. Absolute differs from only through selectivity over the age range. is not the start-of-year exploitation fraction of Hilborn and Walters or sraplus, so no conversion applies; (the harvest rate at MSY, , in the process-error prior) can exceed 1 for fast-growing species.
Observations. Index in year :
(obs.error = "additive"), or
(obs.error = "spict"). Catch:
when catch.error = TRUE.
Estimation. The states
and catch deviations are random effects, integrated by the Laplace
approximation (engine = "rtmb") or sampled with the fixed
effects (engine = "nuts").
| # | 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) |
, 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 (sensitivity 0.5, 0.9); FishLife prior on |
| Shape | Pella with 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 |
| 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.
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 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.