Description of Model Equations
c_model_equations.RmdThe Stochastic Population over Regional Components
(SPoRC) model is a generalized integrated population model
written in RTMB (R bindings for Template Model Builder;
Kristensen et al., 2016) that supports age, sex, population, seasonal,
and spatially-structured dynamics. Population dynamics operate across an
annual time step that is further subdivided into
seasons of duration
(where
).
Within each annual–seasonal cycle, processes occur in sequential
order:
- Recruitment generally occurs in the first season, with additional recruits apportioned to subsequent seasons according to seasonal proportions. The exception is age-0 recruitment (no lag between spawning and recruitment; see Recruitment Processes below), where recruits instead enter no earlier than the spawning season,
- Markovian movement of individuals then follows (movement only occurs in the spatial model),
- Total mortality occurs within each season; at the end of the final season, individuals advance in age.
Tag releases occur simultaneous to recruitment in the release year and season (i.e., recruits can be tagged), and tag recaptures are computed each season.
These processes are modeled across five primary partitions: population (), region (), year (), season (), age ( and , where is the plus group), and sex (). In single-population, single-region and/or single-sex models, these equations generally reduce by setting , and/or . In general, the same equations are used for both simulation and estimation.
Process Equations
Population Initialization
In SPoRC, three primary methods exist to initialize the
equilibrium population of the model. The first method derives the
equilibrium population using the following process:
where:
- are the equilibrium numbers-at-age,
- is a global recruitment parameter used to scale the equilibrium age structure during initialisation. Users have the option to either initialize the population using the same recruitment parameter that governs the stock-recruit relationship (either virgin or mean recruitment depending on the parameterization), or to estimate a separate recruitment scalar exclusively for initialization The latter is useful when the historical mean recruitment used to initialize the population differs from the virgin recruitment implied by the stock-recruit relationship, or when the assumption that the population was at unfished equilibrium at the start of the time series is not appropriate.
- is the initial instantaneous total mortality rate,
- is the instantaneous natural mortality rate,
- is the log-mean fishing mortality rate for fleet in region and season ,
- is a parameter (or user-defined) describing the proportion of the mean fishing mortality for a given fleet applied across during the initialization stage,
- is an indicator variable equal to 1 if fleet is active in region and season in year 1, and 0 otherwise,
- is the total fishery selectivity-at-age for fleet ,
- is the retention selectivity-at-age for fleet ,
- is the discard mortality rate for fleet in region and season ,
- is the number of fishing fleets,
- describes the recruitment sex-ratio,
- apportions the global recruitment parameter across regions (estimated using a multinomial logit transform to ensure proportions sum to one).
Because the equilibrium calculation above is a purely deterministic
(non-stochastic) projection,
is treated as the median of the assumed lognormal recruitment process
(consistent with how
is interpreted elsewhere; see Recruitment Processes), and the same
lognormal bias-correction term used for recruitment deviations is
applied here as a static offset rather than about an estimated
deviation. This keeps the equilibrium age structure on a scale
consistent with the rest of the recruitment process even though no
annual deviation is estimated at initialization. The same correction is
applied when the operating model constructs an equivalent equilibrium
seed during closed-loop simulation (Setup_Sim_Rec()’s
rinit_input pathway), so fitted and simulated equilibria
remain on a consistent scale.
The plus group () of the initial population is then computed as:
However, this scalar geometric series solution assumes that the plus group accumulates in a closed system. Therefore, when movement dynamics are present, this solution does not correctly accumulate individuals into the plus group.
To address this, additional methods are provided to explicitly incorporate movement dynamics into the plus group calculation. In particular, the initial population can be derived by iterating the population to equilibrium. An exponential decay model is used to first initialize the age structure at the first iteration:
The initialized age structure is then iterated forward to equilibrium by applying recruitment, movement, and mortality and ageing processes in order (see Population Projection section for equations).
While the iterative method correctly accumulates the plus group when
movement is present, it can be computationally inefficient. Therefore,
SPoRC enables users to compute the plus group using the
matrix formulation of the geometric series, which correctly accounts for
movement processes. The population is projected forward to the
penultimate age
(),
and the penultimate age is then projected forward once more:
where is a first-order Markov matrix representing movement for population , and represents the culmination of processes applied to the penultimate age. A transition matrix is then constructed to represent the combined effects of survival and movement on the plus group:
The plus group solution incorporating movement is then given by:
When only a single region is modeled or no movement occurs (i.e., an identity matrix), the matrix formulation simplifies to the standard scalar geometric series solution.
Following the definition of equilibrium age structure, initial age deviations can be applied:
where represents the numbers-at-age in the first model year and season except for recruits (). These values can be treated as a stochastic process by applying multiplicative lognormal deviations to the initial equilibrium age structure. Note that the index is introduced because users can determine whether initial age deviations are estimated up to the penultimate age class, or across all classes including the plus group.
Recruitment Processes
In the current iteration of SPoRC, two stock recruitment
parameterizations can be specified. Recruitment can be specified to
arise about a mean parameter
():
where are annual, lognormally distributed recruitment deviations with a lognormal bias correction term (), with representing the bias correction ramp from Methot and Taylor (2011), and is the proportion of annual recruitment assigned to season for population (with ). For seasons , recruits are added to the existing numbers at age 1:
where is the total annual recruitment (before seasonal apportionment) for population in region and year .
Recruitment can also be specified to arise from a Beverton-Holt stock recruitment function to invoke density-dependent population dynamics, following the steepness parameterization (Mace and Doonan, 1988). Localized density-dependent recruitment is defined as:
while global density-dependent recruitment can be defined as:
where under this parameterization is the virgin unfished recruitment for population , (or ) is the steepness parameter representing the fraction of that would be produced when at 20% of (or ). The steepness parameter is constrained to be between values of 0.2 and 1 and are estimated in bounded logit space. is a derived variable that represents the unfished spawning stock biomass. is the spawning stock biomass for population in region , and is the effective spawning stock biomass (see Spawning Biomass section below).
The spawning stock biomass is the product of numbers-at-age, spawning weight-at-age, and maturity-at-age for females in the spawning season :
For single-sex models, SSB is multiplied by 0.5 to obtain female-only spawning biomass.
Note that
denotes the delay (in seasons) between spawning and when recruits enter
the population, and is user-specified as
(the classic case above) or
(age-0 recruitment, described below). For
:
if
(i.e. there is not yet enough model history to look back
seasons), SPoRC utilizes
instead of
to compute deterministic recruitment.
Age-0 Recruitment ()
When , recruitment for year is driven by that same year’s own spawning biomass rather than a prior year’s. The Beverton-Holt equations above still apply, but with (or for global density dependence) in place of , and recruits enter starting at the spawning season rather than season 1:
with any remaining seasonal share () added to the existing numbers at age 1 exactly as in the equation above.
Because / is not knowable until season is actually reached within year , this timing constraint is enforced structurally rather than left to the user:
- for every season before (validated at setup; recruits cannot predate the spawning event that produced them), and
- for all (validated at setup; age-0 fish cannot be mature), which guarantees the term in the sum is always zero regardless of whether this year’s recruits have been added to yet at the point is evaluated.
itself is a pure per-recruit, equilibrium quantity and does not depend on which is the same value is used whether recruitment is lagged or age-0. Unlike the case, there is no burn-in substitution of for early years: since , (this year’s own survivor biomass) is always available by the time it is needed, including in year 1.
Effective Spawning Biomass and Multi-Population Dynamics
When multiple populations are modeled (), effective spawning biomass at each population’s natal region accounts for stray contributions from other populations:
where is the natal region of population , is the stray rate of population (the fraction of its spawning biomass contributing to non-natal regions), and the sum is taken over all other populations . For a single population, . Note that is the number of populations in a given region, where the contribution of is split evenly among populations.
Single-Season Spawning Movement
When and , a separate spawning movement matrix is applied to both fished and unfished numbers-at-age prior to computing spawning biomass quantities, representing natal homing of individuals to their spawning grounds:
This additional movement is applied only for spawning biomass calculations and does not alter the numbers-at-age array used for subsequent mortality and movement processes.
Population Projection
Following recruitment processes, the population is projected forward. In the context of the spatial model, Markovian movement dynamics are first applied within each season:
Here, is a first-order Markov matrix representing movement. In a single-region case, no movement is applied (i.e., is an implied identity matrix). For each population, year, season, age, and sex combination, the movement matrix specifies bulk-transfer coefficients, with parameters transformed through a multinomial logit to ensure that proportions within each origin region sum to one.
For age-0 recruitment (), this movement step at season is applied to the survivor population before that season’s /recruitment are computed (see Age-0 Recruitment above); the resulting recruits are then inserted immediately afterward, so they still experience that season’s mortality below like any other seasonal recruit pulse.
Following movement, mortality occurs. For seasons within a year (), within-season mortality is applied and individuals advance to the next season at the same age:
At the end of the final season (), individuals advance in age:
denotes the seasonal total instantaneous mortality rate and is defined as the combination of natural mortality () scaled by seasonal duration , retained fishing mortality (), and dead discard fishing mortality ():
where the retained and dead discard fishing mortality rates at age are:
Here, is the total fishery selectivity (governing encounter probability), is the retention selectivity (governing the probability of retention given encounter), and is the discard mortality rate for fleet . Only the dead fraction of discards contributes to total mortality. The seasonal instantaneous fishing mortality rate is defined as:
where is parameterized based on lognormal deviations ( about a mean fishing mortality parameter for a given region, season, and fishery fleet (). When no catch data are available for a given region, season, and fleet, fishing mortality is set to zero.
The discard mortality rate is parameterized analogously via logistic deviations about a mean logit-scale discard mortality rate:
where is the logit-scale mean discard mortality rate and are annual deviations. The discard mortality rate is bounded between 0 and 1.
Movement Processes
Movement processes can be parameterized as either an unstructured Markov process (discrete-time Markov) or as a Continuous-time Markov chain (CTMC) process. Movement parameterized as an unstructured Markov process is estimated using a multinomial logit link function, with free parameters per stratum:
where the reference region is set as . Under this parameterization, movement fractions can be estimated independently for each stratum , or grouped into blocks to reduce the number of parameters.
Alternatively, movement can be specified as a continuous-time Markov chain (CTMC) process, which decomposes into diffusive and taxis components. Diffusive processes represent undirected movement of individuals, while taxis processes represent directed movement toward more preferred habitat. This CTMC movement parameterization is governed by an adjacency matrix (), which defines neighboring regions that can receive individuals within a given time step. Diffusive processes are given by:
where represents diffusion, is the log diffusion rate, scales the log diffusion rate, such that smaller regions have higher diffusion rates, and in the second equation indexes all destinations except the source to ensure that the rows of the matrix sum to 0, thereby conserving abundance. Taxis processes (preference) can then be written as:
Here, represents the taxis (preference) component of movement. Equation 1 determines local differences in the habitat preference function, , while equation 2 ensures that the rows of the matrix sum to 0, conserving abundance.
Habitat preference can be defined flexibly as a combination of linear effects and basis splines:
where are the estimated effects (incorporating linear or spline effects), and is the design matrix.
Diffusive and taxis processes can then be combined to construct a generator matrix:
Here, represents instantaneous movement rates. The generator matrix is Metzler, such that all off-diagonal elements satisfy:
Given that movement in SPoRC is defined sequentially,
the instantaneous movement matrix can then be converted to annual
movement fractions using the matrix exponential:
where is the duration of the movement interval.
Observation Equations
Fishery Observation Model
The fishery observation model describes the expected retained catch-at-age, retained catch-at-length, discarded catch-at-age, discarded catch-at-length, catch and discard (in units of biomass or abundance), and fishery indices.
Expected retained catch-at-age () for a given fishery fleet is calculated using Baranov’s catch equation applied to the retained fishing mortality:
Expected dead discarded catch-at-age () is similarly:
To track length-based dynamics, retained catch-at-length () and discarded catch-at-length () are derived using:
where is a user-defined size-age transition matrix to convert ages to lengths. Expected retained catch () is computed by summing over populations and then either as abundance:
or as biomass:
Population-specific predicted retained catch () retains the population index and is not summed across :
Expected total discards () are computed from the dead discarded catch-at-age scaled back by the discard mortality rate to yield total discarded individuals (dead and released alive):
Discards can also be expressed as a fraction of total catch (abundance or biomass). Population-specific discards follow the same structure without summing across .
Similarly, expected fishery indices () can be computed as either abundance-based or biomass-based, using the product of total fishery selectivity and retention selectivity:
where is the catchability coefficient for a given fishery fleet. Note that unlike the survey index, the fishery index is computed directly from numbers-at-age without applying additional survival discounting. Biomass-based fishery indices are computed as:
The observed region-aggregated fishery index is compared to the sum of predicted indices across populations: . Population-specific fishery indices are compared directly to without summation.
Survey Observation Model
Likewise, the survey observation model describes the expected survey catch-at-age, survey catch-at-length, and survey indices. Expected survey catch-at-age () is calculated as follows:
where subscript denotes a given survey fleet, is the survey timing as a fraction of the season, and is the survey selectivity-at-age pattern. Expected survey catch-at-length () is given by:
Survey indices () can be computed as either abundance-based or biomass-based. Abundance-based survey indices are calculated as:
while biomass-based indices are computed as:
Here, is the weight-at-age for a given survey, represents the survey catchability coefficient. The observed region-aggregated survey index is compared to the sum of predicted indices across populations: . Population-specific survey indices are compared directly to without summation.
For survey catchability, environmental linkage can be specified:
where is the base survey catchability (i.e., intercept), is a matrix of covariates, is a vector of regression coefficients, are orthogonal polynomial coefficients along with its basis functions, and are the covariates for which a polynomial term is assumed.
Tagging Observation Model
The tagging observation model tracks tag cohorts () by the combination of release region, release year, and release season () and follows a Brownie tag attrition framework. Tag cohorts are tracked for a pre-defined maximum duration (maximum tag liberty; ), after which calculations for the tag cohort are no longer computed. Tag dynamics incorporate both population () and season () dimensions, and tag reporting rates are fleet-specific (). In general, the process dynamics for the tagged cohort mimic those specified for the overall population. Immediately following release, tag cohorts are decremented by an initial tag-induced mortality rate:
where is the initial tag-induced mortality rate. If tagged cohorts are released at the beginning of a season (), Markovian movement occurs before mortality is applied; otherwise, movement is skipped in the release season:
Within-season mortality and ageing of the tagged cohort then occurs. For seasons within a year ():
At the end of the final season (), individuals advance in age:
where tagged cohorts follow an exponential mortality model with accumulation of individuals in the plus-group. Total mortality for the tagged cohort () is specified as:
where is a parameter describing chronic tag loss (i.e., annual tag shedding) and denotes the subset of fishing fleets that contribute tagging data. The summation over rather than all fleets is intentional: restricting the tag mortality calculation to fleets with tagging data prevents non-tagging fleets from unintentionally influencing tag-based parameter estimates (e.g., selectivity, reporting rates).
Similar to computations for retained catch-at-age, tag recaptures are calculated using a modified version of Baranov’s catch equation, with fleet-specific tag reporting rates applied to the retained component:
where represents a fleet-specific tag reporting rate parameter that can vary across space, time, and fleet, which is estimated in logit space such that it is constrained between . Recaptures are computed only for fleets in .
Fishery and Survey Selectivity
In the following descriptions of selectivity, we omit subscripts for sexes and fleets for brevity, although note that the equations remain specific to those model partitions. Several approaches are available for parameterizing fishery and survey selectivity. Selectivity can be defined as either age- or length-based. Selectivity parameters are estimated by region (), year (), sex (), and fleet, and are explicitly invariant across populations () and seasons ().
For age-based selectivity, an age vector is applied directly with a chosen functional form, and the resulting selectivity-at-age () is likewise invariant across populations and seasons. For length-based selectivity, a length vector is used to compute selectivity-at-length (), which is then converted to selectivity-at-age via a dot product with the size-age transition matrix:
Because the size-age transition matrix varies across populations and seasons, the derived selectivity-at-age inherits population and season specificity upon conversion, even though the underlying selectivity-at-length parameters remain shared across these dimensions. Given the age-based nature of the model, selectivity-at-age is utilized for all subsequent calculations. In the following we use the subscript to denote a generalized bin number.
Two forms of logistic selectivity can be specified. The first form is defined as:
where determines the slope/steepness of the logistic curve and is the bin-at-50% selection. The second form can be expressed as:
Here,
is also the bin-at-50% selection and
is the bin-at-95% selection. Beyond the specification of flat-topped
selectivity, SPoRC also allows for dome-shaped selectivity.
In particular, a reparametrized gamma function can be specified:
In this parameterization, is a derived power parameter, is the shape parameter that describes the steepness of the descending limb, and describes the bin-at-maximum selection. Dome-shaped selectivity can also be expressed as a power function:
with being a power parameter that determines the descending limb of the curve (larger values are steeper). The last dome-shaped selectivity form that can be specified includes a 6 parameter (denoted as through ) double normal functional form with the following transformations applied:
represents the beginning of the plateau, describes the width of the plateau, and are parameters controlling the ascending and descending widths, and and control the selectivity at the first and last bins. The double normal function is then defined with a series of functions:
and are joined together as:
The double normal functional form is incredibly flexible and is able to reduce to both flat-topped and dome-shaped selectivity forms, depending on the values of the parameters.
Non-parametric selectivity can also be specified, where bin-specific logit-scale parameters are transformed via the logistic function:
where is a freely estimated logit-scale selectivity parameter for each bin.
Two additional logistic forms with a freely estimated asymptote parameter are also available. The first uses the bin-at-50% and slope parameterization:
The second uses the bin-at-50% and bin-at-95% parameterization:
where is estimated on the logit scale, allowing the asymptotic selectivity to be less than 1. These forms are useful for fleets where full vulnerability is not achieved even at the largest observed sizes or ages.
Bicubic Spline Selectivity
Rather than a fixed functional form, selectivity can instead be constructed as a smooth two-dimensional surface over bins and years using a bicubic natural cubic spline. A sparse grid of freely estimated log-scale node parameters, , indexed by bin-node and year-node , is expanded to the full bin-by-year surface via two successive natural cubic spline interpolations.
Bin-nodes and evaluation bins are first placed on a common scale, equally spaced by index:
and a natural cubic spline is fit through the node positions , producing an interpolation weight matrix such that, for any vector of node values, maps those node values onto all evaluation bins while passing exactly through the node values themselves. An analogous weight matrix () is constructed for the year dimension using year-nodes similarly placed on . The full surface is then obtained by a two-pass tensor-product spline: first interpolating across bins for every year-node,
where is the matrix of node parameters () and is , and then interpolating the resulting bin-interpolated year-node curves across years for a given year :
so that for every bin . Setting collapses the year dimension to a single node (equal weight for every year), yielding a time-invariant bin-only spline; combining with discrete time blocks (see Temporal Variation below) re-fits an independent bin-only spline within each block.
Two optional restrictions can be applied to the range over which the surface is actually spline-fit, with everything outside that range held constant (edge-held) rather than continuing the spline.
The first restricts the year dimension: given a user-specified calendar year within a given block, only years from through the block’s final year are used to place year-nodes and evaluate the spline. Years within the block prior to are assigned the same interpolation weights as itself (the boundary node),
i.e., “filled” forward from the first actually-fitted year.
The second restricts the bin dimension: given a user-specified number of bins , bin-nodes and the spline are only evaluated over bins ; any remaining bins are held at the last fitted bin’s value,
This is useful, for example, when the observed age or length range used to originally fit the surface is narrower than the full number of ages or lengths represented in the population dynamics.
In addition to the functional forms that can be specified to describe selectivity processes, several options exist to specify continuous time-varying processes. In particular, options to specify time-varying parametric selectivity and time-varying semi-parametric selectivity are available. To illustrate, if logistic selectivity is specified and parametric deviations are invoked, the following expression is used:
where the parameters of the logistic form are allowed to vary over time.
In the context of semi-parametric selectivity, the following equation is used:
where deviations are placed about the parametric form and selectivity values are mean standardized to aid with interpretability. Mean standardization is applied only when semi-parametric deviations are specified (process error models 3–5), or when non-parametric selectivity is specified. For age-based selectivity, the mean is computed from a single population and season reference () since the underlying selectivity is invariant across these dimensions, and the standardization is then applied identically across all populations and seasons:
where is the mean of log-selectivity across all years and bins for a given region, sex, and fleet. For length-based selectivity, mean standardization is applied directly to the selectivity-at-length values before conversion to the age domain via the size–age transition matrix. Further details on how selectivity deviations arise can be found in the “Selectivity Process Error” section of this document.
Likelihoods
Currently, SPoRC incorporates data likelihood components
for the following data sources:
- region-aggregated fishery catches (summed across populations),
- population-specific fishery catches,
- region-aggregated fishery discards (summed across populations),
- population-specific fishery discards,
- region-aggregated fishery indices (summed across populations),
- population-specific fishery indices,
- region-aggregated fishery age compositions (summed across populations),
- population-specific fishery age compositions,
- region-aggregated fishery length compositions (summed across populations),
- population-specific fishery length compositions,
- region-aggregated discard age compositions (summed across populations),
- population-specific discard age compositions,
- region-aggregated discard length compositions (summed across populations),
- population-specific discard length compositions,
- region-aggregated survey indices (summed across populations),
- population-specific survey indices,
- region-aggregated survey age compositions (summed across populations),
- population-specific survey age compositions,
- region-aggregated survey length compositions (summed across populations),
- population-specific survey length compositions, and
- conventional tagging data.
Region-aggregated likelihoods compare observed data to predicted quantities summed across all populations (), while population-specific likelihoods compare observed data to predicted quantities for a single population directly. The total likelihood (objective function) is the sum of the individual likelihood contributions from these data sources along with priors and penalties, where the objective function is minimized using a non-linear optimization algorithm to estimate model parameters.
Observation Likelihoods
Fishery Catches
Fishery catches can be fit using a lognormal likelihood. The log-likelihood for region-aggregated observed catch, , is defined as:
Here, is the likelihood weight, is the observed catch, is the predicted catch summed over populations, and is the variance of catch on the log scale.
Population-specific catch observations can additionally be fit using the same lognormal form, comparing observed catch for a single population to the predicted catch for that population without summing across populations:
where is the predicted catch for population only.
Fishery Discards
Fishery discards are fit using the same lognormal likelihood form as catches. The log-likelihood for region-aggregated observed discards is:
where is the likelihood weight, is the observed discard, is the predicted discard summed over populations, and is the variance of discards on the log scale. Population-specific discard observations follow the same lognormal form with for population only.
Fishery and Survey Indices
Fishery indices can also be fit assuming a lognormal likelihood. The log-likelihood for region-aggregated observed fishery indices is:
where controls the weight of fishery indices to the objective function, represents the observed fishery indices, is the predicted fishery index summed across populations, and denotes the variance of the fishery index.
Population-specific fishery indices can additionally be fit, comparing observed population-specific indices to the predicted index for that population directly:
where is the predicted fishery index for population only.
Likewise, survey indices can be fit assuming a lognormal likelihood. The log-likelihood for region-aggregated survey indices is:
is the likelihood weight applied to survey indices, are the observed survey indices, is the predicted survey index summed across populations, and indicates the variance of the survey index.
Population-specific survey indices can additionally be fit, comparing observed population-specific indices to the predicted index for that population directly:
where is the predicted survey index for population only.
Fishery and Survey Compositions
Several options for fitting composition data are available in
SPoRC. These include the multinomial, the
Dirichlet-multinomial, and the logistic-normal likelihoods. In the case
of the multinomial likelihood, the following expression is used:
where subscript is used to indicate a fishery or survey fleet and the subscript generically indicates a bin number. are likelihood weights applied to composition data, is the input sample size, denotes the expected composition proportions, and are the observed composition proportions.
If a Dirichlet-multinomial likelihood is assumed, the following parameterization (linear) is used:
Here, is the overdispersion parameter of the Dirichlet-multinomial that adjusts the input sample size. The effective sample size ( can then be derived as:
A multivariate logistic-normal likelihood can also be assumed, which is given by:
Both and are dimensional vectors, while is a covariance matrix (see below for further details). and are derived via an additive logistic function:
where and are transformed proportions using the last bin as the reference category. Because the logarithm of zero is undefined, all untransformed proportions must be strictly positive. If any observed proportion is zero, both the observed and corresponding expected values are removed, and the remaining proportions are renormalized to ensure that they sum to one before applying the transformation. The covariance matrix of the logistic-normal likelihood can be specified in various ways. In the simplest case, the covariance matrix can be assumed to be independent and identically distributed (iid):
where is a identity matrix and is an estimated overdispersion parameter representing the variance. The simple iid case can be further extended to incorporate a one-dimensional lag-1 autoregressive structure:
Here, is a correlation matrix with a lag-1 autoregressive structure, where defines the correlation across bins. Lastly, if the model is specified to be sex-structured and sex-composition data are utilized, a two-dimensional autoregressive structure can be specified:
is a constant correlation matrix dimensioned by for sexes, with off-diagonal elements controlling the correlation of age/length categories across sexes, while is a lag-1 autoregressive correlation structure, where defines the correlation across age/length categories. denotes the Kronecker product.
All three composition likelihood forms (multinomial, Dirichlet-multinomial, logistic-normal) can be applied to retained fishery, discarded fishery, and survey composition data, as well as to both region-aggregated and population-specific variants. For region-aggregated compositions, expected values are derived from catch-at-age or survey index-at-age quantities summed across populations (). For population-specific compositions, expected values are derived from the quantities for a single population directly. For discard compositions, expected values are derived from discarded catch-at-age () or discarded catch-at-length quantities analogously. Each likelihood form and covariance structure described above applies identically across all composition data types; population-specific likelihoods additionally carry separate overdispersion () and correlation parameters () estimated independently from their region-aggregated counterparts.
Structuring Compositions and Ageing Error
Related to the use of composition data likelihoods, composition data can be structured differently depending on model assumptions and data constraints. In particular, three options are available to fit to composition data:
‘Aggregated’ compositions across regions and sexes,
‘Split’ compositions for each region and sex (i.e., no implicit information about sex-ratios), and
‘Joint’ compositions across sexes (i.e., implicit information is provided about sex-ratios).
The expected compositions (i.e., catch-at-age, catch-at-length, survey catch-at-age, survey catch-at-length) when specified as ‘aggregated’ are derived with the following:
where compositions are summed across regions and sexes and normalized to sum to one. Ageing error () can then be applied using standard matrix multiplication. Expected compositions that are specified as ‘Split’ by sexes and regions are computed as:
Here, expected compositions sum to one within a given region and sex combination and ageing error is similarly applied via matrix multiplication. In the case where expected compositions are specified as ‘Joint’, they are calculated as:
where the expected compositions sum to one jointly across bins and sexes, thus preserving implicit sex-ratio information. Ageing error is then applied by taking the Kronecker product of a identity matrix with the ageing error matrix, followed by matrix multiplication. These three structuring options apply identically to retained fishery, discarded fishery, and survey composition likelihoods, as well as to both region-aggregated and population-specific variants.
Tagging
SPoRC currently allows for various tagging likelihoods,
ranging from the Poisson, Negative Binomial, multinomial, and
Dirichlet-multinomial likelihood. Additionally, SPoRC also
allows for both release- and recapture-conditioned dynamics (McGarvey
and Feenstra, 2002). The Poisson tag likelihood is given by:
where are the observed tag recaptures and is the likelihood weight applied to tagging data. In the case where the Negative Binomial is invoked, the following expression is used:
Here, represents the estimated overdispersion parameter for tagging data.
Under release conditioned dynamics, both recaptured and non-recaptured states are fit to. Proportions of observed () and expected recaptured ( individuals are given by:
denotes the total tags released for a given tag cohort (combination of release region, year, and season). Non-recaptured states can then be written as:
where and are the observed and expected non-recaptured states, respectively. These states are then combined into a single vector of observed and expected values:
If a Multinomial likelihood is assumed for release conditioned dynamics, this is given by:
Here, the subscript is used to generically denote a given element. If a Dirichlet-multinomial with released-condition dynamics was assumed, the tagging likelihood would be written as:
The parameter in the Dirichlet-multinomial likelihood represents the overdispersion parameter for tagging data.
Under recapture-conditioned dynamics, tag shedding, tag induced mortality, and tag reporting rates are assumed to be spatially-invariant and do not need to be estimated, given that these terms cancel out in the denominator (McGarvey and Feenstra, 2002). Unlike release-conditioned dynamics, assuming recaptured-conditioned processes does not require fitting to non-recaptured states. Thus, the observed and expected recaptured proportions can be written as:
where recapture probabilities are normalized by the total number of recaptures across populations, regions, ages, and sexes in a given year and season.
Parameter Priors and Process Error Penalties
Parameter Priors
Considering the complexity of integrated population models, several priors can be specified to help inform the estimation of parameters by providing additional knowledge. Priors can currently be specified for natural mortality, fishery and survey catchability, fishery and survey selectivity, steepness, recruitment population scale () and proportions, stray rates, movement rates, and tag reporting rates.
Natural Mortality
In the case of natural mortality, a lognormal prior is utilized:
where the variance of the prior is given by , and denotes the prior mean.
Fishery and Survey Catchability
For fishery and survey catchability, a lognormal prior can also be specified:
where here represents either a fishery or survey fleet, is the variance of the prior, and indicates the prior mean for catchability.
Fishery and Survey Selectivity
In general, selectivity priors can be utilized to serve as regularizing priors to facilitate stable parameter estimation (Monnahan, 2024). These priors are assumed to be lognormal and are applied to the selectivity parameters themselves:
where is a selectivity parameter for a given functional form specified, is the prior variance, and is the prior mean for the specific selectivity parameter.
Steepness
If a Beverton-Holt stock recruitment relationship is assumed, priors for steepness can be specified. Currently, a scaled beta prior (bounded between 0.2 and 1) can be invoked:
Here, and are parameters of the beta distribution, is the prior mean steepness for a given population and region (bounded between 0.2 and 1) while is the standard deviation for these priors.
Recruitment Proportions
Regional recruitment is derived by apportioning a global recruitment parameter using regional recruitment proportions for each population (i.e., ). Here, is derived via a multinomial logit transformation and Dirichlet priors can be used to help constrain estimation:
are the estimated recruitment proportions across regions for population , and is the concentration parameter governing the spread of the Dirichlet distribution. Similarly, seasonal recruitment proportions can be constrained with Dirichlet priors when estimated. When and , is instead parameterized via a multinomial logit restricted to seasons (seasons before are fixed at exactly zero rather than estimated, per the timing constraint described under Age-0 Recruitment above), and any Dirichlet prior is evaluated only over that same restricted support.
R0
A lognormal prior can be placed on for any population:
where is the prior mean on the natural scale and is the standard deviation on the log scale.
Stray Rates
When stray rates are estimated
(
and use_fixed_stray_rate = 0), a standard beta prior can be
applied to regularize estimation. The prior is parameterized via
method-of-moments in terms of a mean and standard deviation:
where is the concentration parameter. The stray rate is numerically stabilized by squishing the logistic transform away from the boundaries:
where is the logit-scale parameter and is a small constant (e.g. ) ensuring . The prior is then:
where is the literal standard deviation of the Beta distribution and must satisfy to ensure . Because stray rates are generally not identifiable from fisheries data alone, this prior serves primarily as a regularizing constraint rather than an informative prior, and tight values of are recommended. Note that when is large relative to , and approach zero and the Beta density becomes U-shaped, placing mass near 0 and 1. In this regime numerical instability can occur during optimization, which is why is squished away from the boundaries via the transformation.
Movement
Likewise, priors on movement values can be assumed to arise from a Dirichlet process:
where is the origin region, is the destination, and are the concentration parameters that control the Dirichlet distribution.
Tag Reporting Rates
Two types of priors can be specified for tag reporting rates. In particular, a symmetric beta distribution is applied:
Here, determines the scale of the tag reporting parameter and determines how strongly to penalize estimates when they approach the bounds of . Smaller values of result in larger penalties, and vice versa.
Tag reporting rate priors can also be specified as a standard beta distribution, parameterized via method-of-moments in terms of a mean and standard deviation:
where is the numerically stabilized reporting rate with the logit-scale parameter and a small constant (e.g. ). Here is the literal standard deviation of the Beta distribution and must satisfy to ensure . Note that when is large relative to , and approach zero and the Beta density becomes U-shaped, placing mass near 0 and 1. In this case, numerical instability can occur during optimization, which is why is squished away from the boundaries via the transformation.
Process Error Penalties
In addition to priors, penalties are also utilized to aid in the estimation of process errors (either penalized likelihood or integrating random effects via Laplace Approximation are possible). Currently, process errors can be specified to arise for initial age deviations, recruitment, fishing mortality, discard mortality rate, fishery and survey selectivity, and movement.
Initial Age Deviations
To estimate non-equilibrium initial age deviations, multiplicative deviations can be specified:
where deviations arise from a normal distribution with a mean of 0 and variance of .
Recruitment Deviations
Annual recruitment deviations can also be specified, where multiplicative deviations are assumed:
and deviations are assumed to be normally distributed, with a mean of 0 and variance of .
Fishing Mortality Deviations
Fishing mortality deviations assume multiplicative deviations about a
mean rate. One of three process error structures can be specified via
Fdev_model: independent ("iid"), random walk
("rw"), or first-order autoregressive ("ar1").
In all three cases, the penalty is only evaluated in region
,
season
,
and fleet
combinations with observed catch (i.e.,
or any
).
IID
Fishing mortality deviations are assumed to arise from a normal distribution, with mean 0 and a variance of .
Random Walk
Catch-active years need not be contiguous under the random walk (a fishery may close for several years and reopen later). Let denote the previous catch-active year for a given region, season, and fleet, and the number of elapsed years between them ( when catch is available every year). The first catch-active year is initialized with a large, diffuse variance; every subsequent catch-active year follows a random walk about the previous active year’s value, with variance inflated by the elapsed gap :
When catch is available every year ( throughout), this reduces exactly to a standard single-step random walk. When years are closed (e.g., a fishery closure), inflating the variance by gives exactly the same marginal distribution that would be obtained by estimating deviations for the closed years and integrating them out without actually estimating them, so no deviation parameters exist for closed years.
AR1
The AR1 form additionally estimates a correlation parameter,
(from an unconstrained parameter Fdev_rho, transformed via
).
As with the random walk, catch-active years need not be contiguous. The
first catch-active year is drawn from the process’s stationary marginal
distribution, and every subsequent catch-active year follows an AR1
transition over the elapsed gap
since the previous active year:
where is the exact variance of the sum of the intervening (unestimated) innovations that would have occurred during the closed years, and is the corresponding decay of the mean across the same gap. As with the random walk, this reduces exactly to the standard single-step AR1 transition when .
Discard Mortality Rate Deviations
Discard mortality rate deviations are penalized analogously on the logit scale:
where is the variance of the discard mortality rate deviations. The penalty is only applied in years and fleets where discard data are available.
Fishery and Survey Selectivity
A variety of process error parameterizations can be specified for fishery and survey selectivity. Across all parameterizations, multiplicative deviations are assumed. In the most basic case, iid deviations can be assumed to vary about a parameter on a given selectivity functional form:
where are selectivity deviations about a given parameter for region , year , parameter , sex , and fleet . Deviations are assumed to have a mean of 0 and a variance of , constrained by a normal distribution.
Extending the iid case, random walk selectivity deviations can also be specified about a given parameter, assuming a normal distribution:
where process error deviations for the first year are initialized with a large variance. Following the first year, process error deviations follow a random walk process with a mean conditional on the previous year’s value () and a variance of .
In addition to being constrained by a normal distribution, both iid and random walk cases have an optional additional smoothness penalty applied:
Additionally, semi-parametric deviations can also be specified. In total, there are three options that can be utilized, two of which allow age, year, and cohort correlations, while one allows for only age or length and year correlations. In the case where age, year, and cohort correlations are specified (note that this is only possible when age-based selectivity is specified), marginal stationary variance and a conditional non-stationary variance can be invoked. The following equations describe the conditional variance version:
where we vectorize the selectivity deviations across its year and age dimensions. These deviations are then assumed to arise from a multivariate normal distribution (or Gaussian Markov Random Field) with a covariance matrix () determined by:
Here, is an identity matrix and is a diagonal matrix that determines the variance of the multivariate normal process. is a square matrix representing the partial effect of on preceding ages and/or years, governed by partial correlation coefficients for ages, years, and cohorts. To demonstrate the formulation of , a simplified example is provided with rows representing ages and columns representing years . In this example, is a matrix, where both the rows and columns represent combinations of age and year:
where , , and are parameters describing the partial autocorrelation among years within a given age, among ages within a given year, and years within a cohort, respectively. The multivariate likelihood is then defined as:
If age or length and year correlations are specified (i.e., a two-dimensional autoregressive structure), a multivariate normal likelihood is similarly assumed, but the covariance structure of this process is defined as:
where and are correlation coefficients across years and bins, respectively. Moreover, when semi-parametric deviations are specified, additional optional penalties can be applied across bins and years to enforce curvature control:
Selectivity Smoothness Penalties
A set of six penalty terms, evaluated directly on a fleet’s realized selectivity-at-bin-at-year surface rather than on any particular selectivity parameterization, can be independently weighted and applied to any selectivity functional form.
The dome-shape penalty discourages the selectivity curve from decreasing across adjacent bins within a year (i.e., encourages flat-topped or asymptotic rather than dome-shaped curves, when desired), applied only where an actual decrease occurs:
The bin (age or length) curvature penalty is a second-difference smoothness penalty across bins, normalized by the number of fitted bins :
A related, unconditional first-difference penalty across bins where both increases and decreases contribute, unlike the dome-shape penalty above which is normalized the same way:
Inter-annual variation is penalized with a first-difference penalty across years, normalized by the number of fitted years :
and inter-annual smoothness with an analogous second-difference penalty across years:
Finally, because some selectivity forms (e.g. the bicubic spline) have no built-in scale identifiability constraint (a uniform per-year shift in log-selectivity trades off exactly against that year’s fishing mortality), a mean-centering penalty regularizes the per-year mean of log-selectivity toward zero:
Each of the six terms above
(,
,
,
,
,
)
is scaled by its own independently-specified weight before being added
to the joint negative log-likelihood, allowing each to be turned on or
off and tuned separately. In code, these six weights use a
smooth_ prefix (e.g. smooth_bin_curve,
smooth_yr_diff) rather than referencing the bicubic spline
specifically, since, as described above, they apply to any selectivity
form.
Movement
Time-varying movement is introduced through process error deviations, , which modify baseline movement parameters. The interpretation of these deviations depends on the movement formulation, but their stochastic structure is shared.
General Structure
Movement deviations are assumed to be independent and normally distributed:
where may be shared across dimensions depending on the selected process error model.
Only valid origin–destination pairs (i.e., adjacent regions) are assigned deviations.
Unstructured Markov Movement
For multinomial logit movement, deviations enter additively in logit space:
Thus, time variation is expressed as year-specific perturbations around a mean logit, and movement probabilities are obtained via the softmax transform.
CTMC Movement
For CTMC movement, deviations act on the transition rates rather than logits. Specifically, deviations are applied multiplicatively to the off-diagonal diffusion terms:
where: - is the baseline diffusion rate (constructed from covariates and parameters, with year lookups capped at ), - is the deviation applied on the log scale.
This formulation implies that: - deviations are log-multiplicative on movement rates, - acts as a proportional scaling factor, - time variation persists into projection years even when baseline covariates are held fixed.
Importantly, deviations are applied only to off-diagonal elements (i.e., actual transitions), and the diagonal of the generator matrix is recomputed to preserve mass balance.
Likelihood for Deviations
The movement process error contribution to the log-likelihood can be written explicitly as:
where the summation is taken over all valid origin–destination pairs (i.e., and adjacency), and over all indices of population (), year (), season (), age (), and sex ().
Variance Structures
Different process error models specify how is shared across dimensions. These correspond to IID assumptions over subsets of:
- population (),
- year (),
- season (),
- age (),
- sex ().
For example: - IID across years: , - IID across years and ages: , - Fully stratified: .
These structures control the degree of temporal and demographic heterogeneity in movement variability.
References
Kristensen, K., Nielsen, A., Berg, C.W., Skaug, H., Bell, B., 2016. TMB: Automatic Differentiation and Laplace Approximation. J. Stat. Soft. 70. https://doi.org/10.18637/jss.v070.i05
Mace, P.M., Doonan, I.J., 1988. A Generalised Bioeconomic Simulation Model for Fish Population Dynamics. MAFFish, N.Z. Ministry of Agriculture and Fisheries.
McGarvey, R., Feenstra, J.E., 2002. Estimating rates of fish movement from tag recoveries: conditioning by recapture. Can. J. Fish. Aquat. Sci. 59, 1054–1064. https://doi.org/10.1139/f02-080
Methot, R.D., Taylor, I.G., 2011. Adjusting for bias due to variability of estimated recruitments in fishery assessment models. Can. J. Fish. Aquat. Sci. 68, 1744–1760. https://doi.org/10.1139/f2011-092
Monnahan, C.C., 2024. Toward good practices for Bayesian data-rich fisheries stock assessments using a modern statistical workflow. Fisheries Research 275, 107024. https://doi.org/10.1016/j.fishres.2024.107024
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. https://doi.org/10.1016/j.fishres.2016.06.005