Bayesian stock reconstruction model of natural and hatchery origin fish population.
Maturity and age-1 natural mortality are estimated from coded wire tag catch and escapement at age.
A separate series of observed escapement, and hatchery releases reconstructs the population of interest,
informed by natural mortality and maturity from CWT (Korman and Walters 2024).
The model estimates time-varying maturity rate as well as time-varying ocean survival as a linear model of covariates (separate covariates
for age 1 vs. ages 2+).
The model can include either a preterminal juvenile fishery, terminal return fishery, or both (see Data and start sections of the documentation).fit_CM()
generates the RTMB model from data which can then be passed to sample_CM()
to run the MCMC in Stan.More information is available on the salmonMSE website
Arguments
- data
A list containing data inputs. See details.
- start
An optional list containing parameter starting values. See details.
- map
An optional list that describes how parameters are fixed in the model. See
TMB::MakeADFun()
.- lower
Named list containing lower bounds for parameters. See details.
- upper
Named list containing upper bounds for parameters. See details.
- do_fit
Logical, whether to do the fit and estimate the Hessian.
- silent
Logical, whether to silence output from RTMB to the console.
- control
List,
control
argument to pass tostats::nlminb()
.- ...
For
fit_CM
, arguments toRTMB::MakeADFun()
. Forsample_CM
, arguments torstan::sampling()
- fit
List of output from
fit_CM()
Value
fit_CM()
returns a named list containing the RTMB model (obj
), nlminb output (opt
), standard errors (SD
), and parameter bounds (lower
andupper
)sample_CM()
returns astanfit
object containing the MCMC chains
Data
Data should passed through a named list with the following entries.
Nages
Integer, number of age classes in the modelLdyr
Integer, number of years in the modellht
Integer, life history type. Should be 1 for nown_r
Integer, number of release strategies for CWT, subset of a hatchery-origin brood year that differ in maturity rate. Default is 1.cwtrelease
Matrix[Ldyr, n_r]
, coded wire tag (CWT) releases by year and release strategycwtesc
Array[Ldyr, Nages, n_r]
. CWT escapement by brood year, age, and release strategy. Poisson likelhood.cwtcatPT
Array[Ldyr, Nages, n_r]
. CWT preterminal catch (juvenile fish), by brood year, age, and release strategy. Poisson likelhood. Set all values to zero to turn off parameters related to the preterminal fishery.cwtcatT
Array[Ldyr, Nages, n_r]
. CWT terminal catch (returning, mature fish), by brood year, age, and release strategy. Poisson likelhood. Set all values to zero to turn off parameters related to the terminal fishery.bvulPT
Vector lengthNages
. Prior mean for the vulnerability at age to the preterminal fishery.bvulT
Vector lengthNages
. Prior mean for the vulnerability at age to the terminal fishery.RelRegFPT
VectorLdyr
. Trend in relative regional preterminal fishing mortality. Fishing mortality is estimated by estimating a scaling coefficient and annual deviations from this vector.RelRegFT
VectorLdyr
. Trend in relative regional terminal fishing mortality.bmatt
Vector lengthNages
. Proportion maturity at age, base values for calculating the unfished replacement line. Also the prior means if year-specific maturity rates are estimated.mobase
. Vector lengthNages
. Natural mortality at age, base values for calculating the unfished replacement line and the the equilibrium spawners at age.covariate1
Optional. MatrixLdyr, ncov1
of linear covariates that predict natural mortality for age 1.covariate
Optional. MatrixLdyr, ncov
of linear covariates that predict natural mortality for ages 2+.hatchsurv
Numeric, survival of hatchery releases into the smolt life stage. Density-independent.gamma
Optional. Numeric, the relative spawning success of hatchery origin spawners. Default is 1.ssum
Numeric, proportion of spawners that is femalefec
Vector lengthNages
. Fecundity, egg production at ager_matt
Integer, the release strategy for which to use maturity parameter for the natural system. Default is 1.obsescape
Vector lengthLdyr
, total observed escapement (all ages and both hatchery/natural fish). Lognormal likelhood.propwildspawn
Vector lengthLdyr
, proportion of the escapement that spawn (accounts for en-route mortality and broodtake)hatchrelease
Vector lengthLdyr+1
, number of hatchery juvenile fish releaseds_enroute
Numeric, survival of escapement to spawning grounds. Default is 1.so_mu
Numeric, the prior mean for unfished spawners in logspace. Default islog(3 * max(data$obsescape))
.so_sd
Numeric, the prior standard deviation for unfished spawners in logspace. Default is 0.5.finitPT
Numeric, initial preterminal fishing mortality for calculating the equilibrium spawners at age in the first year of the model. Default is 0.finitT
Numeric, initial terminal fishing mortality for calculating the equilibrium spawners at age in the first year of the model. Default is 0.cwtExp
Numeric, the CWT sampling rate. This coefficient scales down the CWT predictions to match the observations. For example,cwtExp = 0.1
reduces the CWT predictions by 0.1 for the likelihood. Default is 1. The Poisson distribution is used for the likelihood of the CWT observations, and this parameter can be used to downweight the CWT likelihood relative to the escapement time series.fitness
Logical, whether to calculate fitness effects on survival. Default isFALSE
.theta
Vector length 2, the optimum phenotype value for the natural and hatchery environments. Default is 100 and 80, respectively. See online article for more information.rel_loss
Vector length 3, the loss in fitness apportioned between the egg, fry (both prior to density-dependence), and smolt (after density-dependence) life stage. The three values should sum to 1.zbar_start
Vector length 2, the mean phenotype of the spawners and broodtake in the natural and hatchery environment, respectively, at the start of the model. Default values of 100 and 100, implying maximum fitness at for the natural environment at the start of the model.fitness_variance
Numeric. The variance (omega-squared) of the fitness function. Assumed identical between the natural and hatchery environments. Default is 100.phenotype_variance
Numeric. The variance (sigma-squared) of the phenotypic trait (with optimum theta). Assumed identical between the natural and hatchery environments. Default is 10.heritability
Numeric. The heritability (h-squared) of the phenotypic trait. Between 0-1. Default is 0.5.fitness_floor
Numeric. The minimum fitness value in the natural and hatchery environments. Default is 0.5.
start
Starting values for parameters can be provided through a named list:
log_cr
Numeric, log of the compensation ratio (productivity). Default is 3.log_so
Numeric, unfished spawners in logspace. Default islog(3 * max(data$obsescape))
.moadd
Numeric, additive term to base natural mortality rate for age 1 juveniles. Default is zero.wt
VectorLdyr
. Annual deviates in natural mortality during the freshwater life stage (affects egg to smolt survival). Estimated with normal prior with mean zero and standard deviationp$wt_sd
. Default is zero.wto
VectorLdyr
. Annual deviates in natural mortality for age 1 juveniles (marine life stage). Estimated with normal prior with mean zero and standard deviationp$wto_sd
. Default is zero.log_FbasePT
Numeric, scaling coefficient to estimate preterminal fishing mortality fromdata$RelRegFPT
. Default islog(0.1)
.log_FbaseT
Numeric, scaling coefficient to estimate preterminal fishing mortality fromdata$RelRegFT
. Default islog(0.1)
.log_fanomalyPT
VectorLdyr
. Annual lognormal deviates fromexp(log_FbasePT) * data$RelRegFPT
to estimate preterminal fishing mortality. Estimated with normal prior with mean zero and standard deviationp$fanomaly_sd
. Default is zero.log_fanomalyT
VectorLdyr
. Annual lognormal deviates fromexp(log_FbaseT) * data$RelRegFT
to estimate terminal fishing mortality. Estimated with normal prior with mean zero and standard deviationp$fanomalyPT_sd
. Default is zero.lnE_sd
Numeric, lognormal standard deviation of the observed escapement. Estimated with hierarchicalgamma(2, 5)
prior. Default is 0.1.wt_sd
Numeric, lognormal standard deviation of the egg to smolt (freshwater) natural mortality deviates. Estimated with hierarchicalgamma(2, 5)
prior. Default is 1.wto_sd
Numeric, lognormal standard deviation of the age 1 (marine) natural mortality deviates. Estimated with hierarchicalgamma(2, 5)
prior. Default is 1.fanomalyPT_sd
Numeric, lognormal standard deviation offanomalyPT
. Estimated with hierarchicalgamma(2, 5)
prior. Default is 1.fanomalyT_sd
Numeric, lognormal standard deviation offanomalyT
. Estimated with hierarchicalgamma(2, 5)
prior. Default is 1.logit_vulPT
VectorNages-2
of preterminal vulnerability at age in logit space. Fixed to zero and one at age 1 and the maximum age, respectively. Default isqlogis(data$bvul_PT[-c(1, data$Nages)])
.logit_vulT
VectorNages-2
of terminal vulnerability at age in logit space. Fixed to zero and one at age 1 and the maximum age, respectively. Default isqlogis(data$bvul_T[-c(1, data$Nages)])
.logit_matt
MatrixLdyr, Nages-2
maturity by year and age in logit space. Maturity is fixed to zero and one at age 1 and the maximum age, respectively. Default ismatrix(qlogis(data$bmatt[-c(1, data$Nages)]), data$Ldyr, data$Nages-2, byrow = TRUE)
.sd_matt
VectorNages-2
. Logit standard deviation of maturity (logit_matt
) by age class. Default is 0.5.b1
Vectorncov1
of coefficients for linear covariates that predict natural mortality for age 1. Default is zero.b
Vectorncov
of coefficients for linear covariates that predict natural mortality for ages 2+. Default is zero.
Bounds
By default, the standard deviation parameters and parameters in normal space (e.g., FbasePT
, Fbase_T
) have a lower bound of zero.
moadd
has a lower bound of zero by default, but it is feasible that this parameter can be negative as well.
Deviation parameters centred around zero are bounded between -3 to 3.
The log_cr
parameter has a lower bound of zero.
All other parameters are unbounded.
Covariates on natural mortality
Natural mortality is modeled as the sum of a base value \(M^\textrm{base}\), additional scaling factor for age 1 \(M^\textrm{add}\), a linear system of covariates \(X\) and coefficients \(b\):
$$ M_{y,a} = \begin{cases} M^\textrm{base}_a + M^\textrm{add} + \sum_j b^1_j X^1_{y,j} & \quad a = 1\\ M^\textrm{base}_a + \sum_j b_j X_{y,j} & \quad a = 2, \ldots, A \end{cases} $$
References
Korman, J. and Walters, C. 2024. A life cycle model for Chinook salmon population dynamics. Canadian Contractor Report of Hydrography and Ocean Sciences 62: vi + 60 p.