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. Generate a markdown report with report_CM().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.
- verbose
Logical, whether to report messages to console.
- silent
Logical, whether to silence output from RTMB to the console.
- control
List,
controlargument 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 (lowerandupper)sample_CM()returns astanfitobject containing the MCMC chains
Data
Data should passed through a named list with the following entries.
NagesInteger, number of age classes in the modelLdyrInteger, number of years in the modellhtInteger, life history type. Should be 1 for nown_rInteger, number of release strategies for CWT, subset of a hatchery-origin brood year that differ in maturity rate. Default is 1.cwtreleaseMatrix[Ldyr, n_r], coded wire tag (CWT) releases by release year and release strategy (assumes broodyear is release year minus 1)cwtescArray[Ldyr, Nages, n_r]. CWT escapement by release year, age, and release strategy (assumes broodyear is release year minus 1). Poisson likelihood.cwtcatPTArray[Ldyr, Nages, n_r]. CWT preterminal catch (juvenile fish), by release year, age, and release strategy. Poisson likelihood. Set all values to zero to turn off parameters related to the preterminal fishery.cwtcatTArray[Ldyr, Nages, n_r]. CWT terminal catch (returning, mature fish), by release year, age, and release strategy. Poisson likelihood. Set all values to zero to turn off parameters related to the terminal fishery.bvulPTVector lengthNages. Prior mean for the vulnerability at age to the preterminal fishery.bvulTVector lengthNages. Prior mean for the vulnerability at age to the terminal fishery.RelRegFPTVectorLdyr. Trend in relative regional preterminal fishing mortality. Fishing mortality is estimated by estimating a scaling coefficient and annual deviations from this vector. Default isrep(1, d$Ldyr)(no prior trend) ifcwtcatPTis provided, otherwise zero.RelRegFTVectorLdyr. Trend in relative regional terminal fishing mortality. Default isrep(1, d$Ldyr)(no prior trend) ifcwtcatTis provided, otherwise zero.bmattVector lengthNages. Proportion maturing at age, base values for converting between spawners and egg production at replacement for the stock-recruit relationship. Also the prior means if year-specific maturity rates are estimated. If estimating maturity, you likely want to tune these values to be close to historical values for reference points.mobase. Vector lengthNages. Natural mortality at age, base values for converting between spawners and egg production at replacement for the stock-recruit relationship and the the spawners at age at replacement. If estimating natural mortality, you likely want to tune these values to be close to historical values for reference points.covariate1Optional. Matrix[Ldyr, ncov1]of linear covariates that predict natural mortality for age 1.covariateOptional. Matrix[Ldyr, ncov]of linear covariates that predict natural mortality for ages 2+.hatchsurvNumeric, survival of hatchery-origin juveniles after release but prior to entering the marine environment. Density-independent. Default is 1. If less than 1, then hatchery-origin fish have lower survival to age 2 (first year of marine life stage) compared to natural-origin fish.gammaOptional. Numeric, the relative spawning success of hatchery origin spawners. Default is 1.ssumNumeric, proportion of spawners that is female. Can also be a vectorNagesfecVector lengthNages. Fecundity, egg production at ager_mattIndexing integer, the release strategy for which to use maturity parameter for the natural system. Default is 1.obsescapeVector lengthLdyrby return year, total observed escapement from fisheries, i.e., return to river (all ages and both hatchery/natural fish). Lognormal likelhood.propwildspawnVector lengthLdyrby return year, proportion of the escapement that spawn (accounts for en-route mortality and broodtake)hatchreleaseVector lengthLdyr+1by release year, number of hatchery releases for the population. Default is zero.obs_pHOSOptional. Vector lengthLdyrby return year, observations of proportion of hatchery origin spawners (census) (between 0-1) by brood year. Fitted to model with logistic-normal likelihood.pHOS_sdNumeric, logistic-normal standard deviation of pHOS observations. Default is 1.pHOS_initNumeric, initial pHOS for equilibrium juvenile abundance in the first year of the model. Default is 0.s_enrouteNumeric, survival of escapement (from marine fisheries) to spawning grounds for the main population. Default is 1.s_enroute_CWTNumeric, survival of CWT to hatchery after marine exploitation. Default iss_enroute.so_muNumeric, the prior mean for spawners at replacement in logspace, akaSrep. Default islog(3 * max(data$obsescape)). Not used ifsmax_muis provided.so_sdNumeric, the lognormal prior standard deviation for spawners at replacement. Default is 0.5. Not used ifsmax_sdis provided.smax_muOptional Numeric, the prior mean for spawners that maximizes recruitment in logspace. Choose betweenso_muorsmax_mu. Leave asNULLif usingso_musmax_sdOptional Numeric, the lognormal prior standard deviation for spawners that maximizes recruitment. Choose betweenso_sdorsmax_sd. Leave asNULLif usingso_sdcr_muOptional Numeric, the prior mean for productivity (recruits per spawners) in logspace. IfNULL, a uniform prior is used.cr_sdOptional Numeric, the lognormal prior standard deviation for productivity. IfNULL, a uniform prior is used.finitPTNumeric, initial preterminal fishing mortality for calculating the equilibrium juvenile proportions at age in the first year of the model. Default is 0. Set to"estimate"to allow the model to estimate the equilibrium condition.finitTNumeric, initial terminal fishing mortality for calculating the equilibrium juvenile proportions at age in the first year of the model. Default is 0. Set to"estimate"to allow the model to estimate the equilibrium condition.spawn_initNumeric, initial spawners to calculate equilibrium abundance in the first year of the model. Default isobsescape[1].cwtExpNumeric, the CWT expansion factor. Default is 1, which assumes CWT catches have already been expanded.. Typically greater than 1, i.e., the reciprocal of the catch sampling rate (higher factors for lower sampling rate). For example,cwtExp = 10divides the CWT predictions by 10 for the likelihood of the data. The Poisson distribution is used for the likelihood of the CWT observations, and the expansion parameter can be used to downweight the CWT likelihood relative to the escapement time series. However it requires adjustments of the CWT catches prior to fitting to ensure the proper population scale. If the expanded catch is 100, then the input CWT catch should be 10 and 50 withcwtExpof 10 and 2, respectively, to maintain the same population scale. The Poisson variance scales with the mean and is higher withcwtExp = 2.fitnessLogical, whether to calculate fitness effects on survival. Default isFALSE.thetaVector 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_lossVector 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_startVector 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_varianceNumeric. The variance (omega-squared) of the fitness function. Assumed identical between the natural and hatchery environments. Default is 100.phenotype_varianceNumeric. The variance (sigma-squared) of the phenotypic trait (with optimum theta). Assumed identical between the natural and hatchery environments. Default is 10.heritabilityNumeric. The heritability (h-squared) of the phenotypic trait. Between 0-1. Default is 0.5.fitness_floorNumeric. 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_crNumeric, log of the compensation ratio (productivity). Default is 3.log_soNumeric, log of spawners at replacement. Default islog(3 * max(data$obsescape)). Only used if there is no prior on log_smaxlog_smaxNumeric, log of spawners at maximum recruitment. Default islog(mean(data$obsescape)). Only used if there is a prior on log_smaxmoaddNumeric, additive term to base natural mortality rate for age 1 juveniles. Default is zero.wtVectorLdyr. 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.wtoVectorLdyr. 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_FbasePTNumeric, scaling coefficient to estimate preterminal fishing mortality fromdata$RelRegFPT. Default islog(0.1).log_FbaseTNumeric, scaling coefficient to estimate preterminal fishing mortality fromdata$RelRegFT. Default islog(0.1).log_fanomalyPTVectorLdyr. Annual lognormal deviates fromexp(log_FbasePT) * data$RelRegFPTto estimate preterminal fishing mortality. Estimated with normal prior with mean zero and standard deviationp$fanomaly_sd. Default is zero.log_fanomalyTVectorLdyr. Annual lognormal deviates fromexp(log_FbaseT) * data$RelRegFTto estimate terminal fishing mortality. Estimated with normal prior with mean zero and standard deviationp$fanomalyPT_sd. Default is zero.lnE_sdNumeric, lognormal standard deviation of the observed escapement. Estimated with hierarchicalgamma(2, 5)prior. Default is 0.1.wt_sdNumeric, lognormal standard deviation of the egg to smolt (freshwater) natural mortality deviates. Estimated with hierarchicalgamma(2, 5)prior. Default is 1.wto_sdNumeric, lognormal standard deviation of the age 1 (marine) natural mortality deviates. Estimated with hierarchicalgamma(2, 5)prior. Default is 1.fanomalyPT_sdNumeric, lognormal standard deviation offanomalyPT. Estimated with hierarchicalgamma(2, 5)prior. Default is 1.fanomalyT_sdNumeric, lognormal standard deviation offanomalyT. Estimated with hierarchicalgamma(2, 5)prior. Default is 1.logit_vulPTVectorNages-2of 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_vulTVectorNages-2of 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_mattMatrixLdyr, Nages-2maturity 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_mattVectorNages-2. Logit standard deviation of maturity (logit_matt) by age class. Default is 0.5.b1Vectorncov1of coefficients for linear covariates that predict natural mortality for age 1. Default is zero.bVectorncovof 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.