8. Model parameterizations
Source:vignettes/model-parameterizations.Rmd
model-parameterizations.RmdIn progress!
This vignette gives the equations behind CEATTLE’s population dynamics, predation, consumption and observation models, and the inputs that select each selectivity and catchability form.
Population dynamics
CEATTLE is an age-structured model following cohorts of species
,
age
and sex
through time
.
Annual recruitment and the initial age structure are estimated as random
effects (recruitment variance estimated) or as penalized deviates
(variance fixed). Because the initial age structure is estimated
assuming the population was already depleted before the first model
year, the mean recruitment parameter
is biased low: projected recruitment should resemble the hindcast
recruitment deviations, and biomass reference points should use mean
annual recruitment. nsex sets 1- or 2-sex populations; the
sex ratio at birth
is the first age of sex_ratio. Natural mortality is split
into predation mortality (M2) and residual mortality from all other
causes (M1); M1 is input on the M1_base sheet or estimated
with M1Fun = build_M1(M1_model = ...) in
fit_mod().
Predation sub-model
suitMode sets predator-prey preference (suitability,
that is predator selectivity) and msmMode the functional
response.
Suitability
Suitability is a predator’s prey and size preference, together with factors such as predator-prey spatial overlap.
MSVPA Type 2 based suitability
Suitability is derived empirically, following Magnússon (1995), from
the mean proportion by weight of prey-at-age in the stomachs of
predators-at-age,
(diet_data). suitMode = 0 Predator-prey
suitability for predators of species
,
sex
,
age
,
and prey of species
,
sex
and age
Predation mortality
Single-species mode
Independent single-species models: mortality is fishing plus input or
estimated natural mortality
().
msmMode = 0
MSVPA Type 2 based predation mortality
msmMode = 1 An MSVPA-based formulation following
previous MSCAA models (Curti et al., 2013; Holsman et al., 2016; Tsehaye
et al., 2014), built from suitability coefficients
(estimated or empirical), input annual ration/consumption (below), mean
annual prey biomass (estimated or input), and the input biomass of other
prey available to predator
,
.
Predation and biomass are interdependent, so predation mortality and the
age-structured dynamics are iterated a fixed number of times
(niter, no convergence test); three to five iterations
suffice. Fits are generally insensitive to
over a range of values; it has historically been derived from
ecosystem-wide biomass estimates. For predators of species
,
sex
,
age
and prey of species
,
sex
,
age
MSVPA Type 3 based predation mortality
msmMode = 2 A Type III functional response: the
available-food denominator replaces prey biomass
with
,
so predation rate is sigmoidal (accelerating, then saturating) in prey
density. Low-density prey get a refuge from predation, which can
stabilize multi-species dynamics at low stock sizes.
Consumption
Consumption is either an environmentally driven bioenergetics model
or direct input of consumption-at-age, controlled per species on the
bioenergetics_control sheet:
-
CeqWhich bioenergetics equation scales maximum consumption with temperature: 1 = exponential (Stewart et al 1983); 2 = warm-water temperature dependence (Kitchell et al 1977; sensu Holsman and Aydin 2015); 3 = cool- and cold-water temperature dependence (Thornton and Lessem 1978); 4 = no bioenergetics: annual ration (kg per predator per year) is read fromration_dataand scaled byPvalue;CA,CBandfdayare not read -
CindexWhichenv_dataindex supplies for bioenergetics-based ration -
PvalueTuning parameter scaling the maximum consumption used for ration -
fdayForaging days per year, -
CA, the intercept of the allometric mass function for maximum consumption, Cmax = CA * Weight ^ (1 + CB), with Weight in grams -
CB, the slope of that function -
Qc,Tco,Tcm,Tcl,CK1,CK4Parameters , , , , and of the temperature scaling function; which are read depends onCeq, per the algorithms below
Under Ceq 1-3, ration_data holds the
relative foraging rate
;
ration can be tuned through fday and Pvalue.
The weight-at-age used in the consumption equations is set by
pop_wt_index.
Bioenergetics based ration
Ceq %in% 1:3 Annual ration
(,
kg per predator per year) of predator
of sex
and age
in year
:
where
is weight-at-age in grams (stored in kg and multiplied
by 1000 here), so
is the coefficient for a gram-scale weight; the result, in grams, is
divided by 1000 to give kg. Ration can be tuned by adjusting
Pvalue
()
to help convergence:
Temperature scaling algorithms.
Ceq = 1: Exponential function from Stewart et al. 1983:
Ceq = 2: Temperature dependence for warm-water-species
from Kitchell et al. 1977:
Ceq = 3: Temperature dependence for cool and cold-water
species from Thornton and Lessem 1978:
Fishery and survey observation model
CEATTLE is fit to time series of fishery catch, survey biomass, and
length- or age-composition data. Log-catch and (by default) log-index
observations are normally distributed; age and length compositions are
multinomial or Dirichlet-multinomial (Thorson et al. 2017), with their
sample sizes input. There is no separate sex-ratio likelihood component:
sex-ratio information enters through joint
(comp_data$Sex = 3) composition data, whose female and male
cells are normalized together. The log-scale index SD is input,
estimated as a free parameter, or derived analytically following Walters
and Ludwig (1994), per Estimate_index_sd. Selectivity and
catchability are estimated or input separately for each fishery and
survey.
Predicted catch follows the Baranov catch equation:
An index is predicted from catchability
and selectivity
,
in biomass
(mt) or in numbers
(thousands of fish), per Observation_units:
The two fleet types differ in the numbers the index sees,
.
A survey index is a snapshot of the numbers that have
survived to the survey month,
.
That month is read from each index_data row, not from the
fleet, so survey timing can differ by year.
A fishery index is CPUE, accumulated over the year with the catch. Baranov gives , and effort cancels the (since ), leaving the year-average numbers the catch equation uses:
A fishery’s age composition is also built on
,
so its index, catch and comps are consistent, and
is not read for a fishery’s index rows. This is keyed on
Fleet_type; there is no column to set. The distinction
moves trend as well as scale, so a constant
cannot absorb it: at Month = 6,
is 1.0% below
at
but 8.8% below at
.
Stock Synthesis splits the same way on its per-fleet survey timing
(SS_expval.tpl:
;
,
required of every fishing fleet
).
See vignette("model-options-and-functionality") for the
seasonal-fishery case and the measured trend errors.
Selectivity parameterizations
Selectivity is controlled by Selectivity_index,
Selectivity, N_sel_bins,
Time_varying_sel, Time_varying_sel_sd,
Age_first_selected and Bin_first_selected on
the fleet_control sheet:
-
Selectivity_index: Fleets given the same value share one selectivity parameter block. -
Selectivity: Selectivity parameterization for the fleet: 0 or"Fixed"= empirical selectivity provided inemp_sel; 1 or"Logistic"; 2 or"NonParametric"sensu Ianelli et al 2018; 3 or"DoubleLogistic"; 4 or"DescendingLogistic"; 5 or"Hake", non-parametric sensu Taylor et al 2015; 6 or"2DAR1"for bin by year (deviations as in Xu et al. 2019); 7 or"3DAR1", the weight-at-age Gaussian Markov random field (GMRF) of Cheng et al. (2023) applied to selectivity; 8 or"DoubleNormal", a four-parameter double normal (peak, ascending and descending widths, and a right-tail floor): the Stock Synthesis pattern 24 shape without its initial-selectivity and plateau-width parameters; 9 or"NonParametricPM", Ianelli non-parametric with the ADMB AMAK ("pm") penalty; 11 or"LogisticPM", the AMAK logistic with a free age-1 selectivity; 13 or"NonParametricIntegrable", the Ianelli base curve whose deviations have a proper density and so integrate underrandom_sel(Time_varying_selpicks the structure:"Off","IID"or"RandomWalk"); 15 or"DoubleNormalSS3", the six-parameter Stock Synthesis pattern 24 double normal (Methot and Wetzel 2013). There is no 10, 12 or 14. Whether a form is age- or length-based is set bySelectivity_dimension, not by the code, except that"Fixed"is always at age. -
N_sel_bins: Number of age or length bins (perSelectivity_dimension) estimated for the non-parametric and AR1 forms; not read by the others. It is a count of bins, not an age: estimating up to age 6 meansN_sel_bins = 6whenminage = 1and 7 whenminage = 0. -
Time_varying_sel: Whether time-varying selectivity is estimated, for the logistic, double-logistic, descending-logistic and non-parametric forms. 0 or"Off"= no; 1 or"IID"= penalized deviates givenTime_varying_sel_sd, or random effects with that sd estimated underfit_mod(random_sel = TRUE); 3 or"Block"= time blocks with no penalty; 4 or"RandomWalk"= random walk on both limbs (extending Dorn et al. 2018); 5 or"RandomWalkAscending"= random walk on the ascending portion of the double logistic only (Dorn et al. 2018). Value 2 ("AR1") is refused bydata_check(); an autocorrelated deviation is a selectivity linkage,linkage_spec(~ ar1(1 | Year)). The switch as a whole is soft-deprecated in favour of that grammar. -
Time_varying_sel_sd: The sd of the time-varying selectivity deviates. Underfit_mod(random_sel = FALSE)it is fixed at this value, per fleet. Underrandom_sel = TRUEthe deviates are integrated out and the sd is estimated from this starting value; fleets sharing aSelectivity_indexshare one estimated sd started at the geometric mean of theirs. The 2DAR1 and 3DAR1 forms read it under everyTime_varying_sel, as the conditional sd of their deviation field, so they always need a positive value. -
Age_first_selected: First age selected (absolute age). Selectivity is 0 below it on an age-based fleet; on a length-based fleet younger ages are zeroed in the fleet’s age-length key, so no fish below this age are caught at any length (Stock Synthesis age pattern 11 to the plus group, or pattern 10 when the first age is 1). -
Bin_first_selected: First length bin selected on a length-based fleet, a 1-based bin ordinal; selectivity is 0 below it. On an age-based fleet it is the deprecated spelling ofAge_first_selected, read as ageminage + Bin_first_selected - 1.
Selectivity penalty weights
Sel_curve_pen1/2/3 are penalty weights on a
Gaussian sum-of-squares
(),
so you may instead supply a standard deviation, which
sets the matching Sel_curve_pen column to
.
A Sel_curve_pen you set directly is never overwritten.
Which form reads which slot, and what it charges:
| Slot | SD column | Reads the sign? |
NonParametric (2) |
NonParametricPM (9) |
NonParametricIntegrable (13) |
LogisticPM (11) |
|---|---|---|---|---|---|---|
Sel_curve_pen1 |
Sel_shape_sd |
only on 9 under Sel_shape_mode = "Directional"
|
shape, on the realized curve | shape, on the realized curve | shape, on the base curve | random walk on realized log-selectivity |
Sel_curve_pen2 |
Sel_curvature_sd |
no | 2nd-difference curvature, on the realized curve | 2nd-difference curvature, on the realized curve | 2nd-difference curvature, on the base curve | not read |
Sel_curve_pen3 |
Sel_devmag_sd |
no | not read | deviation magnitude | not read | random walk on the age-1 deviates |
Realized or base. Forms 2 and 9 charge the shape and
curvature penalties on the realized curve, accumulated over
sexes and years (form 2 under "IID" or
"RandomWalk", form 9 from Sel_start_year under
"RandomWalk"; 9 refuses "IID"). Form 13
charges them once per sex on the base coefficients. The same
weight therefore bites harder on a time-varying 2 or 9; retune rather
than copy one across forms.
Whether a value you set has any effect depends on:
-
The direction.
Sel_shape_dir = "Increasing"is implemented only byNonParametricPM(9) underSel_shape_mode = "Directional", where it moves the one-sided penalty from the decreasing side to the increasing one. Everywhere else, including 9 under"Smooth"(two-sided), the weight is applied as written, so"Increasing"is refused rather than silently negating it. -
The sign. A weight multiplies a squared deviation,
so a negative one rewards that deviation.
data_check()refuses a negativeSel_curve_penwherever the template reads it as a weight, which leaves four cases it does not refuse: the directional case above, aFleet_type = "Off"fleet (charged no selectivity penalty at all), a fleet that follows another’sSelectivity_indexand shares its selectivity form (the group’s penalty is charged once, on the lead), and a slot charged on deviates the fleet does not estimate, per the next point. -
Whether the deviates exist. The three cells above
marked as random walks or deviation magnitude are charged on the
time-varying deviates, so under
Time_varying_sel = "Off"they are identically zero and the weight is never read. Forms 2 and 13 do estimate deviates, but score them with a Gaussian density onTime_varying_sel_sd, which is why they never read slot 3.
The 2D/3D-AR1 forms (6/7) reuse Sel_curve_pen1/2/3 for
logit-scale correlations, not weights, and keep those columns. The
Hake form (5) reads no Sel_curve_pen slot.
Fixed selectivity
Input: Selectivity = 0 or "Fixed", with
selectivity-at-age supplied in emp_sel. The last hindcast
year supplied for a fleet and sex is held through the projection.
Non-parametric (Type 1)
Input: Selectivity = 2 or "NonParametric",
N_sel_bins = 6, Sel_curve_pen1 = 12.5,
Sel_curve_pen2 = 200, and
Age_first_selected = 1. See Selectivity penalty
weights above for the Sel_curve_pen slots and the
standard-deviation columns that set them.
Equation:
Logistic
Input: Selectivity = 1 or "Logistic",
N_sel_bins = NA, Time_varying_sel = 0, and
Time_varying_sel_sd = NA
Equation:
Time-varying logistic
Input: Selectivity = 1 or "Logistic",
N_sel_bins = NA, and Time_varying_sel_sd = 0.1
or another starting value.
Equation:
Penalized likelihood: Time_varying_sel = 1
Random effect: Time_varying_sel = 1 with
fit_mod(random_sel = TRUE), where the deviations are
integrated out by the Laplace approximation and
is estimated rather than fixed at Time_varying_sel_sd
Block: Time_varying_sel = 3, where the main parameters are
set to 0 and
Penalized likelihood random walk: Time_varying_sel = 4
Double logistic
Input: Selectivity = 3 or "DoubleLogistic",
N_sel_bins = NA, Time_varying_sel = 0, and
Time_varying_sel_sd = NA
Equation:
Time-varying double logistic 1 (ascending and descending time-varying parameters)
The four deviate structures (Time_varying_sel 1
penalized or as a random effect, 3 block, and 4 random walk) are as
under Time-varying logistic above.
Time-varying double logistic 2 (random walk ascending-time varying parameters)
Input: Selectivity = 3 or "DoubleLogistic",
N_sel_bins = NA, Time_varying_sel = 5, and
Time_varying_sel_sd = 0.05 or another starting value
Equation:
Descending logistic
Input: Selectivity = 4 or "DescendingLogistic",
N_sel_bins = NA, Time_varying_sel = 0, and
Time_varying_sel_sd = NA
Equation:
Time-varying descending logistic
Input: Selectivity = 4 or "DescendingLogistic",
N_sel_bins = NA, Time_varying_sel = 1, and
Time_varying_sel_sd = 0.05 or another starting value
Equation:
The four deviate structures are as under Time-varying logistic above.
Non-parametric (Type 2)
For each age there is an incremental selectivity parameter for fleet , and selectivity at age is:
$$sel_{f_i sa}=e^{sel^{`}_{f_i sa} -
max(sel^{`}_{f_i sa})}$$ where $$
sel^{`}_{f_i sa} = \sum_{i=A_{min}}^a p_{f_i sa}$$ Selectivity is
0 for
,
and
from minage + N_sel_bins, so selectivity is constant beyond
the last estimated bin. minage, set in the data, is the
youngest age modeled.
Input: Selectivity = 5 or "Hake",
N_sel_bins = 6, Time_varying_sel = NA,
Time_varying_sel_sd = NA, and
Age_first_selected =
Time-varying non-parametric (Type 2 for hake)
As above, but deviations on carry annual changes in selectivity, given a fixed or estimated standard deviation ():
Penalized likelihood: Time_varying_sel = 1
Random effect: Time_varying_sel = 1 with
fit_mod(random_sel = TRUE), as under Time-varying
logistic
Catchability parameterizations
Catchability is controlled by the following
fleet_control columns:
-
Catchability_indexFleets given the same value share one catchability parameter. -
CatchabilityCatchability form: 0 or “Fixed” = fixed atCatchability_init; 1 or “Estimated” = a single free parameter; 2 or “Estimated-with-prior” = a single free parameter with a prior; 3 or “Analytical” = q solved in closed form as the maximum likelihood q for the fleet’sIndex_distribution(refused under TruncatedNormal); 4 or “PowerEquation” = power equation, declared but not yet implemented; 5 or “Environmental” = linear equation log(q_y) = q_mu + beta * index_y; 6 or “AR1” = refused bydata_check(); express the Rogers et al. (2024) form as a q linkage withar1(1 | Year)andobserve =; 7 or “AnalyticalArith” = arithmetic-mean analytical q, the AMAK/ebswp form, paired with the MVN survey likelihood. -
Catchability_initStarting or fixed value for catchability -
Catchability_prior_sdLog-scale SD of the q prior: dnorm(log_q, log(Catchability_init) - bias_adjust_proc * sd^2/2, sd) -
Time_varying_qWhether a time-varying q is estimated. 0 = no; 1 = penalized deviate; 2 = AR1 (refused bydata_check()); 3 = time blocks with no penalty; 4 = random walk from the mean following Dorn et al. 2018 (dnorm(q_y - q_y-1, 0, sigma)). UnderCatchability = 5it instead holds theenv_dataindex for log(q_y) = q_mu + beta * index_y. -
Time_varying_q_sdFixed or starting sd of the time-varying q deviations, read underTime_varying_q1 and 4 and estimated underfit_mod(random_q = TRUE)
Linear time-invariant catchability formulations
All take Time_varying_q = 0.
Catchability = 0 fixes
at Catchability_init.
Catchability = 1 A free parameter
per index fleet
Catchability = 2 As above, with a lognormal prior on
Q prior (Catchability_init) is the prior
mean of
under fit_control(bias_adjust_proc = TRUE), the default,
and its median otherwise; Q sd prior is on the log
scale.
Catchability = 3
is the closed-form maximum likelihood estimate under the fleet’s index
likelihood (Index_distribution). Write
for the predicted index above with
(it uses
,
so survey timing and the fishery year-average are already handled),
for the observed index, and sum over the
hindcast years with an observation.
Under the lognormal likelihood
is the geometric mean of Walters and Ludwig (1994), adjusted for the
bias correction. With
and
= bias_adjust_obs (the lognormal log-scale mean carries
):
- time-invariant index SD (estimated or analytical):
- index SD input by year: the harmonic mean of the yearly variances.
With Estimate_index_sd = 2 the variance is
,
the mean of
,
so
and
are their joint maximum likelihood estimate.
Walters, C. and Ludwig, D. (1994) ‘Calculation of Bayes posterior probability distributions for key population parameters’, Canadian Journal of Fisheries and Aquatic Sciences, 51(3), pp. 713-722, doi:10.1139/f94-071.
Under the Normal likelihood, with the absolute SD
input by year or estimated,
is the weighted least-squares estimate:
Under MVN and MVNORM, with the fleet’s covariance
over the same years, it is the generalized least-squares estimate:
A TruncatedNormal likelihood has no closed-form
,
because its truncation term depends on
,
so data_check() refuses Catchability = 3
there.
Each estimate is solved for the current values of the other parameters, random effects included, so with random effects it is not the that maximizes the likelihood with them integrated out, and its objective should not be compared with that of a fit that estimates . The MVN/MVNORM estimate is not forced positive: with a strongly correlated it can go negative at parameter values far from the best fit.
Time-varying catchability formulations
Under Catchability = 2 the prior above still applies to
mean catchability.
Annual catchability estimated via penalized likelihood or as random effects
Catchability %in% c(1:2) and
Time_varying_q %in% c(1, 4)
Time_varying_q_sd
under 1 (IID), or
Time_varying_q_sd
under 4 (random walk), with Time_varying_q_sd
either fixed or estimated under
fit_mod(random_q = TRUE)
Catchability time-blocks
Catchability %in% c(1:2),
Time_varying_q = 3, with the blocks taken from
index_data.
Annual catchability via random walk
Catchability %in% c(1:2),
Time_varying_q = 4
Time_varying_q_sd
References
- Cheng, M.L.H., Thorson, J.T., Ianelli, J.N., Cunningham, C.J. (2023). Unlocking the triad of age, year, and cohort effects for stock assessment: demonstration of a computationally efficient and reproducible framework using weight-at-age. Fisheries Research, 266, 106755.
- Curti, K.L., Collie, J.S., Legault, C.M., Link, J.S. (2013). Evaluating the performance of a multispecies statistical catch-at-age model. Canadian Journal of Fisheries and Aquatic Sciences, 70, 470-484.
- Dorn, M., Aydin, K., Fissel, B., Palsson, W., Spalinger, K., Stienessen, S., Williams, K., Zador, S. (2018). Assessment of the walleye pollock stock in the Gulf of Alaska. In: Stock assessment and fishery evaluation report for the groundfish resources of the Gulf of Alaska. North Pacific Fishery Management Council, Anchorage, AK.
- Holsman, K.K., Aydin, K. (2015). Comparative methods for evaluating climate change impacts on the foraging ecology of Alaskan groundfish. Marine Ecology Progress Series, 521, 217-235.
- Holsman, K.K., Ianelli, J., Aydin, K., Punt, A.E., Moffitt, E.A. (2016). A comparison of fisheries biological reference points estimated from temperature-specific multi-species and single-species climate-enhanced stock assessment models. Deep Sea Research Part II, 134, 360-378.
- Ianelli, J., Kotwicki, S., Honkalehto, T., McCarthy, A., Stienessen, S., Holsman, K., Siddon, E., Fissel, B. (2018). Assessment of the walleye pollock stock in the Eastern Bering Sea. In: Stock assessment and fishery evaluation report for the groundfish resources of the Bering Sea/Aleutian Islands regions. North Pacific Fishery Management Council, Anchorage, AK.
- Kitchell, J.F., Stewart, D.J., Weininger, D. (1977). Applications of a bioenergetics model to yellow perch (Perca flavescens) and walleye (Stizostedion vitreum vitreum). Journal of the Fisheries Research Board of Canada, 34, 1922-1935.
- Magnússon, K.G. (1995). An overview of the multispecies VPA — theory and applications. Reviews in Fish Biology and Fisheries, 5, 195-212.
- Methot, R.D., Wetzel, C.R. (2013). Stock synthesis: a biological and statistical framework for fish stock assessment and fishery management. Fisheries Research, 142, 86-99.
- Rogers, L.A., Monnahan, C.C., Williams, K., Jones, D.T., Dorn, M.W. (2024). Climate-driven changes in the timing of spawning and the availability of walleye pollock (Gadus chalcogrammus) to assessment surveys in the Gulf of Alaska. ICES Journal of Marine Science, 82(1), fsae005.
- Stewart, D.J., Weininger, D., Rottiers, D.V., Edsall, T.A. (1983). An energetics model for lake trout, Salvelinus namaycush: application to the Lake Michigan population. Canadian Journal of Fisheries and Aquatic Sciences, 40, 681-698.
- Taylor, I.G., Grandin, C., Hicks, A.C., Taylor, N., Cox, S. (2015). Status of the Pacific hake (whiting) stock in U.S. and Canadian waters in 2015. Joint Technical Committee of the U.S. and Canada Pacific Hake/Whiting Agreement; National Marine Fisheries Service; Fisheries and Oceans Canada.
- Thornton, K.W., Lessem, A.S. (1978). A temperature algorithm for modifying biological rates. Transactions of the American Fisheries Society, 107, 284-287.
- Thorson, J.T., Johnson, K.F., Methot, R.D., Taylor, I.G. (2017). Model-based estimates of effective sample size in stock assessment models using the Dirichlet-multinomial distribution. Fisheries Research, 192, 84-93.
- Tsehaye, I., Jones, M.L., Bence, J.R., Brenden, T.O., Madenjian, C.P., Warner, D.M. (2014). A multispecies statistical age-structured model to assess predator-prey balance: application to an intensively managed Lake Michigan pelagic fish community. Canadian Journal of Fisheries and Aquatic Sciences, 71, 627-644.
- Walters, C., Ludwig, D. (1994). Calculation of Bayes posterior probability distributions for key population parameters. Canadian Journal of Fisheries and Aquatic Sciences, 51, 713-722.
- Xu, H., Thorson, J.T., Methot, R.D., Taylor, I.G. (2019). A new semi-parametric method for autocorrelated age- and time-varying selectivity in age-structured assessment models. Canadian Journal of Fisheries and Aquatic Sciences, 76, 268-285.