Setup Estimation Model Argument Reference
ta_option_reference.RmdEvery argument the eleven Setup_Mod_* stages accept,
with its default and its own documentation. Read this one to find out
what a setting is. Read Overview of Model
Options to find out why it exists and which to specify.
Setup_Mod_Dim
15 arguments
| Argument | Default | Description |
|---|---|---|
years
|
required | Numeric vector of calendar years included in the model (e.g., 1990:2024). The length of this vector determines n_years throughout the model. |
ages
|
required | Numeric vector of modeled age classes (e.g., 2:31 for a model spanning ages 2-31). The final element is treated as a plus-group. |
lens
|
required | Numeric vector of length bin midpoints. Set to NULL when length data are not modeled; a scalar placeholder of 1 is stored internally in that case. |
n_pop
|
1
|
Positive integer. Number of distinct populations (default 1). Populations can have independent stock-recruit relationships and natal regions but share the spatial domain defined by n_regions. |
natal_region
|
NULL
|
Integer vector of length n_pop mapping each population to its natal region (1-indexed). Defaults are applied when NULL: n_regions == 1: all populations assigned to region 1. n_pop == n_regions: one-to-one mapping (1:n_pop). n_pop == 1: assigned to region 1. Must be supplied explicitly when n_pop > 1, n_pop != n_regions, and n_regions > 1, as no sensible default exists when populations must share a natal region. |
n_seas
|
1
|
Positive integer. Number of seasons within each year (default 1). |
seasdur
|
if (n_seas == 1) 1 else rep(1/n_seas, n_seas)
|
Numeric vector of length n_seas giving the duration of each season as a fraction of a year (values should sum to 1). Defaults to 1 for a single season or rep(1 / n_seas, n_seas) for equal-length seasons when n_seas > 1. |
n_regions
|
required | Positive integer. Number of spatial regions. |
n_sexes
|
required | Integer. Number of sexes; must be 1 (sex-aggregated) or 2 (sex-structured). |
n_fish_fleets
|
required | Positive integer. Number of fishery fleets. |
n_srv_fleets
|
required | Positive integer. Number of survey fleets. |
n_proj_yrs_devs
|
0
|
Non-negative integer. Number of projection years for which deviation parameters (ln_RecDevs, move_devs, ln_fishsel_devs, ln_srvsel_devs) are allocated. Set to 0 (default) when projections beyond the assessment period are not required. |
do_internal_comp_osa
|
FALSE
|
Logical. If TRUE, allows OSA residuals for composition datasets. Default FALSE. |
do_internal_conv_tag_osa
|
FALSE
|
Logical. If TRUE, allows OSA residuals for tagging datasets. Default FALSE. |
store_config
|
FALSE
|
Logical. If TRUE, stores configuration of the model. Default is FALSE |
Setup_Mod_Rec
65 arguments
| Argument | Default | Description |
|---|---|---|
rec_model |
required | Character string (required). Stock-recruit relationship: "mean_rec"Fixed mean recruitment; no stock-recruit relationship. Steepness is automatically fixed and not estimated. "bh_rec"Beverton-Holt stock-recruit relationship. "ricker_rec"Ricker stock-recruit relationship, in the depletion form R = R_0 (S/S_0) \exp(\alpha (1 - S/S_0)) with \alpha = \log(4h/(1-h)). Steepness is not interchangeable with "bh_rec"; see Get_Det_Recruitment. |
rec_dd |
"global" |
Density-dependence structure. Default "global". "local"Independent stock-recruit relationship per population. Required when n_pop > 1. "global"Single pooled spawner-recruit relationship across all regions. Constrains h_spec, RecDevs_spec, and InitDevs_spec to shared or fixed options when n_regions > 1. |
rec_lag
|
1
|
Integer. Lag between spawning biomass and recruitment (in seasons). 1 (default) is the classic lagged case: recruitment uses SSB from rec_lag seasons prior and may enter in any season. 0 is age-0 recruitment: recruitment uses the SAME year’s SSB, and because that SSB isn’t known until spawn_seas is reached, recruits may only enter in spawn_seas itself or a later season, when use_fixed_rec_seas_prop = 1, fixed_rec_seas_prop must be zero before spawn_seas; when estimated, this is enforced structurally via a restricted softmax (see do_rec_seas_prop_mapping). |
SR_ref_yr
|
1
|
Integer year index supplying every input to unfished spawning biomass per recruit, and so to S0 and the scale of the stock-recruit curve. Matches the estimation model’s SR_ref_yr. Default 1. |
Use_h_prior |
0 |
Integer (0/1). Whether normal priors on steepness are applied. Only relevant when a stock-recruit curve is used (rec_model = "bh_rec" or "ricker_rec"). Default 0. |
h_prior
|
NULL
|
Data frame of steepness prior parameters. Required columns: pop, region, mu, sd. Ignored when Use_h_prior = 0. Default NULL. |
rec_region_prop_spec |
NULL |
Character or NULL. Regional recruitment dispersal structure. Default NULL (estimate all proportions freely). See do_rec_region_prop_mapping for full option descriptions including "no_dispersal". Stored as $data$rec_region_prop_spec: 0 = full dispersal, 1 = no dispersal. |
use_rec_region_prop_prior
|
0
|
Integer (0/1). Whether Dirichlet priors are applied to regional recruitment proportions. Not valid when n_regions = 1. Default 0. |
rec_region_prop_prior
|
NULL
|
Data frame of Dirichlet prior concentration parameters. Required columns: pop and alpha, where alpha is a list-column of length-n_regions vectors. Ignored when use_rec_region_prop_prior = 0. Default NULL. |
rec_seas_prop_spec |
"fix" |
Character or NULL. Seasonal recruitment apportionment structure. Default "fix". See do_rec_seas_prop_mapping for full option descriptions including "est_shared_pop". |
use_rec_seas_prop_prior
|
0
|
Integer (0/1). Whether Dirichlet priors are applied to seasonal recruitment proportions. Not valid when n_seas = 1. When rec_lag = 0 and spawn_seas > 1, the prior is evaluated only over seasons spawn_seas:n_seas (the seasons before spawn_seas are structurally zero, not estimated). Default 0. |
rec_seas_prop_prior
|
NULL
|
Data frame of Dirichlet prior concentration parameters for seasonal proportions. Required columns: pop and alpha. Ignored when use_rec_seas_prop_prior = 0. Default NULL. |
use_fixed_rec_seas_prop
|
1
|
Integer (0/1). Whether fixed (non-estimated) seasonal proportions from fixed_rec_seas_prop are used. Automatically reset to 0 with a warning if rec_seas_prop_spec requests estimation. Default 1. |
fixed_rec_seas_prop
|
{ rec_seas_prop = array(0, dim =
c(input_listn_pop,
input_listn_seas))
rec_seas_prop[, 1] <- 1 rec_seas_prop }
|
Array [n_pop x n_seas]. Fixed seasonal recruitment proportions used when use_fixed_rec_seas_prop = 1. Default: all recruitment assigned to season 1. When rec_lag = 0 and spawn_seas > 1, must be zero for every season before spawn_seas. An error is raised otherwise. |
do_rec_bias_ramp
|
0
|
Integer (0/1). Whether a recruitment bias ramp is applied to ln_RecDevs to account for reduced information in early and terminal years. Default 0. |
bias_year
|
NA
|
Numeric. Calendar year at which the bias ramp reaches its maximum correction. Only used when do_rec_bias_ramp = 1. Default NA. |
max_bias_ramp_fct
|
1
|
Numeric in [0, 1]. Maximum bias correction factor applied at bias_year. Default 1. |
sigmaR_switch
|
1
|
Integer. Year index at which _R switches from the early-period value (index 1) to the late-period value (index 2). If , a single _R is applied throughout. Default 1. |
dont_est_recdev_last
|
0
|
Non-negative integer. Number of terminal years for which recruitment deviations are not estimated. Automatically overridden to 0 if n_proj_yrs_devs > 0, since projected deviation years are penalized toward the mean and are effectively estimated regardless. Default 0. |
dont_pen_recdev_first
|
0
|
Integer. How many leading years of recruitment deviations are estimated but left out of the recruitment penalty. 0 (default) penalizes every year. The first year’s recruitment is the first year’s age one abundance, which in an equilibrium initialization belongs to the initial condition rather than to the recruitment process. WHAM keeps it as a separate initial numbers at age parameter and gives it no process error at all, and setting this to 1 is the same statement: the deviation is still estimated, so the data set the first year’s recruitment freely, but it takes no prior from ln_sigmaR. Mapping the deviation off instead would fix it at its starting value rather than leave it free. Leaving years out only removes their penalty, never their estimation, so this is separate from dont_est_recdev_last, which does the opposite at the other end of the series. |
init_age_strc |
2 |
Initialization method. Default 2. Options 0/"iterative", 1/"scalar_no_move", 2/"matrix", and 3/"scalar_plus_only" all project an equilibrium age structure forward from R0 and treat ln_InitDevs as multiplicative deviations from it. 4/"free" projects no equilibrium at all: the numbers at age 2 and older are exp(ln_InitDevs), apportioned by sex ratio, with age 1 still taken from recruitment. Use it when the initial age structure has no information about R0 and should not be pulled toward an equilibrium. Note that under 4 the deviations are on the scale of numbers rather than of log ratios, so the penalty applied through equil_init_age_strc is a prior on log abundance; pair it with equil_init_age_strc = 0 if no such prior is wanted. 0/"iterative"Iterates the population to approximate equilibrium. Slowest but most general. 1/"scalar_no_move"Scalar geometric series assuming no movement. 2/"matrix"Matrix geometric series incorporating movement. Recommended default for spatial models. 3/"scalar_plus_only"Scalar geometric series with movement only in the plus group. |
equil_init_age_strc |
1 |
Plus-group treatment during stochastic initialization. Default 1. 0/"equil"Deterministic equilibrium; no ln_InitDevs are estimated. 1/"stoch_no_plus"Stochastic deviations for all ages except the plus group. 2/"stoch_all"Stochastic deviations for all ages including the plus group. 3/"stoch_shared_ages"Stochastic deviations with user-defined age sharing via init_age_devs_shared. Deviations are estimated independently across all populations and regions, but ages sharing the same value in init_age_devs_shared are constrained to a single parameter. The plus group is not automatically fixed; include an NA in init_age_devs_shared at the plus-group position to fix it, or share it with the preceding age by repeating that index (e.g. c(1:42, rep(42, 9))). Requires init_age_devs_shared to be non-NULL. 4/"stoch_all_no_pen"Deviations estimated for all ages including the plus group, and none of them penalized. The same cells "stoch_all" estimates, with no prior on any of them. Pair it with init_age_strc = "free", where the deviations are the initial log numbers at age rather than departures from an equilibrium, so a penalty on them would be a prior on initial abundance rather than on the shape of the age structure. This is what ICES assessments in the SAM family do with their first year. "equil" means both no penalty and no estimation, which are the same statement about an equilibrium age structure and two different ones about a free age structure. "stoch_all_no_pen" is the second of them. |
init_F_prop |
array(0, dim = c(input_list$data$n_regions, input_list$data$n_seas, input_list$data$n_fish_fleets)) |
Numeric array [n_regions x n_seas x n_fish_fleets]. Legacy interface, retained for backwards compatibility. A fixed proportion of the estimated mean F applied during equilibrium initialization. When supplied non-zero (and init_F_par is not given) it is converted to ln_init_F = log(init_F_prop) with init_F_form = "prop", which reproduces the previous behavior exactly. Prefer init_F_par. Default: zero for all seasons and fleets. |
init_F_form |
"prop" |
Character. What the init_F_par parameter MEANS: "prop" (default): init_F = exp(ln_init_F) * exp(ln_F_mean), a proportion of the estimated mean F, so the initial age structure moves with it. "abs": init_F = exp(ln_init_F), an absolute fishing mortality independent of ln_F_mean. Use "abs" when bridging an assessment that has a separate historical F (one estimated as its own parameter, distinct from the mean log fishing mortality). Under "prop" those two quantities collapse into a single parameter, and because catch constrains only the PRODUCT of numbers and fishing mortality, the optimizer can raise ln_F_mean to deplete the initial age structure and raise F together, fitting catch just as well with a smaller, harder-fished stock. That is a genuine second solution branch, not a rounding difference. |
init_F_spec |
"fix" |
Character, "fix" (default) or "est". Whether init_F_par is estimated. This sets only the mapping, so it combines freely with init_F_form, including estimating the proportion itself (init_F_form = "prop", init_F_spec = "est"). Note init_F is generally weakly identified, which is why assessments commonly fix it. "est" is refused under init_age_strc = "free", where no equilibrium is projected and init_F_par never reaches the objective. The value is set by the parameter init_F_par [n_regions x n_seas x n_fish_fleets], supplied through ... like any other starting value, e.g. Setup_Mod_Rec(..., init_F_form = "abs", init_F_spec = "fix", init_F_par = array(log(0.01), dim = c(1, 1, 1))). Its SCALE depends on init_F_form, logit under "prop" (so the proportion is bounded to (0, 1)) and log under "abs", which is why it is not named ln_ or logit_. Defaults to effectively no initial fishing mortality. |
sigmaR_spec |
"est_all" |
Character. Estimation structure for \sigma_R, stored in ln_sigmaR [2 x n_pop x n_regions], where index 1 = initial deviation period and index 2 = annual deviation period. Default "est_all". See do_sigmaR_mapping for full option descriptions. |
InitDevs_spec
|
NULL
|
Character or NULL. Sharing structure for initial age-structure deviations ln_InitDevs [n_pop x n_regions x (n_ages - 1) x n_sexes]. Default NULL (estimate all independently). See do_InitDevs_mapping for full option descriptions. |
InitDevs_sex_spec |
"est_shared_s" |
Character. "est_shared_s" (default) estimates one initial age deviation curve read by every sex, which is how the model has always behaved. "est_all" gives each sex its own curve, each penalized under the initial-age penalty, with an "own_mean" InitDevs_pen_center pooled across sexes so the sexes share one estimated level the way assessments with a common mean-log-initial and sex-specific deviations are written. Requires n_sexes > 1. |
RecDevs_spec
|
NULL
|
Character or NULL. Sharing structure for annual recruitment deviations ln_RecDevs [n_pop x n_regions x n_years]. Default NULL (estimate all independently). See do_RecDevs_mapping for full option descriptions. |
RecDevs_model |
"iid" |
Character string giving the process error structure on the recruitment deviations ln_RecDevs. The same three forms Fdev_model offers: "iid"Default. Independent deviations about the prior mean set by RecDevs_pen_center, which is the classic mean recruitment with lognormal deviations. "rw"Random walk. Each deviation is centered on the previous estimated one, so recruitment is free to move but not to jump, which is the state-space recruitment SAM fits by default. The first estimated deviation is given a diffuse normal, so the level of the series is set by R0 and the data rather than by the penalty. "ar1"AR1. As the walk, but each deviation reverts toward zero at rate RecDevs_rho, and the first estimated deviation is drawn from the stationary marginal distribution. A step spans the gap between estimated years rather than calendar years, so mapping deviations off through RecDevs_spec or dont_est_recdev_last closes the gap rather than splitting the series. The walk and the AR1 center each deviation on the previous one, so neither can be combined with do_rec_bias_ramp = 1 or RecDevs_pen_center = "own_mean", both of which assert a mean about zero; each combination is rejected. sigmaR_switch still applies, so the walk can take one standard deviation early and another late. |
RecDevs_rho_spec |
"fix" |
Character string specifying the sharing structure for the AR1 correlation parameter RecDevs_rho [n_pop x n_regions]: one of "est_all", "est_shared_pop", "est_shared_r", "est_shared_pop_r", or "fix" (default). Only read when RecDevs_model = "ar1"; every other RecDevs_model maps the parameter off. See do_RecDevs_rho_mapping. |
RecDevs_rw_init_sigma |
5 |
Numeric. Standard deviation given to year one of a random walk, which is what sets the level of the recruitment series. Default 5, wide enough that the level is decided by R0 and the data. NA instead starts the walk at zero under its own sigma, which pulls the first year toward mean recruitment. Only read when RecDevs_model = "rw". |
RecDevs_pen_center |
"fixed" |
Where the recruitment and initial age deviation penalties are centered. "fixed" (default) centers on the asserted prior mean, zero or the bias-corrected -\sigma_R^2/2, which constrains both the level and the spread of the deviations. "own_mean" centers on the mean of the estimated deviations themselves, so only their spread is penalized and their level is left free; that is what a sum of squares about the series' own mean amounts to. The level being unpenalized means it must be pinned elsewhere, by a prior on R0 or by fixing a deviation, or the likelihood is flat along it. Cannot be combined with do_rec_bias_ramp = 1, whose offset is meaningless once the mean is estimated rather than asserted. |
Use_rec_level_pen
|
0
|
Integer (0/1). Whether a penalty is applied to the log recruitment series itself, separately from the deviation penalty. Under a stock-recruit relationship the deviations are residuals about the predicted curve, so this is the only way to also say that the recruitment series should not wander. Default 0. |
rec_level_pen_sigma
|
1
|
Numeric standard deviation of that penalty. A sum of squares with weight w corresponds to 1/. Default 1. |
rec_level_pen_center |
"own_mean" |
Either "own_mean" (default), centering on the mean of the log recruitment series so only its variability is penalized, or "fixed", centering on zero. |
rec_level_pen_yrs
|
NULL
|
Vector of years the penalty applies over, or NULL (default) for every year. |
Use_init_sex_pen |
0 |
Integer (0/1). Whether each later sex's initial age deviations are tied to the first sex's, through a Gaussian on their difference at every age the initial-age penalty covers. A statement about how different the sexes' initial age structures may be, separate from the initial-age penalty's statement about how variable each curve is. Requires n_sexes > 1 and InitDevs_sex_spec = "est_all" (under "est_shared_s" the difference is identically zero). Enters the objective unweighted. Default 0. |
init_sex_pen_sigma
|
1
|
Numeric standard deviation of that tie. A sum of squares with weight w corresponds to 1/. Default 1. |
sr_penalty |
"none" |
Character. "none" (default), "bh" or "ricker". Only valid with rec_model = "mean_rec". Fits a stock-recruit curve as a LIKELIHOOD on the log residual \log R_y - \log\widehat{R}_y without letting it generate recruitment, which is how several AFSC templates treat a weakly determined relationship: it informs the recruitment series rather than dictating it. Under rec_model = "bh_rec" or "ricker_rec" the curve already generates recruitment and this must stay "none". |
sr_pen_sigma
|
1
|
Numeric standard deviation of that residual. |
sr_pen_yrs
|
NULL
|
Vector of years the stock-recruit penalty applies over, or NULL (default) for every year that has a lagged spawning biomass, i.e. all but the first rec_lag. Years outside it keep their recruitment deviation estimated but contribute nothing to the penalty, which is how a restricted stock-recruit window is expressed. Naming a year with no lagged spawning biomass is an error rather than a silent fallback to the equilibrium. |
sr_R0_spec |
"shared" |
Character. "shared" (default) reuses ln_global_R0, which under mean recruitment is the recruitment level, as the curve's scale, giving one scale parameter. "est" gives the curve its own estimated ln_sr_R0, identified by the curve fit itself. "rinit" takes the scale from ln_rinit, the initial equilibrium recruitment, so one parameter sets both the unfished age structure and the curve; it requires use_rinit = 1. "shared" is the better posed of the first two; "est" reproduces templates that have separate mean-recruitment and unfished-recruitment parameters, and "rinit" reproduces those that use the unfished recruitment in both places, which is the usual ADMB arrangement. |
InitDevs_pen_center |
"fixed" |
Where the recruitment and initial age deviation penalties are centered. "fixed" (default) centers on the asserted prior mean, zero or the bias-corrected -\sigma_R^2/2, which constrains both the level and the spread of the deviations. "own_mean" centers on the mean of the estimated deviations themselves, so only their spread is penalized and their level is left free; that is what a sum of squares about the series' own mean amounts to. The level being unpenalized means it must be pinned elsewhere, by a prior on R0 or by fixing a deviation, or the likelihood is flat along it. Cannot be combined with do_rec_bias_ramp = 1, whose offset is meaningless once the mean is estimated rather than asserted. |
h_spec |
NULL |
Character or NULL. Sharing structure for stock-recruit steepness steepness_h [n_pop x n_regions], parameterized in bounded logit space (0.2, 1). Default NULL (estimate by population when n_pop > 1, by region when n_pop = 1). Ignored when rec_model = "mean_rec". See do_h_mapping for full option descriptions. |
sgl_seas_spawning_movement
|
NA
|
Spawning movement array [n_pop x n_regions x n_regions x n_years x n_ages x n_sexes]. Each [p, , r, y, a, s] slice is a row-stochastic movement matrix giving the probability of fish from each origin region spawning in region r. If NA (default), 100% natal homing is assumed and the array is constructed internally. |
t_spawn
|
0
|
Numeric. Spawn timing as a fraction of the season elapsed before spawning. 0 (default) = spawning before any mortality; 1 = spawning after all mortality. |
stray_rate_spec |
"fix" |
Character string. Estimation structure for stray_rate_pars [n_pop x max_stray_blocks], parameterized on the logit scale. Ignored when use_fixed_stray_rate = 1 or n_pop = 1. Default "fix". Options: "fix"All parameters fixed at starting values (mapped to NA). Use this alongside use_fixed_stray_rate = 0 to hold stray rates at a specified value without estimating. "est_all"Estimate independently per population x block. Produces one parameter per population per unique block. "est_shared_pop"Single parameter per block, shared across all populations. Requires identical block structures across all populations. An error is raised if block indices differ. |
stray_rate_blocks |
paste0("none_Pop_", seq_len(input_list$data$n_pop)) |
Character vector of length n_pop defining the temporal block structure for stray rate parameters. Valid formats: "none_Pop_x"Constant stray rate for population x across all years (single block). "Block_k_Year_a-b_Pop_x"Block k applies to years a through b for population x. Use "terminal" in place of the end year to extend through the final model year. Default: a single constant block for every population. Note: stray rate is generally unidentifiable from fisheries data alone. Time-blocking is provided for completeness but regularization via use_stray_rate_prior in the penalty setup is strongly recommended whenever stray_rate_spec != "fix". |
use_fixed_stray_rate |
if (stray_rate_spec != "fix") 0 else 1 |
Integer (0/1). Whether stray rates are supplied as a fixed external array (fixed_stray_rate) rather than estimated as model parameters. Default 1 (fixed), preserving existing behavior. Set to 0 to estimate stray rates via stray_rate_pars. |
fixed_stray_rate
|
array(0, dim =
c(input_listn_pop,
length(input_listyears)))
|
Array [n_pop x n_years]. Fixed stray rate values used when use_fixed_stray_rate = 1. Values should be in [0, 1]. Default: 0 (no straying) for all populations and years. Ignored when use_fixed_stray_rate = 0. |
use_stray_rate_prior
|
0
|
Integer (0/1). Whether Beta priors are applied to estimated stray rate parameters. Only relevant when use_fixed_stray_rate = 0 and n_pop > 1. An error is raised if use_stray_rate_prior = 1 alongside use_fixed_stray_rate = 1 since stray_rate_pars would not be estimated. Default 0. |
stray_rate_prior
|
NULL
|
Data frame of Beta prior parameters for stray rates. Required columns: pop (population index), block (block index matching stray_rate_blocks), mu (prior mean, in (0,1)), sd (prior standard deviation). One row per population x block combination to penalize. Ignored when use_stray_rate_prior = 0. Default NULL. |
spawn_seas
|
1
|
Integer. Season index in which spawning occurs. Default 1. |
sexratio_spec |
"fix" |
Character. Estimation structure for sex ratio parameters sexratio_pars [n_pop x n_regions x n_blocks]. Default "fix". See do_sexratio_pars_mapping for full option descriptions. Must be "fix" when n_sexes = 1. |
sexratio_blocks |
{ grid <- expand.grid(region = 1:input_list$data$n_regions, pop = 1:input_list$data$n_pop) blks <- paste0("none_Pop_", grid$pop, "_Region_", grid$region) blks } |
Character vector defining temporal block structure for sex ratio parameters. One entry per population-region combination. Valid formats: "none_Pop_x_Region_x"Constant sex ratio for population x and region x (single block across all years). "Block_k_Year_a-b_Pop_x_Region_x"Block k applies to years a through b. Use "terminal" in place of the end year to extend through the final model year. Default: a single constant block for every population-region combination. |
use_rinit
|
0
|
Integer (0/1). Whether a separate initial recruitment scalar ln_rinit is used to initialize the population independently of the recruitment ln_global_R0. When 0 (default), ln_rinit is fixed and ln_global_R0 governs both initialization and recruitment. When 1, both ln_rinit and ln_global_R0 are estimated, with ln_rinit used exclusively for equilibrium initialization and ln_global_R0 used for the stock-recruit relationship. |
init_age_devs_shared |
NULL |
Integer vector of length n_ages - 1 specifying an explicit parameter-sharing structure for ln_InitDevs along the age dimension. Each element gives the factor level assigned to that age position; positions sharing the same integer value are constrained to a single estimated parameter. Used in conjunction with equil_init_age_strc = 3 ("stoch_shared_ages"), which activates user-defined age sharing while still estimating deviations independently across populations and regions. The sharing structure is also respected by InitDevs_spec options: "est_shared_r" applies the vector per population (with a population-level offset so pops remain independent), and "est_shared_pop_r" applies it globally (no offset, all pops and regions share the same parameters). A typical use case is replicating ADMB models where ages beyond the data plus group share the last estimated deviation, e.g. c(1:42, rep(42, 9)) for a 52-age model with 43 data ages, giving 42 free parameters. When NULL (default), age sharing follows the standard behavior determined by equil_init_age_strc alone. |
R0_blocks |
NULL |
Character vector giving time blocks for R0, one entry per population, in the same vocabulary as the selectivity blocks: "none_Pop_<p>", "Block_<b>_Year_<a>-<e>_Pop_<p>" (1-based year indices, "terminal" allowed for the end year). Under rec_model = "mean_rec" R0 IS mean recruitment, so a block is a productivity regime. Under a stock-recruit form it is the curve's scale, so blocking it makes the curve time-varying: S0 moves with the block, and depletion and any reference point built on the curve step at its boundary. A curve fitted as a penalty instead (sr_penalty with sr_R0_spec = "shared") takes its scale from R0_ref_block and stays put. Default NULL, a single block. |
R0_ref_block |
1 |
Integer, the block whose R0 is used everywhere a single value is needed rather than a year's value: the initial age structure, the regional apportionment, the R0 prior, the ln_rinit penalty and the stock-recruit scale when sr_R0_spec = "shared". Default 1. Only the recruitment computed each year uses that year's block. |
use_r0_prior
|
0
|
Integer (0/1). Whether to apply a lognormal prior on R0 for any populations. Default 0. |
r0_prior
|
NULL
|
Data frame with columns pop (population index), mu (prior mean on natural scale), and sd (prior SD on log scale). Required when use_r0_prior = 1. |
Use_rinit_pen
|
0
|
Integer (0/1). Whether to penalize the initial equilibrium recruitment’s offset from the recruitment level, (R_{init} / R_0) N(0, ^2), under use_rinit = 1. An equilibrium recruitment stands for the average of several years of recruitment, so its spread is smaller than a single year’s; _R / (1 / M - 0.5), with 1/M - 0.5 the average age of the stock, is a reasonable choice. Default 0. |
rinit_pen_sd
|
1
|
Standard deviation of that penalty, log scale. Default 1. |
ln_global_R0_spec |
"est" |
Character string, "est" (default) or "fix". "fix" maps ln_global_R0 off at its starting value, so the recruitment deviations hold log recruitment rather than as departures from a level. That is how SAM writes recruitment, where the first year's log numbers at age are the recruitment itself and there is no separate level parameter. The recruitment counterpart of ln_F_mean_spec in Setup_Mod_Catch_and_F. Under rec_model = "mean_rec" the level and the deviations are only both estimable when something reads the deviations' level. An "iid" or "ar1" penalty does; a random walk does not, since it penalizes only the change from one deviation to the next. Combining a walk with dont_pen_recdev_first >= 1, which removes the first year's term, leaves the two exactly unidentified, and that combination is rejected rather than fitted: it converges to a singular Hessian and standard errors of NA. A walk with the first year still penalized is accepted with a warning, since the level is then readable only through that one term and its standard error comes back near RecDevs_rw_init_sigma. |
Setup_Mod_Biologicals
72 arguments
| Argument | Default | Description |
|---|---|---|
WAA
|
required | Numeric array of spawning weight-at-age with dimensions [n_pop × n_regions × n_years × n_seas × n_ages × n_sexes]. Used to compute spawning stock biomass. Also serves as the fallback for WAA_fish and WAA_srv when those are NULL. |
WAA_fish
|
NULL
|
Numeric array of fishery weight-at-age with dimensions [n_pop × n_regions × n_years × n_seas × n_ages × n_sexes × n_fish_fleets]. If NULL (default), WAA is broadcast across all fishery fleets. |
WAA_srv
|
NULL
|
Numeric array of survey weight-at-age with dimensions [n_pop × n_regions × n_years × n_seas × n_ages × n_sexes × n_srv_fleets]. If NULL (default), WAA is broadcast across all survey fleets. |
MatAA
|
required | Numeric array of maturity-at-age proportions () with dimensions [n_pop × n_regions × n_years × n_seas × n_ages × n_sexes]. When rec_lag = 0 (age-0 recruitment, set via Setup_Mod_Rec), maturity at the recruit age (the first age class) must be exactly 0 for all populations, regions, years, seasons, and sexes, an error is raised otherwise. Requires Setup_Mod_Rec to have been called first so rec_lag is already set. |
addtocomp
|
NULL
|
Deprecated here, pass it to Setup_Mod_Weighting instead, which now owns this constant along with every other likelihood weight. Still accepted for backward compatibility: if supplied, it is forwarded to Setup_Mod_Weighting with a message rather than applied here directly. (Small constant added to composition proportions before likelihood evaluation to avoid log(0); default 1e-3 in Setup_Mod_Weighting. Ignored when a logistic-normal likelihood is specified, as that family handles zeros internally.) |
comp_const_obs
|
NULL
|
Deprecated here, pass it to Setup_Mod_Weighting instead. Still accepted for backward compatibility (forwarded with a message). Integer switch (0 or 1) controlling where addtocomp is applied in the multinomial likelihood, not a constant to be tuned. 1 (default in Setup_Mod_Weighting) adds it to the observed proportions that weight the multinomial as well as inside the logarithms, so the likelihood is stationary exactly at pred = obs. 0 weights by the raw observed proportions. The Dirichlet-multinomial sanity check that used to read it here (inside Setup_Mod_FishIdx_and_Comps/ Setup_Mod_SrvIdx_and_Comps) now runs inside Setup_Mod_Weighting once the final value is known. |
addtofishidx
|
NULL
|
Deprecated here, pass it to Setup_Mod_Weighting instead. Still accepted for backward compatibility (forwarded with a message). Small constant added to fishery indices; default 1e-4 in Setup_Mod_Weighting. |
addtosrvidx
|
NULL
|
Deprecated here, pass it to Setup_Mod_Weighting instead. Still accepted for backward compatibility (forwarded with a message). Small constant added to survey indices; default 1e-4 in Setup_Mod_Weighting. |
addtotag
|
NULL
|
Deprecated here, pass it to Setup_Mod_Weighting instead. Still accepted for backward compatibility (forwarded with a message). Small constant added to tag recovery observations; default 1e-10 in Setup_Mod_Weighting. |
AgeingError
|
NULL
|
Ageing error (age-age transition) array mapping true modeled ages to observed age bins. Each row is one model age’s share across the observed bins and sums to one, or to zero to drop that model age from the observations. This is the age-axis twin of LenBinMap: the likelihood applies the two identically and validates them identically, so read either one for the other. It changes which bins the compositions are recorded on; to leave observed bins out of the likelihood without changing the bins themselves, use the *_bins arguments instead. Accepted forms: 2D matrix [n_model_ages × n_obs_ages]Time-invariant ageing error; replicated internally across all years. 3D array [n_years × n_model_ages × n_obs_ages]Time-varying ageing error. NULL (default)An identity matrix is constructed, assuming modeled and observed age bins are identical. If observed bins are a subset of modeled ages (e.g., observed ages 2-10 vs. modeled ages 1-10), supply a shifted identity matrix such as diag(1, n_model_ages)[, obs_age_index] to avoid a dimensional mismatch. |
AgeingError_fish
|
NULL
|
Optional fleet-specific ageing error for the fishery fleets, for when the fleets do not read ages the same way. Accepted forms: a 3D array [n_model_ages × n_obs_ages × n_fish_fleets] for a time-invariant matrix per fleet, a 4D array [n_years × n_model_ages × n_obs_ages × n_fish_fleets] for a time-varying one, or NULL (default), which gives every fishery fleet the shared AgeingError. Each fleet’s slice is validated the same way AgeingError is, and every fleet must land on the same observed age bins, since the observed composition arrays have one age dimension shared across fleets. |
AgeingError_srv
|
NULL
|
Optional fleet-specific ageing error for the survey fleets, in the same forms as AgeingError_fish, with n_srv_fleets in place of n_fish_fleets. NULL (default) gives every survey fleet the shared AgeingError. |
Use_M_prior
|
0
|
Integer flag to apply a lognormal prior on natural mortality. 0 = no prior (default); 1 = apply prior. |
M_prior
|
NA
|
Data frame of prior hyperparameters for natural mortality, with one row per unique block combination. Required columns: popblk, regionblk, yearblk, ageblk, sexblkBlock indices identifying which parameter the prior applies to. muPrior mean in natural (untransformed) space. sdPrior standard deviation. seasblkOptional season block index. Left out, it reads the block covering season one, which is every season unless M_seasblk_spec splits them. Example for a single shared prior: M_prior <- data.frame( popblk = 1, regionblk = 1, yearblk = 1, ageblk = 1, sexblk = 1, mu = 0.085, sd = 0.05 ) Only used when Use_M_prior = 1. |
fit_lengths
|
0
|
Integer flag for fitting length compositions. 0 = no (default); 1 = yes. Requires a valid SizeAgeTrans array. |
SizeAgeTrans
|
NA
|
Numeric array of size-at-age transition probabilities (column-stochastic; each age column sums to 1) with dimensions [n_pop × n_regions × n_years × n_seas × n_lens × n_ages × n_sexes]. Required when fit_lengths = 1; ignored otherwise. The shared key every fleet reads unless SizeAgeTrans_fish/SizeAgeTrans_srv override it for that fleet type. |
SizeAgeTrans_fish |
NULL |
Optional per-fleet size-at-age transition arrays, dimensioned like SizeAgeTrans with an added trailing fleet dimension (n_fish_fleets/n_srv_fleets). NULL (default) reads every fleet's key from the shared SizeAgeTrans. Only meaningful with growth_model = "none"; a growth model already derives one key per fleet, at that fleet's own timing, and rejects these to avoid mixing two sources for the same key. This is the fixed-data counterpart of Setup_Sim_Biologicals's SizeAgeTrans_fish_input/SizeAgeTrans_srv_input, and of WAA_fish/WAA_srv overriding the shared WAA. |
SizeAgeTrans_srv |
NULL |
Optional per-fleet size-at-age transition arrays, dimensioned like SizeAgeTrans with an added trailing fleet dimension (n_fish_fleets/n_srv_fleets). NULL (default) reads every fleet's key from the shared SizeAgeTrans. Only meaningful with growth_model = "none"; a growth model already derives one key per fleet, at that fleet's own timing, and rejects these to avoid mixing two sources for the same key. This is the fixed-data counterpart of Setup_Sim_Biologicals's SizeAgeTrans_fish_input/SizeAgeTrans_srv_input, and of WAA_fish/WAA_srv overriding the shared WAA. |
do_caal
|
0
|
Integer flag for building the joint arrays at length and age. 0 = no (default); 1 = yes. Requires fit_lengths = 1. Turning this on adds Fish_caal, Fish_caal_discard and Srv_caal to the report, holding predicted retained catch, discards and survey index jointly by length and age. |
growth_model |
"none" |
Character. "none" (default) keeps SizeAgeTrans and the weight-at-age arrays as data. "vb_schnute" builds the size-age transition from estimable von Bertalanffy parameters in Schnute's form: length L1 at reference age growth_A1, length L2 at growth_A2, rate K, and CVs of length at age CV1 and CV2 at the two reference ages. Growth below growth_A1 is linear from growth_L0 at age zero, the CV interpolates between the two references, and the plus group has an adjustment for fish older than the accumulator age. "richards" is the same curve with a sixth parameter, the Richards coefficient rho, applied to the lengths raised to that power (rho = 1 recovers the von Bertalanffy form). Requires fit_lengths = 1; SizeAgeTrans is then ignored and may be NA. |
growth_spec |
"est_all" |
Character. How the growth parameters are estimated: "est_all" (default, one set per population, region and sex), "est_shared_r" (shared across regions), "est_shared_s" (shared across sexes), "est_shared_r_s" (one set per population), or "fix". |
growth_fix
|
NULL
|
Logical vector, one entry per growth parameter, naming which of L1, L2, K, CV1, CV2 (and rho) stay at their starting values whatever growth_spec says. |
growth_tv_model |
NULL |
Time variation of the growth parameters. NULL (default) holds every parameter constant. Otherwise a character vector naming a structure per parameter, either of length n_gpars in the parameter order or named by parameter (L1, L2, K, CV1, CV2, rho) with the rest constant, each one of "none", "iid" (independent annual deviations) or "rw" (a random walk). A varying parameter gets a deviation series ln_growth_devs and a log sigma in the first data source of growth_pe_pars. |
growth_tv_years
|
NULL
|
Years the deviations are active in, calendar years. NULL (default) for every model year, a vector applied to every varying parameter, or a list named by parameter. Deviations outside the range are kept at zero. |
growth_tv_link |
"log" |
Character, the scale a deviation enters on. "log" (default) multiplies the parameter by e^{\delta}; "logit" keeps it inside growth_par_bounds, P_y = lo + (hi - lo)\,\mathrm{logit}^{-1}(\mathrm{logit}((P - lo)/(hi - lo)) + \delta_y), so the parameter approaches a bound however large the deviation instead of crossing it. |
growth_par_bounds
|
NULL
|
Matrix [n_gpars x 2] of lower and upper bounds, natural scale, required under the logit link. |
growth_tv_sigma_spec |
"fix" |
Character, "fix" (default) holds the process error standard deviations of the deviations at their starting values, "est" estimates them. Both read the first data source of growth_pe_pars, one slot per growth parameter. |
growth_tv_spec |
"est_all" |
Character, how the deviations are shared across strata, with the same vocabulary as growth_spec: "est_all" (default), "est_shared_r", "est_shared_s" or "est_shared_r_s". |
growth_tv_type |
"curve" |
Character. "curve" (default) reads every year's size at age off that year's curve. "cohort" has size at age forward cohort by cohort: each year every cohort grows by the increment the current year's parameters imply from the size it reached, ages still in the linear phase keep the length at growth_A1 their birth year's parameters gave them, the first age past growth_A1 is placed on the current year's curve, and the plus group's size blends the cohort entering it with the fish already there by their numbers at age. The CV at age is then kept at the first year's sizes. The propagation starts in the first year any deviation is active; every earlier year sits on the first year's curve. |
growth_rw_init_sigma
|
5
|
Standard deviation given to the first year of a random walk on a growth parameter, as srvsel_rw_init_sigma for selectivity. Default 5. |
growth_semipar |
"none" |
Character. Semi-parametric growth: a year-by-age surface of deviations on mean length at age, multiplying the parametric curve, so the curve stays the parametric part and the deviations hold departures from it. "none" (default) keeps growth purely parametric; otherwise one of "iid", "rw" (a random walk over years within an age), "3dmarg" or "3dcond" (a three-dimensional Gaussian Markov random field over age, year and cohort, on the marginal or conditional variance), or "2dar1" (a separable first-order autoregression over ages and years). The same process error forms the selectivity deviations use, so a growth surface and a selectivity surface are penalized the same way. The spread at age follows the deviated mean, which leaves the coefficient of variation at age to the parametric part. |
growth_semipar_spec |
"fix" |
Character, whether the second data source of growth_pe_pars is estimated. Whether the process error hyperparameters are estimated ("est") or kept at their starting values ("fix", the default). The deviations themselves are always estimated. |
growth_semipar_ages
|
NULL
|
Ages the deviations are estimated over, as ages (not indices). NULL (default) uses every age. Ages outside the set are kept at zero, which is how a surface is restricted to the ages the length data actually inform. |
growth_semipar_years
|
NULL
|
Years the deviations are estimated over, calendar years. NULL (default) uses every year. |
LenBinMap
|
NULL
|
Optional matrix [n_lens x n_obs_lens] mapping the model’s length bins onto the bins the length compositions are recorded on, for compositions on coarser bins than the model has (a population of 1 cm bins fit to 5 cm compositions, say). Observed length compositions are then dimensioned by n_obs_lens and the expected compositions are mapped through it inside the likelihood. This is the length-axis twin of AgeingError: the likelihood applies the two identically and validates them identically, so read either one for the other. Each row is one model bin’s share across the observed bins and sums to one, or to zero to drop that model bin from the observations. It changes which bins the compositions are recorded on; to leave observed bins out of the likelihood without changing the bins themselves, use the *LenComps_bins arguments instead. NULL (default) fits the compositions on the model bins. |
growth_A1 |
NULL |
Reference ages for L1 and L2. growth_A2 = "Linf" instead makes L2 the asymptotic length itself, with no second reference age to solve it from. |
growth_A2 |
NULL |
Reference ages for L1 and L2. growth_A2 = "Linf" instead makes L2 the asymptotic length itself, with no second reference age to solve it from. |
growth_len_lower
|
NULL
|
Numeric vector of the lower edges of the length bins. lens in Setup_Mod_Dim are bin midpoints; the key is built on the edges. |
growth_L0
|
NULL
|
Length at age zero anchoring the linear phase. Defaults to growth_len_lower[1]. |
growth_cv_type |
"len" |
Character, "len" (default) interpolates the CV on mean length between L1 and L2, "age" on age. |
growth_sd_type |
"cv" |
Character, "cv" (default) scales the mean by the CV parameters, "sd" reads them as standard deviations. |
growth_dist |
"normal" |
Character, "normal" (default) or "lognormal" distribution of length at age. |
growth_plus_group |
"mixture" |
Character. "mixture" (default) takes the plus group's mean length as the survivorship-weighted mixture of the ages it holds, their numbers declining at an assumed 0.2 per year and their length rising from the curve at the accumulator age to the asymptote; "curve" reads the curve at the accumulator age. |
waa_model |
"data" |
Character. Where weight at age comes from. "data" (default) reads WAA, WAA_fish and WAA_srv from the arguments of the same name. "wt_len" builds them from the size-age key and the weight-length relationship W = a L^b applied at the bin midpoints, so weight at age holds the spread of length at age rather than being the weight of the mean length; the spawning weight uses the key at spawning time and each fleet's weight the key at that fleet's timing, t_fish or t_srv. Under "wt_len", WAA may be NULL, and reference point and projection code still read data$WAA, so copy the reported arrays into the data list before calling them. |
wt_len_pars |
NULL |
Weight-length parameters a, b in W = a L^b, a vector of two or an array [n_pop x n_regions x n_sexes x 2]. Required when waa_model = "wt_len". |
M_spec |
"est_ln_M" |
Character string controlling natural mortality estimation. One of: "est_ln_M" (default)Estimate ln_M across the defined blocks. "fix"Fix mortality to Fixed_natmort; ln_M parameters are mapped to NA and not passed to the optimizer. |
M_popblk_spec |
"constant" |
Blocking structure for ln_M across populations. Either "constant" (default; single shared value) or a list of integer index vectors defining population groups, e.g., list(1, 2) for population-specific M. |
M_ageblk_spec |
"constant" |
Blocking structure across ages. Either "constant" (default) or a list of integer index vectors, e.g., list(1:5, 6:10). |
M_regionblk_spec |
"constant" |
Blocking structure across regions. Either "constant" (default) or a list of integer index vectors, e.g., list(1:3, 4:5). |
M_yearblk_spec |
"constant" |
Blocking structure across years. Either "constant" (default) or a list of integer index vectors, e.g., list(1:10, 11:30). |
M_seasblk_spec |
"constant" |
Blocking structure across seasons. Either "constant" (default, one rate all year) or a list of integer index vectors, e.g. list(1, 2) for a rate in each of two seasons, or list(1:2, 3:4) to split a four season year in half. Blocks hold rates per year, so two half-year seasons at 0.2 and 0.4 accumulate 0.1 and 0.2, an annual 0.3. A rate is not a share. "constant" is numerically identical to a model built before seasonal M existed. Only identifiable off within-year data: seasonal catch, seasonal comps, or surveys in more than one season. Without those it trades against seasonal selectivity and the F devs. Even with them the annual total comes back much better than the split, so prefer fixing the split and estimating the level. Warns if season blocks are given for a single season model. |
M_sexblk_spec |
"constant" |
Blocking structure across sexes. Either "constant" (default; shared across sexes) or a list of integer index vectors, e.g., list(1, 2) for sex-specific M. |
Fixed_natmort |
NULL |
Numeric array of fixed natural mortality, either [n_pop × n_regions × n_years × n_ages × n_sexes] or the same with n_seas between years and ages. The 5d form is expanded across seasons, so old scripts still work. Values are rates per year either way, not pre-apportioned amounts: mortality in a season is the rate times seasdur. Required when M_spec = "fix", ignored otherwise. |
NAA_re |
"none" |
Character. State-space numbers at age: the log numbers become parameters for ages two and older, including the plus group, and the deterministic mortality and ageing step becomes the prediction they are penalized against. One of "none" (default, numbers stay deterministic), "iid", "1dar1_a" (autoregression over ages), "1dar1_y" (over years), "2dar1" (separable over both), or "3dcond" and "3dmarg" (a Gaussian Markov random field over age, year and cohort, on the conditional or the marginal variance). Age one belongs to ln_RecDevs and year one at ages two and older to ln_InitDevs, so the three partition the numbers at age rather than overlapping. Which cells are estimated is set by map$ln_NAA and data$n_est_naa_re, never by dim(ln_NAA). The state covers the assessment years only: Do_Population_Projection advances projected numbers deterministically, so a forecast omits this process error, while the closed loop operating model does project the state forward. |
NAA_re_ages
|
NULL
|
Ages the state is estimated over, matched against input_listages by value, not by position. A model whose ages are 0:4 therefore takes NAA_re_ages = c(1, 2, 3, 4) for the full state, and c(0, 1, 2, 3) is an error because age 0 is the first age. NULL (default) uses ages[-1]. Must be a contiguous run: the state is penalized as one rectangular slice, so a gap would leave penalized cells the dynamics never wrote. |
NAA_re_years
|
NULL
|
Calendar years the state is estimated over, matched against input_listyears by value, not by position, so a model starting in 1983 takes 1984 and not 2 for its first state year. NULL (default) uses years[-1]. Must be a contiguous run. |
NAA_re_seasons |
"annual" |
Seasons the state is estimated over. "annual" (the default) puts a state at season one only, so the numbers within a year stay deterministic and the state is a purely annual innovation, which is what the model did before seasons were an option. "all" puts one at the start of every season. An integer vector of season indices selects specific seasons, and unlike NAA_re_ages and NAA_re_years it need not be contiguous: the season dim is only ever independent or unstructured, neither of which reads adjacency. That is the argument to use when only some seasons have observations, since a season with no data returns its prior as its posterior. The age, year and cohort correlations in NAA_pe_pars have no season dim, so every active season shares them within a population, region and sex; the standard deviation is what varies by season, through NAA_sigma_seasblk_spec. |
NAA_re_season |
"iid" |
Character. Correlation across seasons within a year, composed with the other dims the same way. "iid" (the default) leaves the seasonal innovations independent; "us" estimates an unstructured correlation, n_k(n_k-1)/2 parameters over the n_k active seasons. Needs more than one active season. |
NAA_re_season_spec |
"est_all" |
Character controlling how the season correlations are shared, taking the same values as NAA_re_region_spec. |
NAA_re_where
|
NULL
|
Integer matrix [population, region], 1 where the numbers at age state runs and 0 where a population never occupies that region. NULL (default) gives every cell a state. A natal homing population that never reaches a region holds no fish there, so a lognormal state on that cell is undefined and the penalty would take the logarithm of zero. Cells set to 0 are dropped from the map as well as from the penalty, and they need the region and population correlations off. |
NAA_pe_spec |
"est_all" |
Character controlling how the age, year and cohort correlations in NAA_pe_pars are shared, following the package's spec strings. "est_all" (the default) gives a free set per population, region and sex, which for a three region model under "2dar1" is six correlations. "est_shared_p", "est_shared_r" and "est_shared_s" share one dim, "est_shared_p_r", "est_shared_p_s" and "est_shared_r_s" share two, and "est_shared_p_r_s" gives one set for the whole model. "fix" holds them all at their starting values, which is zero correlation unless NAA_pe_pars is passed through starting_values. Sharing a correlation is not the same as correlating the innovations: regions that share \rho still get independent shocks, whereas NAA_re_region = "us" makes the shocks themselves covary. Sharing never changes which cells are estimated, only how many hyperparameters they draw on. |
NAA_sigma_spec |
"est" |
Character, whether the process error standard deviations are estimated ("est", the default) or kept at their starting values ("fix"). The states themselves are always estimated. |
NAA_re_region |
"iid" |
Character. Correlation across regions, composed with whatever NAA_re gives over the age and year grid. "iid" (the default) leaves regions independent; "us" estimates an unstructured correlation, n_r(n_r-1)/2 parameters, placing no shape on how regions covary. Independence is the default deliberately: a flexible correlation manufactures structure from independent data far more readily than it misses real structure. |
NAA_re_region_spec |
"est_all" |
Character controlling how the region correlations are shared, following the package's spec strings: "est_all" (the default) gives a free correlation matrix per population and sex, "est_shared_p" and "est_shared_s" share it over one of those dims, "est_shared_p_s" gives a single matrix for the whole model, and "fix" holds them all. |
NAA_re_pop |
"iid" |
Character. Correlation across populations and across sexes, composed with the region, age and year structures the same way. "iid" (the default) leaves them independent; "us" estimates an unstructured correlation. Both are global to the model rather than varying over the other dims, so a two-sex model spends exactly one parameter on NAA_re_sex = "us". |
NAA_re_sex |
"iid" |
Character. Correlation across populations and across sexes, composed with the region, age and year structures the same way. "iid" (the default) leaves them independent; "us" estimates an unstructured correlation. Both are global to the model rather than varying over the other dims, so a two-sex model spends exactly one parameter on NAA_re_sex = "us". |
NAA_sigma_popblk_spec |
"constant" |
Blocking for the process error standard deviation, each either "constant" (the default) or a list of integer vectors assigning indices to blocks, exactly as the M_*blk_spec arguments do. Blocking shares a standard deviation; it never removes a cell from the state. Only NAA_re = "iid" admits a standard deviation that varies over years or ages: every other form is separable or Markov in a dim, so it has one standard deviation per population, region and sex. The season dim is the exception, because it is whitened outside the age and year density: a season-varying standard deviation works under any NAA_re, and is ruled out only by NAA_re_season = "us", which needs one scale across the dim it correlates. |
NAA_sigma_regionblk_spec |
"constant" |
Blocking for the process error standard deviation, each either "constant" (the default) or a list of integer vectors assigning indices to blocks, exactly as the M_*blk_spec arguments do. Blocking shares a standard deviation; it never removes a cell from the state. Only NAA_re = "iid" admits a standard deviation that varies over years or ages: every other form is separable or Markov in a dim, so it has one standard deviation per population, region and sex. The season dim is the exception, because it is whitened outside the age and year density: a season-varying standard deviation works under any NAA_re, and is ruled out only by NAA_re_season = "us", which needs one scale across the dim it correlates. |
NAA_sigma_yearblk_spec |
"constant" |
Blocking for the process error standard deviation, each either "constant" (the default) or a list of integer vectors assigning indices to blocks, exactly as the M_*blk_spec arguments do. Blocking shares a standard deviation; it never removes a cell from the state. Only NAA_re = "iid" admits a standard deviation that varies over years or ages: every other form is separable or Markov in a dim, so it has one standard deviation per population, region and sex. The season dim is the exception, because it is whitened outside the age and year density: a season-varying standard deviation works under any NAA_re, and is ruled out only by NAA_re_season = "us", which needs one scale across the dim it correlates. |
NAA_sigma_seasblk_spec |
"constant" |
Blocking for the process error standard deviation, each either "constant" (the default) or a list of integer vectors assigning indices to blocks, exactly as the M_*blk_spec arguments do. Blocking shares a standard deviation; it never removes a cell from the state. Only NAA_re = "iid" admits a standard deviation that varies over years or ages: every other form is separable or Markov in a dim, so it has one standard deviation per population, region and sex. The season dim is the exception, because it is whitened outside the age and year density: a season-varying standard deviation works under any NAA_re, and is ruled out only by NAA_re_season = "us", which needs one scale across the dim it correlates. |
NAA_sigma_ageblk_spec |
"constant" |
Blocking for the process error standard deviation, each either "constant" (the default) or a list of integer vectors assigning indices to blocks, exactly as the M_*blk_spec arguments do. Blocking shares a standard deviation; it never removes a cell from the state. Only NAA_re = "iid" admits a standard deviation that varies over years or ages: every other form is separable or Markov in a dim, so it has one standard deviation per population, region and sex. The season dim is the exception, because it is whitened outside the age and year density: a season-varying standard deviation works under any NAA_re, and is ruled out only by NAA_re_season = "us", which needs one scale across the dim it correlates. |
NAA_sigma_sexblk_spec |
"constant" |
Blocking for the process error standard deviation, each either "constant" (the default) or a list of integer vectors assigning indices to blocks, exactly as the M_*blk_spec arguments do. Blocking shares a standard deviation; it never removes a cell from the state. Only NAA_re = "iid" admits a standard deviation that varies over years or ages: every other form is separable or Markov in a dim, so it has one standard deviation per population, region and sex. The season dim is the exception, because it is whitened outside the age and year density: a season-varying standard deviation works under any NAA_re, and is ruled out only by NAA_re_season = "us", which needs one scale across the dim it correlates. |
Setup_Mod_Movement
23 arguments
| Argument | Default | Description |
|---|---|---|
move_type
|
0
|
Integer. Movement model formulation: 0 = unstructured Markov; 1 = CTMC. Default 0. |
do_recruits_move
|
0
|
Integer flag. 0 = age-1 fish do not move (default); movement deviations and CTMC rows for the minimum age are fixed at zero. 1 = recruits participate in movement. |
use_fixed_movement
|
0
|
Integer flag. 0 = estimate movement (default); 1 = fix movement rates to Fixed_Movement and map all movement parameters to NA. |
Fixed_Movement
|
NA
|
Numeric array of externally supplied movement probability matrices, dimensioned [n_pop × n_regions × n_regions × n_years × n_seas × n_ages × n_sexes]. Each [n_regions × n_regions] slice must be row-stochastic (rows sum to 1). Required when use_fixed_movement = 1. If NA (default), an identity matrix (no movement) is constructed internally. |
Use_Movement_Prior
|
0
|
Integer flag. 1 = apply Dirichlet priors to movement row probabilities; 0 = no priors (default). Requires Movement_prior. |
Movement_prior
|
NULL
|
Data frame of Dirichlet prior concentration parameters. Required columns: pop, region_from, year, seas, age, sex, and alpha, where alpha is a list-column with each element a numeric vector of length n_regions giving the Dirichlet concentration for transitions out of region_from. Values near 1 are uninformative; larger values concentrate the prior toward equal movement. Only used when Use_Movement_Prior = 1. |
Movement_popblk_spec |
"constant" |
"constant" (default, shared across all populations) or a list of integer vectors partitioning populations into blocks. Example: list(c(1, 2), 3) shares parameters for populations 1 and 2 and estimates a separate parameter for population 3. Ignored when move_type = 1. |
Movement_ageblk_spec |
"constant" |
"constant" (default) or a list of integer vectors defining age blocks. Example: list(1:4, 5:10) creates a juvenile block (ages 1-4) and an adult block (ages 5-10). Ignored when move_type = 1. |
Movement_yearblk_spec |
"constant" |
"constant" (default) or a list of integer vectors defining year blocks for discrete structural breaks in movement. For residual annual variation, use cont_vary_movement instead. Ignored when move_type = 1. |
Movement_seasblk_spec |
"constant" |
"constant" (default) or a list of integer vectors defining season blocks. Example: list(c(1, 2), c(3, 4)) groups winter/spring and summer/fall. Ignored when move_type = 1. |
Movement_sexblk_spec |
"constant" |
"constant" (default, sex-invariant) or a list of integer vectors defining sex blocks. Example: list(1, 2) estimates sex-specific movement independently. Ignored when move_type = 1. |
cont_vary_movement |
"none" |
Character string specifying the structure of continuous iid movement deviations added on top of the fixed-effect movement surface. Default "none". Options: "none"No deviations. "iid_y"Year-varying; shared across pop, age, sex, season. "iid_a"Age-varying; shared across pop, year, sex, season. "iid_y_a"Year \times age. "iid_y_a_s"Year \times age \times sex. "iid_y_seas_a_s"Year \times season \times age \times sex. "iid_p_y", "iid_p_a", "iid_p_y_a", "iid_p_y_a_s", "iid_p_y_seas_a_s"Population-specific analogs of the above. |
Movement_cont_pe_pars_spec |
"none" |
Character string specifying estimation of process-error variance for cont_vary_movement deviations. One of: "none"No process-error parameters; use with cont_vary_movement = "none". "fix"Parameters initialized but not estimated; fixes deviation variance at its starting value. "est_shared"Single variance estimated, shared across all dimensions. "est_all"All variance parameters estimated independently, dimensioned [n_pop × n_regions × n_seas × n_ages × n_sexes]. |
ctmc_move_dat
|
NULL
|
Data frame required when move_type = 1. Each row corresponds to a unique pop-region-year-season-age-sex combination. Required columns: pop, regions, years, seas, ages, sexes, plus any covariate columns referenced in diffusion_formula or preference_formula. Projection years exceeding n_years are automatically capped to the final estimation year to prevent spline extrapolation. |
adjacency_mat
|
NULL
|
Square numeric matrix [n_regions × n_regions] with 1 indicating an allowed transition and 0 indicating no direct connection. The diagonal must be 0: residency falls out of the generator, and a non-zero diagonal leaves the generator columns summing to something other than zero, so the movement matrix loses abundance rather than redistributing it. A fully connected matrix is 1 - diag(n_regions) (note that diag(1, n_regions) is the identity, not an adjacency matrix). Required for move_type = 1, where it is validated for dimension, 0/1 entries, a zero diagonal, and at least one connection. For move_type = 0 a fully connected matrix is constructed automatically. |
area_r
|
rep(1,
input_listn_regions)
|
Numeric vector of length n_regions giving the area of each region, used to scale CTMC diffusion rates. Required for move_type = 1. Default: rep(1, n_regions). |
diffusion_formula
|
NULL
|
R formula defining the linear predictor for the CTMC diffusion () component (e.g., ~ bs(depth, df = 4)). All right-hand-side variables must be present in ctmc_move_dat. Required for move_type = 1. |
preference_formula
|
NULL
|
R formula defining the linear predictor for the CTMC habitat-preference (taxis, ) component. All variables must be present in ctmc_move_dat. Required for move_type = 1. |
ctmc_diffusion_bounds |
0 |
How the CTMC generator is kept a valid Metzler matrix (non-negative off-diagonal entries) when taxis outweighs diffusion. "softplus" for a softplus of \theta_j + d of width ctmc_diffusion_eps; and "upwind" (or 2) for the discontinuous Galerkin (finite volume) flux \theta_j + \max(d, 0), which has diffusion whole and adds only the down-gradient taxis, so positivity never depends on the two cancelling. |
ctmc_diffusion_eps |
0.1 |
Positive numeric width of the softplus applied when ctmc_diffusion_bounds = "softplus" (default 0.1). An edge where taxis exactly cancels diffusion has eps * log(2), so this sets a floor on exchange as well as smoothing the hinge. |
move_timing
|
0
|
Integer flag setting how movement and mortality are sequenced within a season. 0 = movement then mortality (default, historical SPoRC behavior); 1 = mortality then movement; 2 = continuous, with movement and mortality acting simultaneously via the matrix exponential of Q- (Z). move_timing = 2 requires an estimated CTMC generator, i.e. move_type = 1 and use_fixed_movement = 0. |
ctmc_scale_by_seasdur
|
1
|
Integer flag controlling the time units of the CTMC generator. 1 (default) treats Q as an annual rate, exponentiating Q [s] in each season so that movement and mortality share time units. 0 exponentiates Q once per season regardless of duration. Only has an effect when move_type = 1 and n_seas > 1; forced to 1 when move_timing = 2. |
move_expm_nsub
|
0
|
Integer controlling how matrix exponentials of the CTMC generator are evaluated, both when converting Q to movement fractions and inside the move_timing = 2 seasonal operators. 0 (default) uses Matrix::expm. A power of two n instead uses n implicit (backward Euler) substeps, (I - A/n)^{-n}, evaluated as one linear solve plus _2 n squarings, which is why n must be a power of two. The implicit form has a much cheaper reverse-mode derivative than a matrix exponential, so the gradient is several times faster, but it is a first-order approximation: n = 1 is plain solve(I - A) and is an approximation. |
Setup_Mod_Tagging
19 arguments
| Argument | Default | Description |
|---|---|---|
use_conv_fish_tagging
|
rep(0,
input_listn_fish_fleets)
|
Integer vector [n_fish_fleets] (0/1). Whether conventional tagging data are included in the likelihood for each fishery fleet. Default: 0 for all fleets. |
conv_tag_release_indicator
|
NULL
|
Integer matrix [n_conv_tag_cohorts × 3] giving the release region, year, and season for each tag cohort. Required when any use_conv_fish_tagging = 1. Default NULL. |
conv_tag_max_liberty
|
0
|
Integer. Maximum years-at-liberty included in the likelihood; recaptures beyond this horizon are ignored. Must be > 0 when tagging is active. Default 0. |
conv_tagged_fish
|
NA
|
Array [n_conv_tag_cohorts × n_pop × n_ages × n_sexes] of tagged fish released per cohort. Required when any use_conv_fish_tagging = 1. Dimensions not attended in conv_fish_tag_attr should have all fish placed into index 1 with remaining indices set to zero. Default NA. |
obs_conv_tag_fish_recap
|
NA
|
Array of observed recaptures [conv_tag_max_liberty × n_seas × n_conv_tag_cohorts × n_pop × n_regions × n_ages × n_sexes × n_fish_fleets]. Required when any use_conv_fish_tagging = 1. Default NA. |
conv_fish_tag_like |
NA |
Character string specifying the tag recapture likelihood. One of "Poisson", "NegBin", "Multinomial_Release", "Multinomial_Recapture", "Dirichlet-Multinomial_Release", "Dirichlet-Multinomial_Recapture". Converted to integer codes (0-5) before storage. Default NA. |
conv_tag_mixing_period
|
1
|
Integer. Minimum number of years (or seasons in seasonal models) post-release before recaptures contribute to the likelihood. Allows time for tags to mix within the population before informing movement estimation. Default 1. |
conv_tag_t_tagging
|
1
|
Numeric scalar or vector of length n_conv_tag_cohorts (one value per row of conv_tag_release_indicator), each in [0, 1]. Fraction of the season remaining at tag release for that release event. 1 = start of season; 0.5 = mid-season; 0 = end of season. A scalar is recycled to all release events. Default 1. |
use_conv_tag_fishrep_prior
|
0
|
Integer (0/1). Whether priors are applied to reporting rate parameters. Default 0. |
conv_tag_fishrep_prior
|
NULL
|
Data frame of prior specifications for reporting rates. Required columns: region, block, fleet, mu, sd, type. Ignored when use_conv_tag_fishrep_prior = 0. Default NULL. |
conv_tag_pop_pool |
as.list(1:input_list$data$n_pop) |
List of integer vectors defining population pooling groups for the tagging likelihood. When "p" is not attended in conv_fish_tag_attr, use list(1:n_pop). If the pooling structure is inconsistent with conv_fish_tag_attr, a warning is issued and the structure is automatically overridden to a single group. Default: as.list(1:n_pop) (population-specific). |
conv_tag_age_pool |
as.list(1:length(input_list$data$ages)) |
List of integer vectors defining age pooling groups. When "a" is not attended, use list(1:n_ages). Custom groupings (e.g., list(1:5, 6:10)) are supported when "a" is attended. Default: as.list(1:n_ages). |
conv_tag_sex_pool |
as.list(1:input_list$data$n_sexes) |
List of integer vectors defining sex pooling groups. When "s" is not attended, use list(1:n_sexes). Default: as.list(1:n_sexes). |
init_conv_tag_mort_spec |
NULL |
Character string ("fix", "est_shared", or "est_all"). Whether initial tag-induced mortality is fixed at its starting values, estimated as a single value shared across all release events, or estimated independently for every release event. See do_conv_init_tag_mort_mapping. Default NULL. |
conv_tag_shed_spec |
NULL |
Character string ("fix", "est_shared", or "est_all"). Whether chronic tag shedding is fixed at its starting values, estimated as a single value shared across all release events, or estimated independently for every release event. See do_conv_tag_shed_mapping. Default NULL. |
conv_tagrep_spec |
"fix" |
Character string. Sharing structure for reporting rate parameters conv_tag_fish_reporting_pars [n_regions × max_tagrep_blocks × n_fish_fleets]. See do_conv_tag_fish_reporting_pars_mapping for full option descriptions. Default "fix" (a warning is issued if this was unintentional). |
conv_tag_fish_reporting_blocks |
NULL |
Character vector defining time blocks for fishery tag reporting rates. Each element follows one of: "none_Region_r_Fleet_f"Constant reporting rate for region r and fleet f. "Block_b_Year_y1-y2_Region_r_Fleet_f"Block b applies to years y1-y2. Use "terminal" for the end year to extend to the final model year. Parsed into an array [n_regions × n_years × n_fish_fleets]. If NULL, a single constant block is used for all region-fleet combinations. Default NULL. |
conv_fish_tag_attr |
"p_a_s" |
Character scalar or character vector of length n_conv_tag_cohorts specifying which biological dimensions are attended (resolved) at release for each tag release event. A scalar is recycled to every event; a vector lets different events resolve different dimensions (e.g. event 1 known at "p_a_s", event 2 only at "p_a"). Each element is built from any combination of "p" (population), "a" (age), and "s" (sex), joined by underscores. Region and fleet are always retained. When a dimension is not attended for an event, all released fish for that event are placed into index 1 of that dimension and apportioned to full resolution via the release platform. A dimension may only be split into more than one pooling group if it is attended in every release event; otherwise the corresponding pooling argument is overridden to a single group (with a warning). Valid values: "p_a_s", "a_s", "p_a", "p_s", "a", "s", "p", "none". Default "p_a_s". |
conv_tag_release_platform
|
NULL
|
Character matrix [n_conv_tag_cohorts × 2] specifying the release platform and fleet index per cohort. Same format as in Setup_Sim_Tagging. Default NULL. |
Setup_Mod_Catch_and_F
72 arguments
| Argument | Default | Description |
|---|---|---|
ObsCatch
|
required | Observed aggregated catch array [n_regions x n_years x n_seas x n_fish_fleets]. Values should be in the units specified by catch_units. For a cell with UseCatch == 0 (and no population-specific catch used), an NA entry here is treated as a missing observation; fishing is assumed to have continued and Fmort/ ln_F_devs are estimated normally for that year, whereas a true recorded value (typically 0) is treated as a real closure: Fmort is forced to zero and no deviation is estimated. See Get_Fdev_PE_loglik. |
ObsCatchAA
|
NULL
|
Observed catch at age, an array with dimensions [n_regions, n_years, n_seas, n_ages, n_sexes, n_fish_fleets]. The sex dim is required whatever the fleet reports: a data source summed over sexes has its observation in sex slot one. Supplying this fits the catch at age directly, every age its own lognormal observation, in place of an aggregated catch with compositions. This is the native form for ICES age-structured assessments. The two statements are not interchangeable: the exact factorization of an at-age observation into a total and a composition holds for Poisson and multinomial, not for lognormal, so a fleet must use one or the other and supplying both for the same fleet is an error. NULL (default) leaves the fleet on aggregated catch. |
UseCatchAA
|
NULL
|
Integer array shaped like ObsCatchAA, 1 where an observation is fit and 0 otherwise. A cell that is not fit is also not fished, so this governs closures the way UseCatch does for the aggregated data source. |
ObsCatchAA_SE
|
NULL
|
Reported standard errors shaped like their observation array, read only when the data source’s sigma_form asks for them. |
sigmaCAA_key
|
NULL
|
Integer array [n_ages, n_sexes, n_fish_fleets] coupling the catch at age observation error, the key matrix convention ICES assessments use. Equal entries share a parameter and NA excludes one. The sex dim is required; a key coupling the sexes repeats its entries across them. Along the age dim, 1 2 3 4 5 gives one standard deviation per age, 1 1 2 2 2 gives standard deviations by age group as several ICES assessments do, and 1 1 1 1 1 gives one for the fleet. Defaults to one parameter per fleet, shared across ages and sexes. A parameter informed by fewer than two observations is refused, since an observation error standard deviation with a single observation drives the likelihood to negative infinity rather than failing outright. |
sigmaCAA_spec |
"est" |
Character string, "est" (default) to estimate the coupled standard deviations, or "fix" to hold them at their starting values. Starting values are supplied through ... as ln_sigmaCAA. |
ObsDiscardAA
|
NULL
|
Observed discard at age and its use flags, shaped like ObsCatchAA. The discard counterpart of catch at age. |
UseDiscardAA
|
NULL
|
Observed discard at age and its use flags, shaped like ObsCatchAA. The discard counterpart of catch at age. |
ObsDiscardAA_SE
|
NULL
|
Reported standard errors shaped like their observation array, read only when the data source’s sigma_form asks for them. |
ObsDiscardAA_pop
|
NULL
|
Population-specific counterparts, with a leading population dimension. |
UseDiscardAA_pop
|
NULL
|
Population-specific counterparts, with a leading population dimension. |
ObsDiscardAA_pop_SE
|
NULL
|
Reported standard errors shaped like their observation array, read only when the data source’s sigma_form asks for them. |
ObsCatchAA_pop
|
NULL
|
Population-specific counterparts, with a leading population dimension. |
UseCatchAA_pop
|
NULL
|
Population-specific counterparts, with a leading population dimension. |
ObsCatchAA_pop_SE
|
NULL
|
Reported standard errors shaped like their observation array, read only when the data source’s sigma_form asks for them. |
sigmaCAA_pop_key
|
NULL
|
Integer arrays coupling the observation error for the population-specific catch, the discards, and the population-specific discards, following the same convention as sigmaCAA_key. sigmaDAA_key is shaped [n_ages, n_sexes, n_fish_fleets]; the two population-specific keys take a leading population dim, [n_pop, n_ages, n_sexes, n_fish_fleets]. |
sigmaCAA_pop_spec |
"est" |
"est" or "fix". |
sigmaDAA_key
|
NULL
|
Integer arrays coupling the observation error for the population-specific catch, the discards, and the population-specific discards, following the same convention as sigmaCAA_key. sigmaDAA_key is shaped [n_ages, n_sexes, n_fish_fleets]; the two population-specific keys take a leading population dim, [n_pop, n_ages, n_sexes, n_fish_fleets]. |
sigmaDAA_spec |
"est" |
"est" or "fix". |
sigmaDAA_pop_key
|
NULL
|
Integer arrays coupling the observation error for the population-specific catch, the discards, and the population-specific discards, following the same convention as sigmaCAA_key. sigmaDAA_key is shaped [n_ages, n_sexes, n_fish_fleets]; the two population-specific keys take a leading population dim, [n_pop, n_ages, n_sexes, n_fish_fleets]. |
sigmaDAA_pop_spec |
"est" |
"est" or "fix". |
CatchAA_Type |
"spltRaggS" |
Which dims the fleet reports separately, following the composition vocabulary. Give it as one setting for every fleet, one per fleet, or as year and fleet specifications such as "spltRaggS_Year_1-20_Fleet_1" when the setting changes part way through the series. "agg" sums over regions and sexes, "spltRaggS" (default) splits regions and sums over sexes, "aggRspltS" does the reverse, and "spltRspltS" splits both. An observation summed over a dim belongs in slot one of it. |
CatchAA_pop_Type |
"spltRaggS" |
Which dims the fleet reports separately, following the composition vocabulary. Give it as one setting for every fleet, one per fleet, or as year and fleet specifications such as "spltRaggS_Year_1-20_Fleet_1" when the setting changes part way through the series. "agg" sums over regions and sexes, "spltRaggS" (default) splits regions and sums over sexes, "aggRspltS" does the reverse, and "spltRspltS" splits both. An observation summed over a dim belongs in slot one of it. |
DiscardAA_Type |
"spltRaggS" |
Which dims the fleet reports separately, following the composition vocabulary. Give it as one setting for every fleet, one per fleet, or as year and fleet specifications such as "spltRaggS_Year_1-20_Fleet_1" when the setting changes part way through the series. "agg" sums over regions and sexes, "spltRaggS" (default) splits regions and sums over sexes, "aggRspltS" does the reverse, and "spltRspltS" splits both. An observation summed over a dim belongs in slot one of it. |
DiscardAA_pop_Type |
"spltRaggS" |
Which dims the fleet reports separately, following the composition vocabulary. Give it as one setting for every fleet, one per fleet, or as year and fleet specifications such as "spltRaggS_Year_1-20_Fleet_1" when the setting changes part way through the series. "agg" sums over regions and sexes, "spltRaggS" (default) splits regions and sums over sexes, "aggRspltS" does the reverse, and "spltRspltS" splits both. An observation summed over a dim belongs in slot one of it. |
Catch_seas_Type |
NULL |
Whether a seasonal model reports this data source once a season or once a year. One value for every fleet or one per fleet. "spltSeas"Fit the observation against the prediction for the season it sits in. This is the default and what every data source did before this setting existed. "aggSeas"Sum the prediction over every season of the year and fit it against a single observation, which is how a fleet that lands catch all year but reports one annual total is usually recorded. Under "aggSeas" the observation still lives in whichever season it was placed in, and exactly one season per region and year may be turned on in the matching Use array; more than one is an error, because each would be fit against the same year total. The likelihood and the reported negative log likelihood land in that season. Fishing mortality is still estimated season by season, so a fleet with one annual observation and free seasonal deviations leaves the split between seasons unidentified: share the deviations or fix the seasonal pattern. |
Catch_pop_seas_Type |
NULL |
Whether a seasonal model reports this data source once a season or once a year. One value for every fleet or one per fleet. "spltSeas"Fit the observation against the prediction for the season it sits in. This is the default and what every data source did before this setting existed. "aggSeas"Sum the prediction over every season of the year and fit it against a single observation, which is how a fleet that lands catch all year but reports one annual total is usually recorded. Under "aggSeas" the observation still lives in whichever season it was placed in, and exactly one season per region and year may be turned on in the matching Use array; more than one is an error, because each would be fit against the same year total. The likelihood and the reported negative log likelihood land in that season. Fishing mortality is still estimated season by season, so a fleet with one annual observation and free seasonal deviations leaves the split between seasons unidentified: share the deviations or fix the seasonal pattern. |
Discard_seas_Type |
NULL |
Whether a seasonal model reports this data source once a season or once a year. One value for every fleet or one per fleet. "spltSeas"Fit the observation against the prediction for the season it sits in. This is the default and what every data source did before this setting existed. "aggSeas"Sum the prediction over every season of the year and fit it against a single observation, which is how a fleet that lands catch all year but reports one annual total is usually recorded. Under "aggSeas" the observation still lives in whichever season it was placed in, and exactly one season per region and year may be turned on in the matching Use array; more than one is an error, because each would be fit against the same year total. The likelihood and the reported negative log likelihood land in that season. Fishing mortality is still estimated season by season, so a fleet with one annual observation and free seasonal deviations leaves the split between seasons unidentified: share the deviations or fix the seasonal pattern. |
Discard_pop_seas_Type |
NULL |
Whether a seasonal model reports this data source once a season or once a year. One value for every fleet or one per fleet. "spltSeas"Fit the observation against the prediction for the season it sits in. This is the default and what every data source did before this setting existed. "aggSeas"Sum the prediction over every season of the year and fit it against a single observation, which is how a fleet that lands catch all year but reports one annual total is usually recorded. Under "aggSeas" the observation still lives in whichever season it was placed in, and exactly one season per region and year may be turned on in the matching Use array; more than one is an error, because each would be fit against the same year total. The likelihood and the reported negative log likelihood land in that season. Fishing mortality is still estimated season by season, so a fleet with one annual observation and free seasonal deviations leaves the split between seasons unidentified: share the deviations or fix the seasonal pattern. |
CatchAA_seas_Type |
NULL |
Whether a seasonal model reports this data source once a season or once a year. One value for every fleet or one per fleet. "spltSeas"Fit the observation against the prediction for the season it sits in. This is the default and what every data source did before this setting existed. "aggSeas"Sum the prediction over every season of the year and fit it against a single observation, which is how a fleet that lands catch all year but reports one annual total is usually recorded. Under "aggSeas" the observation still lives in whichever season it was placed in, and exactly one season per region and year may be turned on in the matching Use array; more than one is an error, because each would be fit against the same year total. The likelihood and the reported negative log likelihood land in that season. Fishing mortality is still estimated season by season, so a fleet with one annual observation and free seasonal deviations leaves the split between seasons unidentified: share the deviations or fix the seasonal pattern. |
CatchAA_pop_seas_Type |
NULL |
Whether a seasonal model reports this data source once a season or once a year. One value for every fleet or one per fleet. "spltSeas"Fit the observation against the prediction for the season it sits in. This is the default and what every data source did before this setting existed. "aggSeas"Sum the prediction over every season of the year and fit it against a single observation, which is how a fleet that lands catch all year but reports one annual total is usually recorded. Under "aggSeas" the observation still lives in whichever season it was placed in, and exactly one season per region and year may be turned on in the matching Use array; more than one is an error, because each would be fit against the same year total. The likelihood and the reported negative log likelihood land in that season. Fishing mortality is still estimated season by season, so a fleet with one annual observation and free seasonal deviations leaves the split between seasons unidentified: share the deviations or fix the seasonal pattern. |
DiscardAA_seas_Type |
NULL |
Whether a seasonal model reports this data source once a season or once a year. One value for every fleet or one per fleet. "spltSeas"Fit the observation against the prediction for the season it sits in. This is the default and what every data source did before this setting existed. "aggSeas"Sum the prediction over every season of the year and fit it against a single observation, which is how a fleet that lands catch all year but reports one annual total is usually recorded. Under "aggSeas" the observation still lives in whichever season it was placed in, and exactly one season per region and year may be turned on in the matching Use array; more than one is an error, because each would be fit against the same year total. The likelihood and the reported negative log likelihood land in that season. Fishing mortality is still estimated season by season, so a fleet with one annual observation and free seasonal deviations leaves the split between seasons unidentified: share the deviations or fix the seasonal pattern. |
DiscardAA_pop_seas_Type |
NULL |
Whether a seasonal model reports this data source once a season or once a year. One value for every fleet or one per fleet. "spltSeas"Fit the observation against the prediction for the season it sits in. This is the default and what every data source did before this setting existed. "aggSeas"Sum the prediction over every season of the year and fit it against a single observation, which is how a fleet that lands catch all year but reports one annual total is usually recorded. Under "aggSeas" the observation still lives in whichever season it was placed in, and exactly one season per region and year may be turned on in the matching Use array; more than one is an error, because each would be fit against the same year total. The likelihood and the reported negative log likelihood land in that season. Fishing mortality is still estimated season by season, so a fleet with one annual observation and free seasonal deviations leaves the split between seasons unidentified: share the deviations or fix the seasonal pattern. |
CatchAA_LikeType |
"lognormal" |
"lognormal" (default) or "normal", one setting for every fleet or one per fleet. |
CatchAA_pop_LikeType |
"lognormal" |
"lognormal" (default) or "normal", one setting for every fleet or one per fleet. |
DiscardAA_LikeType |
"lognormal" |
"lognormal" (default) or "normal", one setting for every fleet or one per fleet. |
DiscardAA_pop_LikeType |
"lognormal" |
"lognormal" (default) or "normal", one setting for every fleet or one per fleet. |
CatchAA_sigma_form |
"none" |
Where the observation error comes from. "none" (default) uses the estimated parameter alone, "data" the reported standard errors alone, and "est_additive" or "est_quadrature" both. Naming "data" holds the parameter fixed, since nothing reads it. |
CatchAA_pop_sigma_form |
"none" |
Where the observation error comes from. "none" (default) uses the estimated parameter alone, "data" the reported standard errors alone, and "est_additive" or "est_quadrature" both. Naming "data" holds the parameter fixed, since nothing reads it. |
DiscardAA_sigma_form |
"none" |
Where the observation error comes from. "none" (default) uses the estimated parameter alone, "data" the reported standard errors alone, and "est_additive" or "est_quadrature" both. Naming "data" holds the parameter fixed, since nothing reads it. |
DiscardAA_pop_sigma_form |
"none" |
Where the observation error comes from. "none" (default) uses the estimated parameter alone, "data" the reported standard errors alone, and "est_additive" or "est_quadrature" both. Naming "data" holds the parameter fixed, since nothing reads it. |
AgeObsCorr_catch |
"iid" |
Correlation across ages within a cell, one setting for every fleet or one per fleet. "iid" (default) treats ages as independent, "1dar1" correlates them as an AR(1) in age distance, "us" estimates an unstructured correlation across ages, and "2dar1" correlates over ages and years jointly through a separable AR(1), which requires the fleet's observed ages and years to form a complete grid. A cell with a single observed age falls back to independent. The population-specific data sources have their own settings rather than borrowing the aggregated ones. The fishery and survey index data sources are set in Setup_Mod_FishIdx_and_Comps and Setup_Mod_SrvIdx_and_Comps. |
AgeObsCorr_catch_pop |
"iid" |
Correlation across ages within a cell, one setting for every fleet or one per fleet. "iid" (default) treats ages as independent, "1dar1" correlates them as an AR(1) in age distance, "us" estimates an unstructured correlation across ages, and "2dar1" correlates over ages and years jointly through a separable AR(1), which requires the fleet's observed ages and years to form a complete grid. A cell with a single observed age falls back to independent. The population-specific data sources have their own settings rather than borrowing the aggregated ones. The fishery and survey index data sources are set in Setup_Mod_FishIdx_and_Comps and Setup_Mod_SrvIdx_and_Comps. |
AgeObsCorr_discard |
"iid" |
Correlation across ages within a cell, one setting for every fleet or one per fleet. "iid" (default) treats ages as independent, "1dar1" correlates them as an AR(1) in age distance, "us" estimates an unstructured correlation across ages, and "2dar1" correlates over ages and years jointly through a separable AR(1), which requires the fleet's observed ages and years to form a complete grid. A cell with a single observed age falls back to independent. The population-specific data sources have their own settings rather than borrowing the aggregated ones. The fishery and survey index data sources are set in Setup_Mod_FishIdx_and_Comps and Setup_Mod_SrvIdx_and_Comps. |
AgeObsCorr_discard_pop |
"iid" |
Correlation across ages within a cell, one setting for every fleet or one per fleet. "iid" (default) treats ages as independent, "1dar1" correlates them as an AR(1) in age distance, "us" estimates an unstructured correlation across ages, and "2dar1" correlates over ages and years jointly through a separable AR(1), which requires the fleet's observed ages and years to form a complete grid. A cell with a single observed age falls back to independent. The population-specific data sources have their own settings rather than borrowing the aggregated ones. The fishery and survey index data sources are set in Setup_Mod_FishIdx_and_Comps and Setup_Mod_SrvIdx_and_Comps. |
rho_catch_spec |
NULL |
How each data source's correlation parameters are shared, using the same spec strings as sigmaF_spec and Fdev_rho_spec. The correlations sit over region, sex and fleet, with a leading population dim for the population-specific data sources, so "est_shared_r_s" gives one per fleet, "est_shared_s" one per region and fleet, "est_shared_r_s_f" a single value, "est_all" one per cell, and "fix" holds them. NULL (the default) takes "est_shared_r_s", or "est_shared_p_r_s" for the population data sources, both one per fleet. The spec governs the across-age correlation, the across-year correlation and the unstructured matrix together, so fleets sharing under "us" share a whole matrix. A region, sex or population a fleet never observes has no parameter, which is what holds the unused slots of a summed dim out. |
rho_catch_pop_spec |
NULL |
How each data source's correlation parameters are shared, using the same spec strings as sigmaF_spec and Fdev_rho_spec. The correlations sit over region, sex and fleet, with a leading population dim for the population-specific data sources, so "est_shared_r_s" gives one per fleet, "est_shared_s" one per region and fleet, "est_shared_r_s_f" a single value, "est_all" one per cell, and "fix" holds them. NULL (the default) takes "est_shared_r_s", or "est_shared_p_r_s" for the population data sources, both one per fleet. The spec governs the across-age correlation, the across-year correlation and the unstructured matrix together, so fleets sharing under "us" share a whole matrix. A region, sex or population a fleet never observes has no parameter, which is what holds the unused slots of a summed dim out. |
rho_discard_spec |
NULL |
How each data source's correlation parameters are shared, using the same spec strings as sigmaF_spec and Fdev_rho_spec. The correlations sit over region, sex and fleet, with a leading population dim for the population-specific data sources, so "est_shared_r_s" gives one per fleet, "est_shared_s" one per region and fleet, "est_shared_r_s_f" a single value, "est_all" one per cell, and "fix" holds them. NULL (the default) takes "est_shared_r_s", or "est_shared_p_r_s" for the population data sources, both one per fleet. The spec governs the across-age correlation, the across-year correlation and the unstructured matrix together, so fleets sharing under "us" share a whole matrix. A region, sex or population a fleet never observes has no parameter, which is what holds the unused slots of a summed dim out. |
rho_discard_pop_spec |
NULL |
How each data source's correlation parameters are shared, using the same spec strings as sigmaF_spec and Fdev_rho_spec. The correlations sit over region, sex and fleet, with a leading population dim for the population-specific data sources, so "est_shared_r_s" gives one per fleet, "est_shared_s" one per region and fleet, "est_shared_r_s_f" a single value, "est_all" one per cell, and "fix" holds them. NULL (the default) takes "est_shared_r_s", or "est_shared_p_r_s" for the population data sources, both one per fleet. The spec governs the across-age correlation, the across-year correlation and the unstructured matrix together, so fleets sharing under "us" share a whole matrix. A region, sex or population a fleet never observes has no parameter, which is what holds the unused slots of a summed dim out. |
UseCatch
|
required | Binary indicator array [n_regions x n_years x n_seas x n_fish_fleets] controlling which aggregated catch observations enter the likelihood and whether ln_F_devs are estimated for each cell. 1 = use; 0 = exclude, unless ObsCatch is NA at that cell (see ObsCatch above), in which case ln_F_devs is still estimated as an ordinary active year despite not being fit against an observation. |
catch_units |
array("biom", dim = c(input_list$data$n_fish_fleets)) |
Character array [n_fish_fleets] specifying catch units per fleet. "biom" = biomass (default); "abd" = abundance. Converted internally to 0/1 integer codes. |
UseCatch_pop
|
array(0, dim =
c(input_listn_pop,
input_listn_regions,
length(input_listyears),
input_listn_seas,
input_listn_fish_fleets))
|
Binary indicator array [n_pop x n_regions x n_years x n_seas x n_fish_fleets] controlling which population-specific catch observations enter the likelihood. 1 = use; 0 = exclude. |
ObsCatch_pop
|
NULL
|
Observed population-specific catch array [n_pop x n_regions x n_years x n_seas x n_fish_fleets]. Values should be in the units specified by catch_units. |
Use_F_pen
|
1
|
Integer flag for applying a fishing mortality penalty to penalize large deviations in ln_F_devs. 1 = apply (default); 0 = do not apply. |
sigmaC_spec |
"fix" |
Character string specifying the sharing structure for ln_sigmaC (aggregated catch observation error SD). Default "fix" holds ln_sigmaC at its starting value (log(0.01) unless overridden via ...). Sharing options follow the convention "est_shared_<dims>" where <dims> is an underscore-separated list of dimensions to collapse: "r" (regions), "y" (years), "seas" (seasons), "f" (fleets), or any combination (e.g., "est_shared_r_y", "est_shared_r_y_seas_f"). Use "est_all" for a fully independent parameter per cell. A warning is issued if "fix" is selected without providing a starting value in .... |
sigmaC_pop_spec |
"fix" |
Character string specifying the sharing structure for ln_sigmaC_pop (population-specific catch observation error SD). Default "fix" holds ln_sigmaC_pop at its starting value (log(0.01) unless overridden via ...). Sharing options follow the same convention as sigmaC_spec but with an additional population dimension: e.g., "est_shared_pop" shares across populations, "est_shared_pop_r" shares across populations and regions, and "est_shared_pop_r_y_seas_f" collapses all dimensions into a single parameter. A warning is issued if "fix" is selected without providing a starting value in .... |
sigmaF_spec |
"fix" |
Character string specifying the sharing structure for ln_sigmaF (fishing mortality process error SD). Default "fix" holds ln_sigmaF at its starting value (log(1), i.e., \sigma_F = 1, unless overridden via ...). A warning is issued if "fix" is selected without providing a starting value in .... |
Fdev_model |
"iid" |
Character string specifying the process error structure for ln_F_devs. One of "iid" (default; independent deviations), "rw" (random walk; the first catch-active year per region/season/fleet is initialized with a diffuse N(0,5) prior), or "ar1" (first-order autoregressive; the first catch-active year is drawn from its stationary marginal distribution, and Fdev_rho_spec controls the AR1 correlation parameter). Catch-active years do not need to be contiguous for "rw" or "ar1": the transition between two active years spanning a gap of d closed years is taken over the elapsed gap directly (the same marginal transition as estimating deviations for the closed years and integrating them out, without actually estimating them), see Get_Fdev_PE_loglik. A warning is issued if "rw" or "ar1" is selected but Use_F_pen = 0 (the penalty is never evaluated, so the process structure has no effect), sigmaF_spec = "fix" (the process error SD is not estimated), or (for "ar1") Fdev_rho_spec = "fix" (the correlation is not estimated), any of these may be intentional, but are common oversights when switching away from "iid". |
Fdev_pen_center |
"fixed" |
Where the fishing mortality deviation penalty is centered. "fixed" (default) centers on zero, constraining both the level and the spread of the deviations. "own_mean" centers on the mean of the estimated deviations, penalizing only their spread and leaving the level free, which is what a sum of squares about the series' own mean amounts to. Under a mean-plus-deviations parameterization the level is already set by ln_F_mean, so "own_mean" avoids penalizing it twice; note that it also leaves ln_F_mean and the deviations' level mutually unidentified unless one of them is fixed, which ln_F_mean_spec = "fix" does. |
Fdev_rho_spec |
"fix" |
Character string specifying the sharing structure for the AR1 correlation parameter Fdev_rho, following the same convention as sigmaF_spec. Only used when Fdev_model = "ar1"; ignored (and mapped entirely to NA) otherwise. |
ObsDiscard
|
NULL
|
Observed aggregated discard array [n_regions x n_years x n_seas x n_fish_fleets]. Values should be in the units specified by discard_units. Default: NULL (no discard observations). |
UseDiscard
|
array(0, dim =
c(input_listn_regions,
length(input_listyears),
input_listn_seas,
input_listn_fish_fleets))
|
Binary indicator array [n_regions x n_years x n_seas x n_fish_fleets] controlling which aggregated discard observations enter the likelihood. 1 = use; 0 = exclude. Default: all zeros. |
discard_units |
array("biom_frac", dim = c(input_list$data$n_fish_fleets)) |
Character array [n_fish_fleets] specifying discard units per fleet. "abd" = abundance (0), "biom" = biomass (1), "abd_frac" = abundance fraction (2), "biom_frac" = biomass fraction (3, default). Converted internally to integer codes. |
UseDiscard_pop
|
array(0, dim =
c(input_listn_pop,
input_listn_regions,
length(input_listyears),
input_listn_seas,
input_listn_fish_fleets))
|
Binary indicator array [n_pop x n_regions x n_years x n_seas x n_fish_fleets] controlling which population-specific discard observations enter the likelihood. 1 = use; 0 = exclude. Default: all zeros. |
ObsDiscard_pop
|
NULL
|
Observed population-specific discard array [n_pop x n_regions x n_years x n_seas x n_fish_fleets]. Values should be in the units specified by discard_units. Default: NULL (no population-specific discard observations). |
Use_dmr_pen |
0 |
Integer flag for applying a discard mortality rate penalty to penalize large deviations in logit_dmr_devs. 1 = apply; 0 = do not apply (default). Must be 1 when dmr_dev_spec = "est_all" and 0 when dmr_dev_spec = "fix". |
sigmaD_spec |
"fix" |
Character string specifying the sharing structure for ln_sigmaD (aggregated discard observation error SD). Default "fix" holds ln_sigmaD at its starting value (log(0.01) unless overridden via ...). Sharing options follow the same convention as sigmaC_spec. A warning is issued if "fix" is selected without providing a starting value in .... |
sigmaD_pop_spec |
"fix" |
Character string specifying the sharing structure for ln_sigmaD_pop (population-specific discard observation error SD). Default "fix" holds ln_sigmaD_pop at its starting value (log(0.01) unless overridden via ...). Sharing options follow the same convention as sigmaC_pop_spec. A warning is issued if "fix" is selected without providing a starting value in .... |
sigma_dmr_spec |
"fix" |
Character string specifying the sharing structure for ln_sigma_dmr (discard mortality rate process error SD). Default "fix" holds ln_sigma_dmr at its starting value (log(1) unless overridden via ...). Sharing options follow the same convention as sigmaF_spec. A warning is issued if "fix" is selected without providing a starting value in .... |
dmr_mean_spec |
"fix" |
Character string specifying the sharing/estimation structure for logit_dmr_mean (logit-scale mean discard mortality rate). Default "fix" holds at its starting value (0, i.e., DMR = 0.5 on the natural scale, unless overridden via ...). See do_dmr_mean_mapping for sharing options. |
dmr_dev_spec |
"fix" |
Character string specifying the sharing/estimation structure for logit_dmr_devs (logit-scale annual discard mortality rate deviations). Default "fix" holds deviations at zero (unless overridden via ...). Use "est_all" to estimate a deviation in every fished cell; requires Use_dmr_pen = 1. See do_dmr_dev_mapping for sharing options. |
ln_F_mean_spec |
"est" |
Character string, matched by exact name only because it sits after .... "est" (default, the previous and only behavior) or "fix". "fix" maps ln_F_mean off at its starting value, which defaults to 0 under this spec unless supplied through ..., so the deviations have all of log fishing mortality: F = exp(ln_F_devs), where it follows a free annual log-F parameterization. It must be paired with Fdev_pen_center = "own_mean" (penalize only the spread about the deviations' own mean), Fdev_model = "rw", or Use_F_pen = 0: an "iid" or "ar1" penalty centered on a fixed zero mean would shrink the deviations toward F = 1, so that combination is rejected at setup. "est" keeps the mean-plus-deviations form, where the "iid" penalty shrinks each year toward the estimated average F. |
Setup_Mod_FishIdx_and_Comps
77 arguments
| Argument | Default | Description |
|---|---|---|
ObsFishIdx
|
required | Observed fishery CPUE or biomass index array [n_regions × n_years × n_seas × n_fish_fleets]. |
ObsFishIdx_SE
|
required | Standard errors of ObsFishIdx on the log scale, same dimensions as ObsFishIdx. |
sigmaFishIdx_spec |
"fix" |
Character string controlling the estimated component of the aggregated fishery index observation error, one value per fleet. One of: "fix"The reported standard errors are used as they are and ln_sigmaFishIdx is not estimated. The default. "est_additive"Total standard deviation is the reported standard error plus an estimated component, the additive extra standard deviation convention. "est_quadrature"Total standard deviation is the reported standard error and the estimated component added in quadrature, treating them as independent variances. "est_replace"An estimated standard deviation replaces the reported standard errors entirely. An estimated component is confounded with a likelihood weight, since a weight on a normal likelihood is the same statement as dividing the variance by that weight. Setup_Mod_Weighting warns when both are used. Fleets with a multivariate normal index likelihood take their scale from the supplied covariance and cannot have one, which is an error rather than a silently unidentified parameter. |
sigmaFishIdx_map
|
NULL
|
Optional integer vector of length n_fish_fleets giving the estimation groups for ln_sigmaFishIdx. Fleets sharing a value share a parameter and NA holds a fleet at its starting value. Defaults to one free parameter per fleet. Use it when a reference assessment estimated some fleets and pinned others at a bound. |
sigmaFishIdx_pop_spec |
"fix" |
Character string controlling the estimated component of the population-specific fishery index observation error, one value per fleet. One of: "fix"The reported standard errors are used as they are and ln_sigmaFishIdx_pop is not estimated. The default. "est_additive"Total standard deviation is the reported standard error plus an estimated component, the additive extra standard deviation convention. "est_quadrature"Total standard deviation is the reported standard error and the estimated component added in quadrature, treating them as independent variances. "est_replace"An estimated standard deviation replaces the reported standard errors entirely. An estimated component is confounded with a likelihood weight, since a weight on a normal likelihood is the same statement as dividing the variance by that weight. Setup_Mod_Weighting warns when both are used. Fleets with a multivariate normal index likelihood take their scale from the supplied covariance and cannot have one, which is an error rather than a silently unidentified parameter. |
sigmaFishIdx_pop_map
|
NULL
|
Optional integer vector of length n_fish_fleets giving the estimation groups for ln_sigmaFishIdx_pop. Fleets sharing a value share a parameter and NA holds a fleet at its starting value. Defaults to one free parameter per fleet. Use it when a reference assessment estimated some fleets and pinned others at a bound. |
ObsFishIdx_pop
|
NULL
|
Observed population-specific fishery index array [n_pop × n_regions × n_years × n_seas × n_fish_fleets]. |
ObsFishIdx_pop_SE
|
NULL
|
Lognormal standard errors for ObsFishIdx_pop, same dimensions [n_pop × n_regions × n_years × n_seas × n_fish_fleets]. |
UseFishIdx_pop
|
array(0, dim =
c(input_listn_pop,
input_listn_regions,
length(input_listyears),
input_listn_seas,
input_listn_fish_fleets))
|
Binary indicator array [n_pop × n_regions × n_years × n_seas × n_fish_fleets]. 1 = include population-specific index in likelihood; 0 = exclude. Default: all zeros. |
fish_idx_type |
required | Character vector of length n_fish_fleets specifying the index type for each fleet. "biom" = biomass; "abd" = abundance; "none" = no index for this fleet. |
t_fish
|
array(0, dim =
c(input_listn_regions,
input_listn_seas,
input_listn_fish_fleets))
|
Array [n_regions x n_seas x n_fish_fleets] giving the fishery index timing: the fraction of the season elapsed when each index is observed. Numbers at age are decayed by exp(-t_fish * ZAA) before the index is formed, the same convention t_srv uses for surveys. Defaults to 0 (start of season), which is what the model did before this argument existed; set 0.5 for a mid-season index. |
FishLenComps_sel |
rep("age", input_list$data$n_fish_fleets) |
Character vector [n_fish_fleets], whether a length-based selectivity is applied before or after the fish are spread over lengths. "age" (default) selects at age and spreads the catch afterwards, so every fish of an age is equally catchable and the length composition within an age is just the key's. "length" spreads the fish at each age over the key first and selects them length by length, so the long fish of an age are taken more often. The key is the fleet's own, at t_fish. Requires length-based fishery selectivity. Use "length" when selectivity is length based and the length compositions are what inform it. The two give different expected compositions, not two roundings of the same one. |
fish_waa_selected
|
rep(0,
input_listn_fish_fleets)
|
Integer vector [n_fish_fleets] (0/1). With weight at age derived from growth and length-based selectivity, 1 makes the fleet’s catch biomass use the mean weight of the fish it takes at each age, _l P(l a) s(l) w(l) / _l P(l a) s(l), instead of the population mean weight at that age. Use it when the gear selects strongly within an age. With flat or age-based selectivity the two are the same. |
UseFishIdx
|
required | Binary indicator array [n_regions × n_years × n_seas × n_fish_fleets]. 1 = include index in the likelihood; 0 = exclude. |
ObsFishAgeComps
|
required | Observed fishery age composition array [n_regions × n_years × n_seas × n_ages × n_sexes × n_fish_fleets]. Values may be raw counts or proportions; if proportions, supply ISS_FishAgeComps explicitly. |
UseFishAgeComps
|
required | Binary indicator array [n_regions × n_years × n_seas × n_fish_fleets]. 1 = fit age compositions; 0 = exclude. |
ISS_FishAgeComps
|
NULL
|
Input sample size array [n_regions × n_years × n_seas × n_sexes × n_fish_fleets]. If NULL (default), computed automatically by summing ObsFishAgeComps within each year-fleet-season-region cell according to FishAgeComps_Type. |
ObsFishLenComps
|
required | Observed fishery length composition array [n_regions × n_years × n_seas × n_lens × n_sexes × n_fish_fleets]. Only required when input_listfit_lengths == 1. |
UseFishLenComps
|
required | Binary indicator array [n_regions × n_years × n_seas × n_fish_fleets]. 1 = fit length compositions; 0 = exclude. |
ISS_FishLenComps
|
NULL
|
Input sample size array for length compositions [n_regions × n_years × n_seas × n_sexes × n_fish_fleets]. If NULL (default), derived automatically from ObsFishLenComps. |
FishAgeComps_LikeType |
required | Character vector of length n_fish_fleets specifying the likelihood for fishery age compositions. Options: "Multinomial", "Dirichlet-Multinomial", "iid-Logistic-Normal", "1d-Logistic-Normal", "2d-Logistic-Normal", "iid-Logistic-Normal-miss0", "1d-Logistic-Normal-miss0", "2d-Logistic-Normal-miss0", "none". |
FishLenComps_LikeType
|
required | Same as FishAgeComps_LikeType but for length compositions. |
FishAgeComps_Type |
required | Character vector defining the age composition structure (aggregation level) for each fleet and time period. Each element must follow the format "<type>_Year_<start>-<end>_Fleet_<f>" or "<type>_Year_<start>-terminal_Fleet_<f>". Valid types: "agg"Aggregated across regions and sexes (incompatible with "2d-Logistic-Normal"). "spltRspltS"Split by region and sex. "spltRjntS"Split by region, summed jointly across sexes. "none"No composition data for this fleet and period. Example: c("spltRjntS_Year_1-10_Fleet_1", "agg_Year_11-terminal_Fleet_1"). |
FishLenComps_Type
|
required | Same format and options as FishAgeComps_Type but applied to length compositions. |
ObsFishAgeComps_pop
|
NULL
|
Observed population-specific fishery age composition array [n_pop × n_regions × n_years × n_seas × n_ages × n_sexes × n_fish_fleets]. Required when any element of UseFishAgeComps_pop is 1. |
UseFishAgeComps_pop
|
array(0, dim =
c(input_listn_pop,
input_listn_regions,
length(input_listyears),
input_listn_seas,
input_listn_fish_fleets))
|
Binary indicator array [n_pop × n_regions × n_years × n_seas × n_fish_fleets]. 1 = fit population-specific age compositions; 0 = exclude. Default: all zeros. |
ISS_FishAgeComps_pop
|
NULL
|
Input sample size array for population-specific age compositions [n_pop × n_regions × n_years × n_seas × n_sexes × n_fish_fleets]. If NULL (default), computed automatically by summing ObsFishAgeComps_pop within each population-year-fleet-season-region cell according to FishAgeComps_pop_Type. |
ObsFishLenComps_pop
|
NULL
|
Observed population-specific fishery length composition array [n_pop × n_regions × n_years × n_seas × n_lens × n_sexes × n_fish_fleets]. Required when input_listfit_lengths == 1 and any element of UseFishLenComps_pop is 1. |
UseFishLenComps_pop
|
array(0, dim =
c(input_listn_pop,
input_listn_regions,
length(input_listyears),
input_listn_seas,
input_listn_fish_fleets))
|
Binary indicator array [n_pop × n_regions × n_years × n_seas × n_fish_fleets]. 1 = fit population-specific length compositions; 0 = exclude. Default: all zeros. |
ISS_FishLenComps_pop
|
NULL
|
Input sample size array for population-specific length compositions [n_pop × n_regions × n_years × n_seas × n_sexes × n_fish_fleets]. If NULL (default), derived automatically from ObsFishLenComps_pop. |
FishAgeComps_pop_LikeType |
rep("none", input_list$data$n_fish_fleets) |
Character vector of length n_fish_fleets specifying the likelihood for population-specific fishery age compositions. Same options as FishAgeComps_LikeType. Default: "none" for all fleets. |
FishLenComps_pop_LikeType |
rep("none", input_list$data$n_fish_fleets) |
Character vector of length n_fish_fleets specifying the likelihood for population-specific fishery length compositions. Same options as FishLenComps_LikeType. Default: "none" for all fleets. |
FishAgeComps_pop_Type |
paste("none_Year_1-terminal_Fleet_", 1:input_list$data$n_fish_fleets, sep = "") |
Character vector defining the composition structure for population-specific age compositions. Same format and options as FishAgeComps_Type. Default: "none" for all fleets across all years. |
FishLenComps_pop_Type |
paste("none_Year_1-terminal_Fleet_", 1:input_list$data$n_fish_fleets, sep = "") |
Character vector defining the composition structure for population-specific length compositions. Same format and options as FishLenComps_Type. Default: "none" for all fleets across all years. |
fish_idx_ages
|
NULL
|
Per-fleet selection of which ages contribute to the index total. Either a list with one element per fishery fleet, where each element is a vector of ages or NULL for all ages, or an array [n_ages x n_fish_fleets] of 0/1 weights. Default NULL uses every age for every fleet. The fleet’s compositions are unaffected. |
FishAgeComps_bins
|
NULL
|
Which age bins each fishery fleet’s age composition is fitted over. Supply a list with one element per fleet, each a vector of bin indices or NULL for all bins, or an [n_obs_ages x n_fish_fleets] array of 0/1 weights. Both observed and expected compositions are restricted to the named bins and renormalized within them, so excluded bins are left out of the likelihood rather than being forced to be explained; this is how a fleet that only ages part of its age range is fitted. Indices refer to observed bins, that is after any ageing error has mapped model ages onto observed ones. The restriction applies whatever the composition type: for sex-joint comps the named bins are dropped from each sex’s block, so the sex ratio the joint comps have becomes the ratio within the fitted bins. Every fleet must retain at least two bins, since the proportion in a lone bin is one whatever the model predicts. Default NULL, which fits all bins for all fleets. |
FishLenComps_bins
|
NULL
|
Which length bins each fishery fleet’s length composition is fitted over, in the same format as FishAgeComps_bins. Indices refer to observed length bins, that is after any LenBinMap has mapped model bins onto observed ones. |
Fish_caal_bins
|
NULL
|
Which age bins each fishery fleet’s conditional age-at-length data are fitted over, in the same format as FishAgeComps_bins. Applied to every length bin’s row of ages alike. |
FishAgeComps_pop_bins
|
NULL
|
Which age bins each fishery fleet’s population-specific age composition is fitted over, in the same format as FishAgeComps_bins. |
FishLenComps_pop_bins
|
NULL
|
Which length bins each fishery fleet’s population-specific length composition is fitted over, in the same format as FishAgeComps_bins. |
FishIdx_LikeType |
rep("lognormal", input_list$data$n_fish_fleets) |
Character vector [n_fish_fleets] giving the error structure of each fishery index. Options are "lognormal" (default, the observation standard errors are on the log scale), "normal" (arithmetic scale), and "mvn" (multivariate normal on the arithmetic scale using a fixed covariance supplied through FishIdx_Cov). One-step-ahead residuals are available only for lognormal fleets. A fleet's population-specific index data source follows the same choice for "lognormal" and "normal", but stays lognormal under "mvn", whose covariance describes the regional series only. |
FishIdx_seas_Type |
NULL |
Whether a seasonal model reports this data source once a season or once a year. One value for every fleet or one per fleet. "spltSeas"Fit the observation against the prediction for the season it sits in. This is the default and what every data source did before this setting existed. "aggSeas"Sum the prediction over every season of the year and fit it against a single observation. Under "aggSeas" the observation still lives in whichever season it was placed in, and exactly one season per region and year may be turned on in the matching Use array. The likelihood and the reported negative log likelihood land in that season. An index measured at a point in time belongs in its own season rather than aggregated; this setting is for a data source that accumulates across the year. |
FishIdx_pop_seas_Type |
NULL |
Whether a seasonal model reports this data source once a season or once a year. One value for every fleet or one per fleet. "spltSeas"Fit the observation against the prediction for the season it sits in. This is the default and what every data source did before this setting existed. "aggSeas"Sum the prediction over every season of the year and fit it against a single observation. Under "aggSeas" the observation still lives in whichever season it was placed in, and exactly one season per region and year may be turned on in the matching Use array. The likelihood and the reported negative log likelihood land in that season. An index measured at a point in time belongs in its own season rather than aggregated; this setting is for a data source that accumulates across the year. |
FishAgeComps_seas_Type |
NULL |
Whether a seasonal model reports this data source once a season or once a year. One value for every fleet or one per fleet. "spltSeas"Fit the observation against the prediction for the season it sits in. This is the default and what every data source did before this setting existed. "aggSeas"Sum the prediction over every season of the year and fit it against a single observation. Under "aggSeas" the observation still lives in whichever season it was placed in, and exactly one season per region and year may be turned on in the matching Use array. The likelihood and the reported negative log likelihood land in that season. An index measured at a point in time belongs in its own season rather than aggregated; this setting is for a data source that accumulates across the year. |
FishAgeComps_pop_seas_Type |
NULL |
Whether a seasonal model reports this data source once a season or once a year. One value for every fleet or one per fleet. "spltSeas"Fit the observation against the prediction for the season it sits in. This is the default and what every data source did before this setting existed. "aggSeas"Sum the prediction over every season of the year and fit it against a single observation. Under "aggSeas" the observation still lives in whichever season it was placed in, and exactly one season per region and year may be turned on in the matching Use array. The likelihood and the reported negative log likelihood land in that season. An index measured at a point in time belongs in its own season rather than aggregated; this setting is for a data source that accumulates across the year. |
FishLenComps_seas_Type |
NULL |
Whether a seasonal model reports this data source once a season or once a year. One value for every fleet or one per fleet. "spltSeas"Fit the observation against the prediction for the season it sits in. This is the default and what every data source did before this setting existed. "aggSeas"Sum the prediction over every season of the year and fit it against a single observation. Under "aggSeas" the observation still lives in whichever season it was placed in, and exactly one season per region and year may be turned on in the matching Use array. The likelihood and the reported negative log likelihood land in that season. An index measured at a point in time belongs in its own season rather than aggregated; this setting is for a data source that accumulates across the year. |
FishLenComps_pop_seas_Type |
NULL |
Whether a seasonal model reports this data source once a season or once a year. One value for every fleet or one per fleet. "spltSeas"Fit the observation against the prediction for the season it sits in. This is the default and what every data source did before this setting existed. "aggSeas"Sum the prediction over every season of the year and fit it against a single observation. Under "aggSeas" the observation still lives in whichever season it was placed in, and exactly one season per region and year may be turned on in the matching Use array. The likelihood and the reported negative log likelihood land in that season. An index measured at a point in time belongs in its own season rather than aggregated; this setting is for a data source that accumulates across the year. |
FishAgeComps_discard_seas_Type |
NULL |
Whether a seasonal model reports this data source once a season or once a year. One value for every fleet or one per fleet. "spltSeas"Fit the observation against the prediction for the season it sits in. This is the default and what every data source did before this setting existed. "aggSeas"Sum the prediction over every season of the year and fit it against a single observation. Under "aggSeas" the observation still lives in whichever season it was placed in, and exactly one season per region and year may be turned on in the matching Use array. The likelihood and the reported negative log likelihood land in that season. An index measured at a point in time belongs in its own season rather than aggregated; this setting is for a data source that accumulates across the year. |
FishAgeComps_discard_pop_seas_Type |
NULL |
Whether a seasonal model reports this data source once a season or once a year. One value for every fleet or one per fleet. "spltSeas"Fit the observation against the prediction for the season it sits in. This is the default and what every data source did before this setting existed. "aggSeas"Sum the prediction over every season of the year and fit it against a single observation. Under "aggSeas" the observation still lives in whichever season it was placed in, and exactly one season per region and year may be turned on in the matching Use array. The likelihood and the reported negative log likelihood land in that season. An index measured at a point in time belongs in its own season rather than aggregated; this setting is for a data source that accumulates across the year. |
FishLenComps_discard_seas_Type |
NULL |
Whether a seasonal model reports this data source once a season or once a year. One value for every fleet or one per fleet. "spltSeas"Fit the observation against the prediction for the season it sits in. This is the default and what every data source did before this setting existed. "aggSeas"Sum the prediction over every season of the year and fit it against a single observation. Under "aggSeas" the observation still lives in whichever season it was placed in, and exactly one season per region and year may be turned on in the matching Use array. The likelihood and the reported negative log likelihood land in that season. An index measured at a point in time belongs in its own season rather than aggregated; this setting is for a data source that accumulates across the year. |
FishLenComps_discard_pop_seas_Type |
NULL |
Whether a seasonal model reports this data source once a season or once a year. One value for every fleet or one per fleet. "spltSeas"Fit the observation against the prediction for the season it sits in. This is the default and what every data source did before this setting existed. "aggSeas"Sum the prediction over every season of the year and fit it against a single observation. Under "aggSeas" the observation still lives in whichever season it was placed in, and exactly one season per region and year may be turned on in the matching Use array. The likelihood and the reported negative log likelihood land in that season. An index measured at a point in time belongs in its own season rather than aggregated; this setting is for a data source that accumulates across the year. |
FishIdx_Cov |
NULL |
List with one element per fishery fleet holding the fixed covariance matrix for fleets using "mvn", and NULL otherwise. Each matrix must be square with one row per observation the fleet fits, ordered as the observations appear when scanning that fleet's UseFishIdx slice in array order. |
ObsFish_caal
|
NULL
|
Observed conditional age-at-length array [n_regions x n_years x n_seas x n_lens x n_ages x n_sexes x n_fish_fleets]. A CAAL observation is the age composition of the fish aged from one length bin, so the age dim of each length row is what gets fit. NULL (default) for a model with no CAAL data. |
UseFish_caal
|
NULL
|
Use flags [n_regions x n_years x n_seas x n_lens x n_fish_fleets]. Length bins with no aged fish have a zero and are skipped. |
ISS_Fish_caal
|
NULL
|
Input sample sizes [n_regions x n_years x n_seas x n_lens x n_sexes x n_fish_fleets], the number aged within each length bin rather than the number measured. Summed from ObsFish_caal when NULL. |
Fish_caal_LikeType |
rep("none", input_list$data$n_fish_fleets) |
Character vector of length n_fish_fleets. One of "none", "Multinomial" or "Dirichlet-Multinomial". The logistic-normal families are not available for CAAL, since a single length bin's age sample is small and mostly zeros, which the additive log-ratio transform cannot handle. |
Fish_caal_Type |
paste("none_Year_1-terminal_Fleet_", 1:input_list$data$n_fish_fleets, sep = "") |
Composition type specification, using the same "CompType_Year_x-y_Fleet_z" convention as the marginal compositions. |
ObsFishAgeComps_discard
|
array(0, dim =
c(input_listn_regions,
length(input_listyears),
input_listn_seas,
length(input_listages),
input_listn_sexes,
input_listn_fish_fleets))
|
Observed fishery age composition from discards [n_regions × n_years × n_seas × n_ages × n_sexes × n_fish_fleets]. Structure must match ObsFishAgeComps. |
UseFishAgeComps_discard
|
array(0, dim =
c(input_listn_regions,
length(input_listyears),
input_listn_seas,
input_listn_fish_fleets))
|
Binary indicator array for discard age compositions [n_regions × n_years × n_seas × n_fish_fleets]. 1 = include discard age compositions in likelihood; 0 = exclude. |
ISS_FishAgeComps_discard
|
NULL
|
Input sample size array for discard age compositions [n_regions × n_years × n_seas × n_sexes × n_fish_fleets]. If NULL, derived automatically from ObsFishAgeComps_discard using FishAgeComps_discard_Type. |
ObsFishLenComps_discard
|
array(0, dim =
c(input_listn_regions,
length(input_listyears),
input_listn_seas,
obs_len_bins(input_list),
input_listn_sexes,
input_listn_fish_fleets))
|
Observed fishery length composition from discards [n_regions × n_years × n_seas × n_lens × n_sexes × n_fish_fleets]. Required if input_listfit_lengths == 1. |
UseFishLenComps_discard
|
array(0, dim =
c(input_listn_regions,
length(input_listyears),
input_listn_seas,
input_listn_fish_fleets))
|
Binary indicator array for discard length compositions [n_regions × n_years × n_seas × n_fish_fleets]. 1 = include discard length compositions in likelihood; 0 = exclude. |
ISS_FishLenComps_discard
|
NULL
|
Input sample size array for discard length compositions [n_regions × n_years × n_seas × n_sexes × n_fish_fleets]. If NULL, derived automatically from ObsFishLenComps_discard. |
FishAgeComps_discard_LikeType |
rep("none", input_list$data$n_fish_fleets) |
Character vector of length n_fish_fleets specifying likelihood type for discard age compositions. Options: "Multinomial"Standard multinomial likelihood "Dirichlet-Multinomial"Overdispersed multinomial "iid-Logistic-Normal"Independent logistic-normal "1d-Logistic-Normal"1D correlated logistic-normal "2d-Logistic-Normal"2D correlated logistic-normal "iid-Logistic-Normal-miss0"Logistic-normal with the empty bins dropped and the standard deviation scaled by the input sample size "1d-Logistic-Normal-miss0"The same, correlated across bins "2d-Logistic-Normal-miss0"The same, correlated across bins and sexes "none"No discard age composition likelihood |
FishLenComps_discard_LikeType |
rep("none", input_list$data$n_fish_fleets) |
Same specification as FishAgeComps_discard_LikeType, but for discard length compositions. |
FishAgeComps_discard_Type |
paste("none_Year_1-terminal_Fleet_", 1:input_list$data$n_fish_fleets, sep = "") |
Character vector defining discard age composition structure by fleet and year block. Format: "<type>_Year_<start>-<end>_Fleet_<f>" or "<type>_Year_<start>-terminal_Fleet_<f>". Valid types: "agg"Aggregated across regions and sexes "spltRspltS"Split by region and sex "spltRjntS"Split by region, joint across sexes "none"No discard age composition |
FishLenComps_discard_Type |
paste("none_Year_1-terminal_Fleet_", 1:input_list$data$n_fish_fleets, sep = "") |
Same format and options as FishAgeComps_discard_Type, applied to discard length compositions. |
ObsFishAgeComps_discard_pop
|
NULL
|
Observed population-specific discard age composition array [n_pop × n_regions × n_years × n_seas × n_ages × n_sexes × n_fish_fleets]. |
UseFishAgeComps_discard_pop
|
array(0, dim =
c(input_listn_pop,
input_listn_regions,
length(input_listyears),
input_listn_seas,
input_listn_fish_fleets))
|
Binary indicator array for population-specific discard age compositions [n_pop × n_regions × n_years × n_seas × n_fish_fleets]. |
ISS_FishAgeComps_discard_pop
|
NULL
|
Input sample size array for population-specific discard age compositions [n_pop × n_regions × n_years × n_seas × n_sexes × n_fish_fleets]. If NULL, computed from ObsFishAgeComps_discard_pop. |
ObsFishLenComps_discard_pop
|
NULL
|
Observed population-specific discard length composition array [n_pop × n_regions × n_years × n_seas × n_lens × n_sexes × n_fish_fleets]. |
UseFishLenComps_discard_pop
|
array(0, dim =
c(input_listn_pop,
input_listn_regions,
length(input_listyears),
input_listn_seas,
input_listn_fish_fleets))
|
Binary indicator array for population-specific discard length compositions [n_pop × n_regions × n_years × n_seas × n_fish_fleets]. |
ISS_FishLenComps_discard_pop
|
NULL
|
Input sample size array for population-specific discard length compositions [n_pop × n_regions × n_years × n_seas × n_sexes × n_fish_fleets]. If NULL, derived from ObsFishLenComps_discard_pop. |
FishAgeComps_discard_pop_LikeType |
rep("none", input_list$data$n_fish_fleets) |
Character vector of length n_fish_fleets specifying likelihood type for population-specific discard age compositions. Same options as FishAgeComps_discard_LikeType. |
FishLenComps_discard_pop_LikeType |
rep("none", input_list$data$n_fish_fleets) |
Same as above but for discard length compositions. |
FishAgeComps_discard_pop_Type |
paste("none_Year_1-terminal_Fleet_", 1:input_list$data$n_fish_fleets, sep = "") |
Character vector defining structure for population-specific discard age compositions. Same format as FishAgeComps_discard_Type. |
FishLenComps_discard_pop_Type |
paste("none_Year_1-terminal_Fleet_", 1:input_list$data$n_fish_fleets, sep = "") |
Character vector defining structure for population-specific discard length compositions. Same format as FishLenComps_discard_Type. |
Setup_Mod_SrvIdx_and_Comps
74 arguments
| Argument | Default | Description | |
|---|---|---|---|
ObsSrvIdx
|
required | Observed survey index array [n_regions × n_years × n_seas × n_srv_fleets]. | |
ObsSrvIdx_SE
|
required | Lognormal standard errors for ObsSrvIdx, same dimensions [n_regions × n_years × n_seas × n_srv_fleets]. | |
UseSrvIdx
|
required | Binary indicator array [n_regions × n_years × n_seas × n_srv_fleets]. 1 = include in likelihood; 0 = exclude. | |
ObsSrvIdxAA
|
NULL
|
Observed survey index at age, an array with dimensions [n_regions, n_years, n_seas, n_ages, n_sexes, n_srv_fleets]. Supplying this fits the index at age directly, every age its own observation with its own catchability. The sex dim is required whatever the fleet reports: a data source summed over sexes has its observation in sex slot one. A fleet uses this or the aggregated index, never both. | |
UseSrvIdxAA
|
NULL
|
Integer array shaped like ObsSrvIdxAA, 1 where an observation is fit. | |
ObsSrvIdxAA_SE
|
NULL
|
Reported standard errors shaped like their observation array, read only when SrvIdxAA_sigma_form asks for them. This is the parity the aggregated index already has: an index disaggregated by age keeps its survey-design errors. | |
ObsSrvIdxAA_pop
|
NULL
|
Population-specific counterparts, with a leading population dimension. | |
UseSrvIdxAA_pop
|
NULL
|
Population-specific counterparts, with a leading population dimension. | |
ObsSrvIdxAA_pop_SE
|
NULL
|
Reported standard errors shaped like their observation array, read only when SrvIdxAA_sigma_form asks for them. This is the parity the aggregated index already has: an index disaggregated by age keeps its survey-design errors. | |
sigmaSrvIdxAA_key |
NULL |
Integer arrays [n_ages, n_sexes, n_srv_fleets] coupling the index at age observation error, the key matrix convention ICES assessments use. Equal entries share a parameter and NA excludes one. The sex dim is required; a key coupling the sexes repeats its entries across them. The age shape of catchability is not set here: an index fit age by age puts it in selectivity through the "nonparfree" form, which holds the height of the curve as well as its shape. See Setup_Mod_Srvsel_and_Q. | |
sigmaSrvIdxAA_spec |
"est" |
"est" (default) or "fix". | |
sigmaSrvIdxAA_pop_key |
NULL |
Integer arrays [n_ages, n_sexes, n_srv_fleets] coupling the index at age observation error, the key matrix convention ICES assessments use. Equal entries share a parameter and NA excludes one. The sex dim is required; a key coupling the sexes repeats its entries across them. The age shape of catchability is not set here: an index fit age by age puts it in selectivity through the "nonparfree" form, which holds the height of the curve as well as its shape. See Setup_Mod_Srvsel_and_Q. | |
sigmaSrvIdxAA_pop_spec |
"est" |
"est" (default) or "fix". | |
SrvIdxAA_Type |
"spltRaggS" |
Which dims the fleet reports separately: "agg", "spltRaggS" (default), "aggRspltS" or "spltRspltS", or year and fleet specifications such as "spltRaggS_Year_1-20_Fleet_1". See Setup_Mod_Catch_and_F. | |
SrvIdxAA_pop_Type |
"spltRaggS" |
Which dims the fleet reports separately: "agg", "spltRaggS" (default), "aggRspltS" or "spltRspltS", or year and fleet specifications such as "spltRaggS_Year_1-20_Fleet_1". See Setup_Mod_Catch_and_F. | |
SrvIdxAA_LikeType |
"lognormal" |
"lognormal" (default) or "normal", one setting for every fleet or one per fleet. | |
SrvIdxAA_pop_LikeType |
"lognormal" |
"lognormal" (default) or "normal", one setting for every fleet or one per fleet. | |
SrvIdxAA_sigma_form |
"none" |
Where the observation error comes from: "none" (default), "data", "est_additive" or "est_quadrature". | |
SrvIdxAA_pop_sigma_form |
"none" |
Where the observation error comes from: "none" (default), "data", "est_additive" or "est_quadrature". | |
AgeObsCorr_srv_idx |
"iid" |
Correlation across ages for the survey index at age, "iid" (default), "1dar1", "us" or "2dar1", one setting for every fleet or one per fleet. See Setup_Mod_Catch_and_F. | |
AgeObsCorr_srv_idx_pop |
"iid" |
Correlation across ages for the survey index at age, "iid" (default), "1dar1", "us" or "2dar1", one setting for every fleet or one per fleet. See Setup_Mod_Catch_and_F. | |
rho_srv_idx_spec
|
NULL
|
How the correlation parameters are shared, over region, sex and fleet, using the package’s spec strings. NULL (the default) gives one per fleet. See Setup_Mod_Catch_and_F. | |
rho_srv_idx_pop_spec
|
NULL
|
How the correlation parameters are shared, over region, sex and fleet, using the package’s spec strings. NULL (the default) gives one per fleet. See Setup_Mod_Catch_and_F. | |
sigmaSrvIdx_spec |
"fix" |
Character string controlling the estimated component of the aggregated survey index observation error, one value per fleet. One of: "fix"The reported standard errors are used as they are and ln_sigmaSrvIdx is not estimated. The default. "est_additive"Total standard deviation is the reported standard error plus an estimated component, the additive extra standard deviation convention. "est_quadrature"Total standard deviation is the reported standard error and the estimated component added in quadrature, treating them as independent variances. "est_replace"An estimated standard deviation replaces the reported standard errors entirely, as several ICES assessments do. An estimated component is confounded with a likelihood weight, since a weight on a normal likelihood is the same statement as dividing the variance by that weight. Setup_Mod_Weighting warns when both are used. Fleets with a multivariate normal index likelihood take their scale from the supplied covariance and cannot have one, which is an error rather than a silently unidentified parameter. | |
sigmaSrvIdx_map
|
NULL
|
Optional integer vector of length n_srv_fleets giving the estimation groups for ln_sigmaSrvIdx. Fleets sharing a value share a parameter and NA holds a fleet at its starting value. Defaults to one free parameter per fleet. Use it when a reference assessment estimated some fleets and pinned others at a bound. | |
sigmaSrvIdx_pop_spec |
"fix" |
Character string controlling the estimated component of the population-specific survey index observation error, one value per fleet. One of: "fix"The reported standard errors are used as they are and ln_sigmaSrvIdx_pop is not estimated. The default. "est_additive"Total standard deviation is the reported standard error plus an estimated component, the additive extra standard deviation convention. "est_quadrature"Total standard deviation is the reported standard error and the estimated component added in quadrature, treating them as independent variances. "est_replace"An estimated standard deviation replaces the reported standard errors entirely, as several ICES assessments do. An estimated component is confounded with a likelihood weight, since a weight on a normal likelihood is the same statement as dividing the variance by that weight. Setup_Mod_Weighting warns when both are used. Fleets with a multivariate normal index likelihood take their scale from the supplied covariance and cannot have one, which is an error rather than a silently unidentified parameter. | |
sigmaSrvIdx_pop_map
|
NULL
|
Optional integer vector of length n_srv_fleets giving the estimation groups for ln_sigmaSrvIdx_pop. Fleets sharing a value share a parameter and NA holds a fleet at its starting value. Defaults to one free parameter per fleet. Use it when a reference assessment estimated some fleets and pinned others at a bound. | |
ObsSrvIdx_pop
|
NULL
|
Observed population-specific survey index array [n_pop × n_regions × n_years × n_seas × n_srv_fleets]. | |
ObsSrvIdx_pop_SE
|
NULL
|
Lognormal standard errors for ObsSrvIdx_pop, same dimensions [n_pop × n_regions × n_years × n_seas × n_srv_fleets]. | |
UseSrvIdx_pop
|
array(0, dim =
c(input_listn_pop,
input_listn_regions,
length(input_listyears),
input_listn_seas,
input_listn_srv_fleets))
|
Binary indicator array [n_pop × n_regions × n_years × n_seas × n_srv_fleets]. 1 = include population-specific index in likelihood; 0 = exclude. Default: all zeros. | |
srv_idx_type |
required | Character vector [n_srv_fleets] specifying the index type per fleet. One of "biom" (biomass), "abd" (abundance), "recdev" (recruitment deviations), or "none" (no index for that fleet). Converted to integer codes (1, 0, 2, 999) before storage. A "recdev" fleet observes year class strength directly rather than any part of the population. Its predicted value is q * (ln_RecDevs - mu), with mu the center the recruitment penalty asserts for that year, so it measures the anomaly rather than the deviation as stored; under a bias ramp the two differ. Such a fleet reads no numbers at age, so its selectivity, survey timing and weight at age are unused and its compositions should be left off. It requires SrvIdx_LikeType = "normal", since deviations are signed, and RecDevs_pen_center = "fixed" in Setup_Mod_Rec. | |
ObsSrvAgeComps
|
required | Observed survey age compositions, array [n_regions × n_years × n_seas × n_ages × n_sexes × n_srv_fleets]. Values may be counts or proportions on a comparable scale. | |
UseSrvAgeComps
|
required | Binary indicator array [n_regions × n_years × n_seas × n_srv_fleets]. 1 = fit age compositions; 0 = exclude. | |
ObsSrvLenComps
|
required | Observed survey length compositions, array [n_regions × n_years × n_seas × n_lens × n_sexes × n_srv_fleets]. Only validated when input_listfit_lengths = 1 in $data.</td></tr> <tr data-k="usesrvlencomps required binary indicator array [n_regions × n_years × n_seas × n_srv_fleets]. 1 = fit length compositions; 0 = exclude."><td><code class="optref-arg">UseSrvLenComps</code></td><td><em class="optref-req">required</em></td><td>Binary indicator array [n_regions × n_years × n_seas × n_srv_fleets]. 1 = fit length compositions; 0 = exclude.</td></tr> <tr data-k="iss_srvagecomps null input sample sizes for survey age compositions, array [n_regions × n_years × n_seas × n_sexes × n_srv_fleets], or null to derive automatically by summing obssrvagecomps across the age dimension each year, respecting srvagecomps_type."><td><code class="optref-arg">ISS_SrvAgeComps</code></td><td><code>NULL</code></td><td>Input sample sizes for survey age compositions, array [n_regions × n_years × n_seas × n_sexes × n_srv_fleets], or NULL to derive automatically by summing ObsSrvAgeComps across the age dimension each year, respecting SrvAgeComps_Type.</td></tr> <tr data-k="iss_srvlencomps null input sample sizes for survey length compositions, same structure as iss_srvagecomps, or null for automatic derivation from obssrvlencomps."><td><code class="optref-arg">ISS_SrvLenComps</code></td><td><code>NULL</code></td><td>Input sample sizes for survey length compositions, same structure as ISS_SrvAgeComps, or NULL for automatic derivation from ObsSrvLenComps.</td></tr> <tr data-k="srvagecomps_liketype required character vector [n_srv_fleets] specifying the likelihood for survey age compositions. one of "none", "multinomial", "dirichlet-multinomial", "iid-logistic-normal", "1d-logistic-normal", "2d-logistic-normal", "iid-logistic-normal-miss0", "1d-logistic-normal-miss0", "2d-logistic-normal-miss0". converted to integer codes (999, 0-7) before storage. the two miss0 forms drop the empty bins and renormalize the expected proportions over the bins that remain, rather than adding addtocomp to the zeros and keeping every bin. their standard deviation is divided by the square root of the input sample size, so the parameter is a per fish quantity and a year sampled harder is fit more tightly, and the change of variables from the log ratio is taken off so the result is a density on the composition itself. their correlations run through the logistic function and are therefore positive, matching the autoregression they mirror, where the other logistic normal forms allow either sign. the 2d form needs a composition joint across sexes, the same as "2d-logistic-normal". one step ahead residuals are not available for any of the three, since the number of observations in a cell changes with the number of empty bins."><td><code class="optref-arg">SrvAgeComps_LikeType</code></td><td><em class="optref-req">required</em></td><td>Character vector [n_srv_fleets] specifying the likelihood for survey age compositions. One of "none", "Multinomial", "Dirichlet-Multinomial", "iid-Logistic-Normal", "1d-Logistic-Normal", "2d-Logistic-Normal", "iid-Logistic-Normal-miss0", "1d-Logistic-Normal-miss0", "2d-Logistic-Normal-miss0". Converted to integer codes (999, 0-7) before storage. The two miss0 forms drop the empty bins and renormalize the expected proportions over the bins that remain, rather than adding addtocomp to the zeros and keeping every bin. Their standard deviation is divided by the square root of the input sample size, so the parameter is a per fish quantity and a year sampled harder is fit more tightly, and the change of variables from the log ratio is taken off so the result is a density on the composition itself. Their correlations run through the logistic function and are therefore positive, matching the autoregression they mirror, where the other logistic normal forms allow either sign. The 2d form needs a composition joint across sexes, the same as "2d-Logistic-Normal". One step ahead residuals are not available for any of the three, since the number of observations in a cell changes with the number of empty bins.</td></tr> <tr data-k="srvlencomps_liketype required character vector [n_srv_fleets] specifying the likelihood for survey length compositions. same options as srvagecomps_liketype."><td><code class="optref-arg">SrvLenComps_LikeType</code></td><td><em class="optref-req">required</em></td><td>Character vector [n_srv_fleets] specifying the likelihood for survey length compositions. Same options as SrvAgeComps_LikeType.</td></tr> <tr data-k="srvagecomps_type required character vector defining the survey age composition structure per fleet and year range. each element follows the format "<type>_year_<start>-<end>_fleet_<fleet>". use "terminal" in place of the end year to extend to the final model year. valid types: "agg"aggregated across regions and sexes. not compatible with "2d-logistic-normal". "spltrsplts"split by region and sex. "spltrjnts"split by region, joint across sexes. "none"no composition data used. parsed into a [n_years × n_srv_fleets] integer matrix before storage. an error is raised if any cell remains na after parsing, indicating an incomplete year range specification."><td><code class="optref-arg">SrvAgeComps_Type</code></td><td><em class="optref-req">required</em></td><td>Character vector defining the survey age composition structure per fleet and year range. Each element follows the format "<type>_Year_<start>-<end>_Fleet_<fleet>". Use "terminal" in place of the end year to extend to the final model year. Valid types: "agg"Aggregated across regions and sexes. Not compatible with "2d-Logistic-Normal". "spltRspltS"Split by region and sex. "spltRjntS"Split by region, joint across sexes. "none"No composition data used. Parsed into a [n_years × n_srv_fleets] integer matrix before storage. An error is raised if any cell remains NA after parsing, indicating an incomplete year range specification.</td></tr> <tr data-k="srvlencomps_type required character vector defining the survey length composition structure. same format and options as srvagecomps_type."><td><code class="optref-arg">SrvLenComps_Type</code></td><td><em class="optref-req">required</em></td><td>Character vector defining the survey length composition structure. Same format and options as SrvAgeComps_Type.</td></tr> <tr data-k="obssrvagecomps_pop null observed population-specific survey age composition array [n_pop × n_regions × n_years × n_seas × n_ages × n_sexes × n_srv_fleets]. required when any element of usesrvagecomps_pop is 1."><td><code class="optref-arg">ObsSrvAgeComps_pop</code></td><td><code>NULL</code></td><td>Observed population-specific survey age composition array [n_pop × n_regions × n_years × n_seas × n_ages × n_sexes × n_srv_fleets]. Required when any element of UseSrvAgeComps_pop is 1.</td></tr> <tr data-k="usesrvagecomps_pop array(0, dim = c(input_list$datadatadatadatadata$n_srv_fleets)) binary indicator array [n_pop × n_regions × n_years × n_seas × n_srv_fleets]. 1 = fit population-specific age compositions; 0 = exclude. default: all zeros."><td><code class="optref-arg">UseSrvAgeComps_pop</code></td><td><code>array(0, dim = c(input_list$datadatadatadatadata$n_srv_fleets))</code></td><td>Binary indicator array [n_pop × n_regions × n_years × n_seas × n_srv_fleets]. 1 = fit population-specific age compositions; 0 = exclude. Default: all zeros.</td></tr> <tr data-k="iss_srvagecomps_pop null input sample size array for population-specific survey age compositions [n_pop × n_regions × n_years × n_seas × n_sexes × n_srv_fleets]. if null (default), computed automatically by summing obssrvagecomps_pop within each population-year-fleet-season-region cell according to srvagecomps_pop_type."><td><code class="optref-arg">ISS_SrvAgeComps_pop</code></td><td><code>NULL</code></td><td>Input sample size array for population-specific survey age compositions [n_pop × n_regions × n_years × n_seas × n_sexes × n_srv_fleets]. If NULL (default), computed automatically by summing ObsSrvAgeComps_pop within each population-year-fleet-season-region cell according to SrvAgeComps_pop_Type.</td></tr> <tr data-k="obssrvlencomps_pop null observed population-specific survey length composition array [n_pop × n_regions × n_years × n_seas × n_lens × n_sexes × n_srv_fleets]. required when input_list$data$fit_lengths == 1 and any element of usesrvlencomps_pop is 1."><td><code class="optref-arg">ObsSrvLenComps_pop</code></td><td><code>NULL</code></td><td>Observed population-specific survey length composition array [n_pop × n_regions × n_years × n_seas × n_lens × n_sexes × n_srv_fleets]. Required when input_list$data$fit_lengths == 1 and any element of UseSrvLenComps_pop is 1.</td></tr> <tr data-k="usesrvlencomps_pop array(0, dim = c(input_list$datadatadatadatadata$n_srv_fleets)) binary indicator array [n_pop × n_regions × n_years × n_seas × n_srv_fleets]. 1 = fit population-specific length compositions; 0 = exclude. default: all zeros."><td><code class="optref-arg">UseSrvLenComps_pop</code></td><td><code>array(0, dim = c(input_list$datadatadatadatadata$n_srv_fleets))</code></td><td>Binary indicator array [n_pop × n_regions × n_years × n_seas × n_srv_fleets]. 1 = fit population-specific length compositions; 0 = exclude. Default: all zeros.</td></tr> <tr data-k="iss_srvlencomps_pop null input sample size array for population-specific survey length compositions [n_pop × n_regions × n_years × n_seas × n_sexes × n_srv_fleets]. if null (default), derived automatically from obssrvlencomps_pop."><td><code class="optref-arg">ISS_SrvLenComps_pop</code></td><td><code>NULL</code></td><td>Input sample size array for population-specific survey length compositions [n_pop × n_regions × n_years × n_seas × n_sexes × n_srv_fleets]. If NULL (default), derived automatically from ObsSrvLenComps_pop.</td></tr> <tr data-k="srvagecomps_pop_liketype rep("none", input_list$data$n_srv_fleets) character vector of length n_srv_fleets specifying the likelihood for population-specific survey age compositions. same options as srvagecomps_liketype. default: "none" for all fleets."><td><code class="optref-arg">SrvAgeComps_pop_LikeType</code></td><td><code>rep("none", input_list$data$n_srv_fleets)</code></td><td>Character vector of length n_srv_fleets specifying the likelihood for population-specific survey age compositions. Same options as SrvAgeComps_LikeType. Default: "none" for all fleets.</td></tr> <tr data-k="srvlencomps_pop_liketype rep("none", input_list$data$n_srv_fleets) character vector of length n_srv_fleets specifying the likelihood for population-specific survey length compositions. same options as srvlencomps_liketype. default: "none" for all fleets."><td><code class="optref-arg">SrvLenComps_pop_LikeType</code></td><td><code>rep("none", input_list$data$n_srv_fleets)</code></td><td>Character vector of length n_srv_fleets specifying the likelihood for population-specific survey length compositions. Same options as SrvLenComps_LikeType. Default: "none" for all fleets.</td></tr> <tr data-k="srvagecomps_pop_type paste("none_year_1-terminal_fleet_", 1:input_list$data$n_srv_fleets, sep = "") character vector defining the composition structure for population-specific survey age compositions. same format and options as srvagecomps_type. default: "none" for all fleets across all years."><td><code class="optref-arg">SrvAgeComps_pop_Type</code></td><td><code>paste("none_Year_1-terminal_Fleet_", 1:input_list$data$n_srv_fleets, sep = "")</code></td><td>Character vector defining the composition structure for population-specific survey age compositions. Same format and options as SrvAgeComps_Type. Default: "none" for all fleets across all years.</td></tr> <tr data-k="srvlencomps_pop_type paste("none_year_1-terminal_fleet_", 1:input_list$data$n_srv_fleets, sep = "") character vector defining the composition structure for population-specific survey length compositions. same format and options as srvlencomps_type. default: "none" for all fleets across all years."><td><code class="optref-arg">SrvLenComps_pop_Type</code></td><td><code>paste("none_Year_1-terminal_Fleet_", 1:input_list$data$n_srv_fleets, sep = "")</code></td><td>Character vector defining the composition structure for population-specific survey length compositions. Same format and options as SrvLenComps_Type. Default: "none" for all fleets across all years.</td></tr> <tr data-k="srv_idx_ages null per-fleet selection of which ages contribute to the index total. either a list with one element per survey fleet, where each element is a vector of ages or null for all ages, or an array [n_ages x n_srv_fleets] of 0/1 weights. default null uses every age for every fleet. restricting a fleet to a single age turns it into an index of that age alone, which is how an age-1 acoustic index is specified; the fleet's compositions are unaffected because the restriction applies to the index sum rather than to selectivity."><td><code class="optref-arg">srv_idx_ages</code></td><td><code>NULL</code></td><td>Per-fleet selection of which ages contribute to the index total. Either a list with one element per survey fleet, where each element is a vector of ages or NULL for all ages, or an array [n_ages x n_srv_fleets] of 0/1 weights. Default NULL uses every age for every fleet. Restricting a fleet to a single age turns it into an index of that age alone, which is how an age-1 acoustic index is specified; the fleet's compositions are unaffected because the restriction applies to the index sum rather than to selectivity.</td></tr> <tr data-k="srvagecomps_bins null which age bins each survey fleet's age composition is fitted over. supply a list with one element per fleet, each a vector of bin indices or null for all bins, or an [n_obs_ages x n_srv_fleets] array of 0/1 weights. both observed and expected compositions are restricted to the named bins and renormalized within them, so excluded bins are left out of the likelihood rather than being forced to be explained; this is how a fleet that only ages part of its age range is fitted. indices refer to observed bins, that is after any ageing error has mapped model ages onto observed ones. the restriction applies whatever the composition type: for sex-joint comps the named bins are dropped from each sex's block, so the sex ratio the joint comps have becomes the ratio within the fitted bins. every fleet must retain at least two bins, since the proportion in a lone bin is one whatever the model predicts. default null, which fits all bins for all fleets."><td><code class="optref-arg">SrvAgeComps_bins</code></td><td><code>NULL</code></td><td>Which age bins each survey fleet's age composition is fitted over. Supply a list with one element per fleet, each a vector of bin indices or NULL for all bins, or an [n_obs_ages x n_srv_fleets] array of 0/1 weights. Both observed and expected compositions are restricted to the named bins and renormalized within them, so excluded bins are left out of the likelihood rather than being forced to be explained; this is how a fleet that only ages part of its age range is fitted. Indices refer to observed bins, that is after any ageing error has mapped model ages onto observed ones. The restriction applies whatever the composition type: for sex-joint comps the named bins are dropped from each sex's block, so the sex ratio the joint comps have becomes the ratio within the fitted bins. Every fleet must retain at least two bins, since the proportion in a lone bin is one whatever the model predicts. Default NULL, which fits all bins for all fleets.</td></tr> <tr data-k="srvlencomps_bins null which length bins each survey fleet's length composition is fitted over, in the same format as srvagecomps_bins. indices refer to observed length bins, that is after any lenbinmap has mapped model bins onto observed ones."><td><code class="optref-arg">SrvLenComps_bins</code></td><td><code>NULL</code></td><td>Which length bins each survey fleet's length composition is fitted over, in the same format as SrvAgeComps_bins. Indices refer to observed length bins, that is after any LenBinMap has mapped model bins onto observed ones.</td></tr> <tr data-k="srv_caal_bins null which age bins each survey fleet's conditional age-at-length data are fitted over, in the same format as srvagecomps_bins. applied to every length bin's row of ages alike."><td><code class="optref-arg">Srv_caal_bins</code></td><td><code>NULL</code></td><td>Which age bins each survey fleet's conditional age-at-length data are fitted over, in the same format as SrvAgeComps_bins. Applied to every length bin's row of ages alike.</td></tr> <tr data-k="srvagecomps_pop_bins null which age bins each survey fleet's population-specific age composition is fitted over, in the same format as srvagecomps_bins."><td><code class="optref-arg">SrvAgeComps_pop_bins</code></td><td><code>NULL</code></td><td>Which age bins each survey fleet's population-specific age composition is fitted over, in the same format as SrvAgeComps_bins.</td></tr> <tr data-k="srvlencomps_pop_bins null which length bins each survey fleet's population-specific length composition is fitted over, in the same format as srvagecomps_bins."><td><code class="optref-arg">SrvLenComps_pop_bins</code></td><td><code>NULL</code></td><td>Which length bins each survey fleet's population-specific length composition is fitted over, in the same format as SrvAgeComps_bins.</td></tr> <tr data-k="srvidx_liketype rep("lognormal", input_list$data$n_srv_fleets) character vector [n_srv_fleets] giving the error structure of each survey index. options are "lognormal" (default, the observation standard errors are on the log scale), "normal" (arithmetic scale), and "mvn" (multivariate normal on the arithmetic scale using a fixed covariance supplied through srvidx_cov). one-step-ahead residuals are available only for lognormal fleets. a fleet's population-specific index data source follows the same choice for "lognormal" and "normal", but stays lognormal under "mvn", whose covariance describes the regional series only."><td><code class="optref-arg">SrvIdx_LikeType</code></td><td><code>rep("lognormal", input_list$data$n_srv_fleets)</code></td><td>Character vector [n_srv_fleets] giving the error structure of each survey index. Options are "lognormal" (default, the observation standard errors are on the log scale), "normal" (arithmetic scale), and "mvn" (multivariate normal on the arithmetic scale using a fixed covariance supplied through SrvIdx_Cov). One-step-ahead residuals are available only for lognormal fleets. A fleet's population-specific index data source follows the same choice for "lognormal" and "normal", but stays lognormal under "mvn", whose covariance describes the regional series only.</td></tr> <tr data-k="srvidx_seas_type null whether a seasonal model reports this data source once a season or once a year. one value for every fleet or one per fleet. "spltseas"fit the observation against the prediction for the season it sits in. this is the default and what every data source did before this setting existed. "aggseas"sum the prediction over every season of the year and fit it against a single observation. under "aggseas" the observation still lives in whichever season it was placed in, and exactly one season per region and year may be turned on in the matching use array. the likelihood and the reported negative log likelihood land in that season. a survey measured at a point in time belongs in its own season with its own timing rather than aggregated; this setting is for a data source that accumulates across the year."><td><code class="optref-arg">SrvIdx_seas_Type</code></td><td><code>NULL</code></td><td>Whether a seasonal model reports this data source once a season or once a year. One value for every fleet or one per fleet. "spltSeas"Fit the observation against the prediction for the season it sits in. This is the default and what every data source did before this setting existed. "aggSeas"Sum the prediction over every season of the year and fit it against a single observation. Under "aggSeas" the observation still lives in whichever season it was placed in, and exactly one season per region and year may be turned on in the matching Use array. The likelihood and the reported negative log likelihood land in that season. A survey measured at a point in time belongs in its own season with its own timing rather than aggregated; this setting is for a data source that accumulates across the year.</td></tr> <tr data-k="srvidx_pop_seas_type null whether a seasonal model reports this data source once a season or once a year. one value for every fleet or one per fleet. "spltseas"fit the observation against the prediction for the season it sits in. this is the default and what every data source did before this setting existed. "aggseas"sum the prediction over every season of the year and fit it against a single observation. under "aggseas" the observation still lives in whichever season it was placed in, and exactly one season per region and year may be turned on in the matching use array. the likelihood and the reported negative log likelihood land in that season. a survey measured at a point in time belongs in its own season with its own timing rather than aggregated; this setting is for a data source that accumulates across the year."><td><code class="optref-arg">SrvIdx_pop_seas_Type</code></td><td><code>NULL</code></td><td>Whether a seasonal model reports this data source once a season or once a year. One value for every fleet or one per fleet. "spltSeas"Fit the observation against the prediction for the season it sits in. This is the default and what every data source did before this setting existed. "aggSeas"Sum the prediction over every season of the year and fit it against a single observation. Under "aggSeas" the observation still lives in whichever season it was placed in, and exactly one season per region and year may be turned on in the matching Use array. The likelihood and the reported negative log likelihood land in that season. A survey measured at a point in time belongs in its own season with its own timing rather than aggregated; this setting is for a data source that accumulates across the year.</td></tr> <tr data-k="srvidxaa_seas_type null whether a seasonal model reports this data source once a season or once a year. one value for every fleet or one per fleet. "spltseas"fit the observation against the prediction for the season it sits in. this is the default and what every data source did before this setting existed. "aggseas"sum the prediction over every season of the year and fit it against a single observation. under "aggseas" the observation still lives in whichever season it was placed in, and exactly one season per region and year may be turned on in the matching use array. the likelihood and the reported negative log likelihood land in that season. a survey measured at a point in time belongs in its own season with its own timing rather than aggregated; this setting is for a data source that accumulates across the year."><td><code class="optref-arg">SrvIdxAA_seas_Type</code></td><td><code>NULL</code></td><td>Whether a seasonal model reports this data source once a season or once a year. One value for every fleet or one per fleet. "spltSeas"Fit the observation against the prediction for the season it sits in. This is the default and what every data source did before this setting existed. "aggSeas"Sum the prediction over every season of the year and fit it against a single observation. Under "aggSeas" the observation still lives in whichever season it was placed in, and exactly one season per region and year may be turned on in the matching Use array. The likelihood and the reported negative log likelihood land in that season. A survey measured at a point in time belongs in its own season with its own timing rather than aggregated; this setting is for a data source that accumulates across the year.</td></tr> <tr data-k="srvidxaa_pop_seas_type null whether a seasonal model reports this data source once a season or once a year. one value for every fleet or one per fleet. "spltseas"fit the observation against the prediction for the season it sits in. this is the default and what every data source did before this setting existed. "aggseas"sum the prediction over every season of the year and fit it against a single observation. under "aggseas" the observation still lives in whichever season it was placed in, and exactly one season per region and year may be turned on in the matching use array. the likelihood and the reported negative log likelihood land in that season. a survey measured at a point in time belongs in its own season with its own timing rather than aggregated; this setting is for a data source that accumulates across the year."><td><code class="optref-arg">SrvIdxAA_pop_seas_Type</code></td><td><code>NULL</code></td><td>Whether a seasonal model reports this data source once a season or once a year. One value for every fleet or one per fleet. "spltSeas"Fit the observation against the prediction for the season it sits in. This is the default and what every data source did before this setting existed. "aggSeas"Sum the prediction over every season of the year and fit it against a single observation. Under "aggSeas" the observation still lives in whichever season it was placed in, and exactly one season per region and year may be turned on in the matching Use array. The likelihood and the reported negative log likelihood land in that season. A survey measured at a point in time belongs in its own season with its own timing rather than aggregated; this setting is for a data source that accumulates across the year.</td></tr> <tr data-k="srvagecomps_seas_type null whether a seasonal model reports this data source once a season or once a year. one value for every fleet or one per fleet. "spltseas"fit the observation against the prediction for the season it sits in. this is the default and what every data source did before this setting existed. "aggseas"sum the prediction over every season of the year and fit it against a single observation. under "aggseas" the observation still lives in whichever season it was placed in, and exactly one season per region and year may be turned on in the matching use array. the likelihood and the reported negative log likelihood land in that season. a survey measured at a point in time belongs in its own season with its own timing rather than aggregated; this setting is for a data source that accumulates across the year."><td><code class="optref-arg">SrvAgeComps_seas_Type</code></td><td><code>NULL</code></td><td>Whether a seasonal model reports this data source once a season or once a year. One value for every fleet or one per fleet. "spltSeas"Fit the observation against the prediction for the season it sits in. This is the default and what every data source did before this setting existed. "aggSeas"Sum the prediction over every season of the year and fit it against a single observation. Under "aggSeas" the observation still lives in whichever season it was placed in, and exactly one season per region and year may be turned on in the matching Use array. The likelihood and the reported negative log likelihood land in that season. A survey measured at a point in time belongs in its own season with its own timing rather than aggregated; this setting is for a data source that accumulates across the year.</td></tr> <tr data-k="srvagecomps_pop_seas_type null whether a seasonal model reports this data source once a season or once a year. one value for every fleet or one per fleet. "spltseas"fit the observation against the prediction for the season it sits in. this is the default and what every data source did before this setting existed. "aggseas"sum the prediction over every season of the year and fit it against a single observation. under "aggseas" the observation still lives in whichever season it was placed in, and exactly one season per region and year may be turned on in the matching use array. the likelihood and the reported negative log likelihood land in that season. a survey measured at a point in time belongs in its own season with its own timing rather than aggregated; this setting is for a data source that accumulates across the year."><td><code class="optref-arg">SrvAgeComps_pop_seas_Type</code></td><td><code>NULL</code></td><td>Whether a seasonal model reports this data source once a season or once a year. One value for every fleet or one per fleet. "spltSeas"Fit the observation against the prediction for the season it sits in. This is the default and what every data source did before this setting existed. "aggSeas"Sum the prediction over every season of the year and fit it against a single observation. Under "aggSeas" the observation still lives in whichever season it was placed in, and exactly one season per region and year may be turned on in the matching Use array. The likelihood and the reported negative log likelihood land in that season. A survey measured at a point in time belongs in its own season with its own timing rather than aggregated; this setting is for a data source that accumulates across the year.</td></tr> <tr data-k="srvlencomps_seas_type null whether a seasonal model reports this data source once a season or once a year. one value for every fleet or one per fleet. "spltseas"fit the observation against the prediction for the season it sits in. this is the default and what every data source did before this setting existed. "aggseas"sum the prediction over every season of the year and fit it against a single observation. under "aggseas" the observation still lives in whichever season it was placed in, and exactly one season per region and year may be turned on in the matching use array. the likelihood and the reported negative log likelihood land in that season. a survey measured at a point in time belongs in its own season with its own timing rather than aggregated; this setting is for a data source that accumulates across the year."><td><code class="optref-arg">SrvLenComps_seas_Type</code></td><td><code>NULL</code></td><td>Whether a seasonal model reports this data source once a season or once a year. One value for every fleet or one per fleet. "spltSeas"Fit the observation against the prediction for the season it sits in. This is the default and what every data source did before this setting existed. "aggSeas"Sum the prediction over every season of the year and fit it against a single observation. Under "aggSeas" the observation still lives in whichever season it was placed in, and exactly one season per region and year may be turned on in the matching Use array. The likelihood and the reported negative log likelihood land in that season. A survey measured at a point in time belongs in its own season with its own timing rather than aggregated; this setting is for a data source that accumulates across the year.</td></tr> <tr data-k="srvlencomps_pop_seas_type null whether a seasonal model reports this data source once a season or once a year. one value for every fleet or one per fleet. "spltseas"fit the observation against the prediction for the season it sits in. this is the default and what every data source did before this setting existed. "aggseas"sum the prediction over every season of the year and fit it against a single observation. under "aggseas" the observation still lives in whichever season it was placed in, and exactly one season per region and year may be turned on in the matching use array. the likelihood and the reported negative log likelihood land in that season. a survey measured at a point in time belongs in its own season with its own timing rather than aggregated; this setting is for a data source that accumulates across the year."><td><code class="optref-arg">SrvLenComps_pop_seas_Type</code></td><td><code>NULL</code></td><td>Whether a seasonal model reports this data source once a season or once a year. One value for every fleet or one per fleet. "spltSeas"Fit the observation against the prediction for the season it sits in. This is the default and what every data source did before this setting existed. "aggSeas"Sum the prediction over every season of the year and fit it against a single observation. Under "aggSeas" the observation still lives in whichever season it was placed in, and exactly one season per region and year may be turned on in the matching Use array. The likelihood and the reported negative log likelihood land in that season. A survey measured at a point in time belongs in its own season with its own timing rather than aggregated; this setting is for a data source that accumulates across the year.</td></tr> <tr data-k="srvlencomps_sel rep("age", input_list$data$n_srv_fleets) character vector [n_srv_fleets], whether a length-based selectivity is applied before or after the fish are spread over lengths. "age" (default) selects the index at age and spreads it afterwards; "length" spreads the numbers at each age over the key first and selects them length by length, so the survey sees the long fish of an age more often. the key is the survey's own, at t_srv. requires length-based survey selectivity. use "length" when selectivity is length based and the length compositions are what inform it."><td><code class="optref-arg">SrvLenComps_sel</code></td><td><code>rep("age", input_list$data$n_srv_fleets)</code></td><td>Character vector [n_srv_fleets], whether a length-based selectivity is applied before or after the fish are spread over lengths. "age" (default) selects the index at age and spreads it afterwards; "length" spreads the numbers at each age over the key first and selects them length by length, so the survey sees the long fish of an age more often. The key is the survey's own, at t_srv. Requires length-based survey selectivity. Use "length" when selectivity is length based and the length compositions are what inform it.</td></tr> <tr data-k="srv_waa_selected rep(0, input_list$data$n_srv_fleets) integer vector [n_srv_fleets] (0/1). with weight at age derived from growth and length-based selectivity, 1 makes a biomass index use the mean weight of the fish the survey sees at each age, \sum_l p(l \mid a) s(l) w(l) / \sum_l p(l \mid a) s(l), instead of the population mean weight at that age. the survey twin of fish_waa_selected. only applies to an index in weight (srv_idx_type = "biom")."><td><code class="optref-arg">srv_waa_selected</code></td><td><code>rep(0, input_list$data$n_srv_fleets)</code></td><td>Integer vector [n_srv_fleets] (0/1). With weight at age derived from growth and length-based selectivity, 1 makes a biomass index use the mean weight of the fish the survey sees at each age, \sum_l P(l \mid a) s(l) w(l) / \sum_l P(l \mid a) s(l), instead of the population mean weight at that age. The survey twin of fish_waa_selected. Only applies to an index in weight (srv_idx_type = "biom").</td></tr> <tr data-k="srvidx_cov null list with one element per survey fleet holding the fixed covariance matrix for fleets using "mvn", and null otherwise. each matrix must be square with one row per observation the fleet fits, ordered as the observations appear when scanning that fleet's usesrvidx slice in array order."><td><code class="optref-arg">SrvIdx_Cov</code></td><td><code>NULL</code></td><td>List with one element per survey fleet holding the fixed covariance matrix for fleets using "mvn", and NULL otherwise. Each matrix must be square with one row per observation the fleet fits, ordered as the observations appear when scanning that fleet's UseSrvIdx slice in array order.</td></tr> <tr data-k="obssrv_caal null observed conditional age-at-length array [n_regions x n_years x n_seas x n_lens x n_ages x n_sexes x n_srv_fleets]. a caal observation is the age composition of the fish aged from one length bin, so the age dim of each length row is what gets fit. null (default) for a model with no caal data."><td><code class="optref-arg">ObsSrv_caal</code></td><td><code>NULL</code></td><td>Observed conditional age-at-length array [n_regions x n_years x n_seas x n_lens x n_ages x n_sexes x n_srv_fleets]. A CAAL observation is the age composition of the fish aged from one length bin, so the age dim of each length row is what gets fit. NULL (default) for a model with no CAAL data.</td></tr> <tr data-k="usesrv_caal null use flags [n_regions x n_years x n_seas x n_lens x n_srv_fleets]. length bins with no aged fish have a zero and are skipped."><td><code class="optref-arg">UseSrv_caal</code></td><td><code>NULL</code></td><td>Use flags [n_regions x n_years x n_seas x n_lens x n_srv_fleets]. Length bins with no aged fish have a zero and are skipped.</td></tr> <tr data-k="iss_srv_caal null input sample sizes [n_regions x n_years x n_seas x n_lens x n_sexes x n_srv_fleets]. summed from obssrv_caal when null."><td><code class="optref-arg">ISS_Srv_caal</code></td><td><code>NULL</code></td><td>Input sample sizes [n_regions x n_years x n_seas x n_lens x n_sexes x n_srv_fleets]. Summed from ObsSrv_caal when NULL.</td></tr> <tr data-k="srv_caal_liketype rep("none", input_list$data$n_srv_fleets) character vector of length n_srv_fleets. one of "none", "multinomial" or "dirichlet-multinomial". the logistic-normal families are not available for caal, since a single length bin's age sample is small and mostly zeros, which the additive log-ratio transform cannot handle."><td><code class="optref-arg">Srv_caal_LikeType</code></td><td><code>rep("none", input_list$data$n_srv_fleets)</code></td><td>Character vector of length n_srv_fleets. One of "none", "Multinomial" or "Dirichlet-Multinomial". The logistic-normal families are not available for CAAL, since a single length bin's age sample is small and mostly zeros, which the additive log-ratio transform cannot handle.</td></tr> <tr data-k="srv_caal_type paste("none_year_1-terminal_fleet_", 1:input_list$data$n_srv_fleets, sep = "") composition type specification, using the same "comptype_year_x-y_fleet_z" convention as the marginal compositions."><td><code class="optref-arg">Srv_caal_Type</code></td><td><code>paste("none_Year_1-terminal_Fleet_", 1:input_list$data$n_srv_fleets, sep = "")</code></td><td>Composition type specification, using the same "CompType_Year_x-y_Fleet_z" convention as the marginal compositions.</td></tr> </tbody></table> </section> <section class="optref-stage" data-stage="Fishsel_and_Q"> <h3>Setup_Mod_Fishsel_and_Q</h3> <p class="optref-n">50 arguments</p> <table class="optref-table"> <thead><tr><th>Argument</th><th>Default</th><th>Description</th></tr></thead> <tbody> <tr data-k="cont_tv_fish_sel paste("none_fleet_", 1:input_list$data$n_fish_fleets, sep = "") character vector of length n_fish_fleets specifying continuous time-varying selectivity per fleet. each element must be "<type>_fleet_<f>". valid types: "none"no continuous time-variation (default). "iid"iid annual deviations on selectivity parameters. "rw"random walk in selectivity parameters over time. "3dmarg"3d gmrf with marginal variance parameterization. "3dcond"3d gmrf with conditional variance parameterization. "2dar1"2d separable ar1 in bin and year dimensions. if any fleet has cont_tv_fish_sel != "none", both fishsel_pe_pars_spec and fish_sel_devs_spec must also be provided."><td><code class="optref-arg">cont_tv_fish_sel</code></td><td><code>paste("none_Fleet_", 1:input_list$data$n_fish_fleets, sep = "")</code></td><td>Character vector of length n_fish_fleets specifying continuous time-varying selectivity per fleet. Each element must be "<type>_Fleet_<f>". Valid types: "none"No continuous time-variation (default). "iid"IID annual deviations on selectivity parameters. "rw"Random walk in selectivity parameters over time. "3dmarg"3D GMRF with marginal variance parameterization. "3dcond"3D GMRF with conditional variance parameterization. "2dar1"2D separable AR1 in bin and year dimensions. If any fleet has cont_tv_fish_sel != "none", both fishsel_pe_pars_spec and fish_sel_devs_spec must also be provided.</td></tr> <tr data-k="fish_sel_blocks paste("none_fleet_", 1:input_list$data$n_fish_fleets, sep = "") character vector defining discrete selectivity time blocks per fleet. each element follows "block_<b>_year_<s>-<e>_fleet_<f>" or "block_<b>_year_<s>-terminal_fleet_<f>". use "none_fleet_<f>" (default) for a single constant block. blocks must be non-overlapping and together span all model years for the specified fleet. mutually exclusive with cont_tv_fish_sel != "none" for the same fleet."><td><code class="optref-arg">fish_sel_blocks</code></td><td><code>paste("none_Fleet_", 1:input_list$data$n_fish_fleets, sep = "")</code></td><td>Character vector defining discrete selectivity time blocks per fleet. Each element follows "Block_<b>_Year_<s>-<e>_Fleet_<f>" or "Block_<b>_Year_<s>-terminal_Fleet_<f>". Use "none_Fleet_<f>" (default) for a single constant block. Blocks must be non-overlapping and together span all model years for the specified fleet. Mutually exclusive with cont_tv_fish_sel != "none" for the same fleet.</td></tr> <tr data-k="fish_sel_model required character vector specifying the selectivity functional form for each fleet (and optionally each time block). each element must follow one of: "<model>_fleet_<f>": single form for all years of fleet f. "<model>_fleet_<f>_block_<b>": form specific to block b of fleet f, as defined in fish_sel_blocks. available models: "logist1"logistic with a_{50} and slope k (2 parameters). "logist2"logistic with a_{50} and a_{95} (2 parameters). "gamma"dome-shaped gamma with a_{max} and \delta (2 parameters). "exponential"exponential with a single power parameter (1 parameter). "dbnrml"double-normal with 6 parameters. "nonpar"non-parametric over discrete age or length bins, on the logit scale, then mean-standardized jointly over years and bins so the grand mean of the surface is one. bins may be grouped through the non-parametric bin mapping. no fixed functional form is imposed. "nonparlog"non-parametric on the log scale, standardized so each year's selectivity averages to one over *_sel_norm_bins. only within-year contrasts are identified; the level is absorbed by catchability or fishing mortality. "nonparfree"non-parametric on the log scale with no standardization, \exp(\theta), so the values hold the height of the curve as well as its shape. this is the form for a data source fit age by age: a free catchability per age and a selectivity estimated at age are one quantity written two ways, so the whole age multiplier lives here and no catchability is set. pin one bin, by leaving it out of the estimated bins, whenever the mean it multiplies is also free. "asymplogist1"logistic selectivity with a_{50} and slope k and asymptotic control (3 parameters). "asymplogist2"logistic selectivity with a_{50} and a_{95} and asymptotic control (3 parameters). "bicubic"bicubic spline over a bin-node x year-node grid (see get_selex, selex_model == 8). specified as "bicubic_bin_<n_bin_nodes>_yr_<n_yr_nodes>_fleet_x" (optionally with _block_k). one generalized form covers a smooth bin x year surface (n_yr_nodes > 1), a time-invariant bin-only spline (n_yr_nodes == 1), or a bin-only spline re-fit independently per year-block (n_yr_nodes == 1 within each of several blocks defined via fish_sel_blocks). an optional _selstyr_<year> suffix (a calendar year within the block) restricts the actual spline fit to selstyr:block-end; years within the block before selstyr are kept constant at the selstyr year's fitted curve, rather than fitting the surface over the whole block. an optional _nselbins_<n> suffix restricts the actual spline fit to the first n bins (ages or lengths, per fish_selex_type); bins beyond n are kept constant at the last fitted bin's curve. see the model equations vignette for mathematical definitions."><td><code class="optref-arg">fish_sel_model</code></td><td><em class="optref-req">required</em></td><td>Character vector specifying the selectivity functional form for each fleet (and optionally each time block). Each element must follow one of: "<model>_Fleet_<f>": single form for all years of fleet f. "<model>_Fleet_<f>_Block_<b>": form specific to block b of fleet f, as defined in fish_sel_blocks. Available models: "logist1"Logistic with a_{50} and slope k (2 parameters). "logist2"Logistic with a_{50} and a_{95} (2 parameters). "gamma"Dome-shaped gamma with a_{max} and \delta (2 parameters). "exponential"Exponential with a single power parameter (1 parameter). "dbnrml"Double-normal with 6 parameters. "nonpar"Non-parametric over discrete age or length bins, on the logit scale, then mean-standardized jointly over years and bins so the grand mean of the surface is one. Bins may be grouped through the non-parametric bin mapping. No fixed functional form is imposed. "nonparlog"Non-parametric on the log scale, standardized so each year's selectivity averages to one over *_sel_norm_bins. Only within-year contrasts are identified; the level is absorbed by catchability or fishing mortality. "nonparfree"Non-parametric on the log scale with no standardization, \exp(\theta), so the values hold the height of the curve as well as its shape. This is the form for a data source fit age by age: a free catchability per age and a selectivity estimated at age are one quantity written two ways, so the whole age multiplier lives here and no catchability is set. Pin one bin, by leaving it out of the estimated bins, whenever the mean it multiplies is also free. "asymplogist1"Logistic selectivity with a_{50} and slope k and asymptotic control (3 parameters). "asymplogist2"Logistic selectivity with a_{50} and a_{95} and asymptotic control (3 parameters). "bicubic"Bicubic spline over a bin-node x year-node grid (see Get_Selex, Selex_Model == 8). Specified as "bicubic_Bin_<n_bin_nodes>_Yr_<n_yr_nodes>_Fleet_x" (optionally with _Block_k). One generalized form covers a smooth bin x year surface (n_yr_nodes > 1), a time-invariant bin-only spline (n_yr_nodes == 1), or a bin-only spline re-fit independently per year-block (n_yr_nodes == 1 within each of several blocks defined via fish_sel_blocks). An optional _SelStyr_<year> suffix (a calendar year within the block) restricts the actual spline fit to SelStyr:block-end; years within the block before SelStyr are kept constant at the SelStyr year's fitted curve, rather than fitting the surface over the whole block. An optional _NSelBins_<n> suffix restricts the actual spline fit to the first n bins (ages or lengths, per fish_selex_type); bins beyond n are kept constant at the last fitted bin's curve. See the model equations vignette for mathematical definitions.</td></tr> <tr data-k="use_fish_q_prior 0 integer flag. 1 = apply lognormal priors to catchability; 0 = no priors (default). requires fish_q_prior."><td><code class="optref-arg">Use_fish_q_prior</code></td><td><code>0</code></td><td>Integer flag. 1 = apply lognormal priors to catchability; 0 = no priors (default). Requires fish_q_prior.</td></tr> <tr data-k="fish_q_prior na data frame of catchability prior hyperparameters. required columns: region, fleet, block (block index), mu (prior mean on natural scale), sd (prior sd on log scale). each row specifies a \text{normal}(\log(\mu), \sigma) prior for one catchability parameter. only used when use_fish_q_prior = 1."><td><code class="optref-arg">fish_q_prior</code></td><td><code>NA</code></td><td>Data frame of catchability prior hyperparameters. Required columns: region, fleet, block (block index), mu (prior mean on natural scale), sd (prior SD on log scale). Each row specifies a \text{Normal}(\log(\mu), \sigma) prior for one catchability parameter. Only used when Use_fish_q_prior = 1.</td></tr> <tr data-k="fish_q_blocks paste("none_fleet_", 1:input_list$data$n_fish_fleets, sep = "") character vector defining catchability time blocks per fleet, using the same format as fish_sel_blocks. default "none_fleet_<f>" gives a single constant block."><td><code class="optref-arg">fish_q_blocks</code></td><td><code>paste("none_Fleet_", 1:input_list$data$n_fish_fleets, sep = "")</code></td><td>Character vector defining catchability time blocks per fleet, using the same format as fish_sel_blocks. Default "none_Fleet_<f>" gives a single constant block.</td></tr> <tr data-k="fish_q_type rep("est", input_list$data$n_fish_fleets) character vector of length n_fish_fleets controlling how catchability is obtained. "est" (default) estimates ln_fish_q. "arith" concentrates it out of the likelihood as the ratio of mean observed to mean predicted index, and "geo" does the same on the log scale as exp(mean(log(obs) - log(pred))). both analytic forms use only the years with observations and fix that fleet's ln_fish_q regardless of fish_q_spec. the solve is done within each fish_q_blocks time block, so a blocked catchability gets one solved value per block. a single block, the default, is one value for the whole series."><td><code class="optref-arg">fish_q_type</code></td><td><code>rep("est", input_list$data$n_fish_fleets)</code></td><td>Character vector of length n_fish_fleets controlling how catchability is obtained. "est" (default) estimates ln_fish_q. "arith" concentrates it out of the likelihood as the ratio of mean observed to mean predicted index, and "geo" does the same on the log scale as exp(mean(log(obs) - log(pred))). Both analytic forms use only the years with observations and fix that fleet's ln_fish_q regardless of fish_q_spec. The solve is done within each fish_q_blocks time block, so a blocked catchability gets one solved value per block. A single block, the default, is one value for the whole series.</td></tr> <tr data-k="fish_q_cov_dat null named list of numeric vectors (length = n_years) containing the covariate time series referenced in fish_q_formula. all vectors must be the same length and contain no missing values; set values to 0 for years when the fishery index is not active. default null."><td><code class="optref-arg">fish_q_cov_dat</code></td><td><code>NULL</code></td><td>Named list of numeric vectors (length = n_years) containing the covariate time series referenced in fish_q_formula. All vectors must be the same length and contain no missing values; set values to 0 for years when the fishery index is not active. Default NULL.</td></tr> <tr data-k="fish_q_formula null named list of one-sided formulas, one element per fleet requiring catchability covariates, referencing series in fish_q_cov_dat. null (default) excludes covariate effects."><td><code class="optref-arg">fish_q_formula</code></td><td><code>NULL</code></td><td>Named list of one-sided formulas, one element per fleet requiring catchability covariates, referencing series in fish_q_cov_dat. NULL (default) excludes covariate effects.</td></tr> <tr data-k="fishsel_pe_pars_spec null character vector of length n_fish_fleets specifying the estimation structure for selectivity process error hyperparameters. required when any fleet has continuous time-variation. see do_sel_pe_pars_mapping for all options."><td><code class="optref-arg">fishsel_pe_pars_spec</code></td><td><code>NULL</code></td><td>Character vector of length n_fish_fleets specifying the estimation structure for selectivity process error hyperparameters. Required when any fleet has continuous time-variation. See do_sel_pe_pars_mapping for all options.</td></tr> <tr data-k="fish_fixed_sel_pars_spec null character vector of length n_fish_fleets specifying how fixed-effect selectivity parameters are estimated. see do_fixed_sel_pars_mapping for all options ("est_all", "est_shared_r", "est_shared_s", "est_shared_r_s", "est_shared_f_x", "fix")."><td><code class="optref-arg">fish_fixed_sel_pars_spec</code></td><td><code>NULL</code></td><td>Character vector of length n_fish_fleets specifying how fixed-effect selectivity parameters are estimated. See do_fixed_sel_pars_mapping for all options ("est_all", "est_shared_r", "est_shared_s", "est_shared_r_s", "est_shared_f_x", "fix").</td></tr> <tr data-k="fish_q_spec null character vector of length n_fish_fleets specifying catchability estimation structure. see do_q_mapping for options ("est_all", "est_shared_r", "fix")."><td><code class="optref-arg">fish_q_spec</code></td><td><code>NULL</code></td><td>Character vector of length n_fish_fleets specifying catchability estimation structure. See do_q_mapping for options ("est_all", "est_shared_r", "fix").</td></tr> <tr data-k="fish_sel_devs_spec null character vector of length n_fish_fleets specifying the estimation structure for annual selectivity deviations. required when any fleet has continuous time-variation. see do_sel_devs_mapping for all options including age-sharing options for semi-parametric forms."><td><code class="optref-arg">fish_sel_devs_spec</code></td><td><code>NULL</code></td><td>Character vector of length n_fish_fleets specifying the estimation structure for annual selectivity deviations. Required when any fleet has continuous time-variation. See do_sel_devs_mapping for all options including age-sharing options for semi-parametric forms.</td></tr> <tr data-k="corr_opt_semipar null character vector of length n_fish_fleets controlling which correlation components to suppress in semi-parametric (3d gmrf or 2d ar1) time-varying selectivity. set to na (default) for no suppression. see do_sel_pe_pars_mapping for valid suppression codes. cohort-correlation options are invalid for "2dar1"."><td><code class="optref-arg">corr_opt_semipar</code></td><td><code>NULL</code></td><td>Character vector of length n_fish_fleets controlling which correlation components to suppress in semi-parametric (3D GMRF or 2D AR1) time-varying selectivity. Set to NA (default) for no suppression. See do_sel_pe_pars_mapping for valid suppression codes. Cohort-correlation options are invalid for "2dar1".</td></tr> <tr data-k="use_fish_selex_prior 0 integer flag. 1 = apply lognormal priors to selectivity parameters; 0 = no priors (default). requires fish_selex_prior."><td><code class="optref-arg">Use_fish_selex_prior</code></td><td><code>0</code></td><td>Integer flag. 1 = apply lognormal priors to selectivity parameters; 0 = no priors (default). Requires fish_selex_prior.</td></tr> <tr data-k="fish_selex_prior null data frame of selectivity prior hyperparameters, one row per prior. required columns: region, fleet, block, sex, par (parameter index within the functional form), mu, sd, plus an optional type giving each row's target: "par" (the default when the column is absent) is a lognormal prior on one fixed selectivity parameter, with mu on the natural scale and sd on the log scale; "value" is a normal prior on the realized selectivity value at one bin, with both on the natural scale, where par instead names the bin (on ages or lengths per fish_selex_type) and the value is read at the first model year of block. a "value" row constrains the derived selectivity value rather than the parameters, matching the admb convention of pinning selectivity at a reference age near one, which no set of independent parameter priors can express. only used when use_fish_selex_prior = 1."><td><code class="optref-arg">fish_selex_prior</code></td><td><code>NULL</code></td><td>Data frame of selectivity prior hyperparameters, one row per prior. Required columns: region, fleet, block, sex, par (parameter index within the functional form), mu, sd, plus an optional type giving each row's target: "par" (the default when the column is absent) is a lognormal prior on one fixed selectivity parameter, with mu on the natural scale and sd on the log scale; "value" is a normal prior on the realized selectivity value at one bin, with both on the natural scale, where par instead names the bin (on ages or lengths per fish_selex_type) and the value is read at the first model year of block. A "value" row constrains the derived selectivity value rather than the parameters, matching the ADMB convention of pinning selectivity at a reference age near one, which no set of independent parameter priors can express. Only used when Use_fish_selex_prior = 1.</td></tr> <tr data-k="use_fish_selex_penalty 0 integer (0/1). whether a centering penalty is applied to sets of fishery selectivity fixed-effect parameters. default 0."><td><code class="optref-arg">Use_fish_selex_penalty</code></td><td><code>0</code></td><td>Integer (0/1). Whether a centering penalty is applied to sets of fishery selectivity fixed-effect parameters. Default 0.</td></tr> <tr data-k="fish_sel_norm_bins null list with one element per fishery fleet naming the bins the mean-one standardization averages over, or null for fleets standardizing over every bin (selex_model = 9 only). a gear whose catchability is defined against part of the bin range standardizes over that part, and catchability absorbs the difference in scale. default null."><td><code class="optref-arg">fish_sel_norm_bins</code></td><td><code>NULL</code></td><td>List with one element per fishery fleet naming the bins the mean-one standardization averages over, or NULL for fleets standardizing over every bin (Selex_Model = 9 only). A gear whose catchability is defined against part of the bin range standardizes over that part, and catchability absorbs the difference in scale. Default NULL.</td></tr> <tr data-k="fish_sel_bin_dev_bins null list with one element per fishery fleet naming the bins that fleet overrides, or null for fleets with no overrides (e.g. list(1, null) frees bin 1 of fleet 1 only). an overridden bin takes a freely estimated annual value \exp(\epsilon_{y,b}) in place of whatever the functional form produced, applied after every other transformation including standardization. the rest of the curve keeps its parametric shape. default null."><td><code class="optref-arg">fish_sel_bin_dev_bins</code></td><td><code>NULL</code></td><td>List with one element per fishery fleet naming the bins that fleet overrides, or NULL for fleets with no overrides (e.g. list(1, NULL) frees bin 1 of fleet 1 only). An overridden bin takes a freely estimated annual value \exp(\epsilon_{y,b}) in place of whatever the functional form produced, applied after every other transformation including standardization. The rest of the curve keeps its parametric shape. Default NULL.</td></tr> <tr data-k="fishsel_pe_wt rep(1, input_list$data$n_fish_fleets) numeric vector of length n_fish_fleets. per-fleet multiplier on the fishery selectivity process error likelihood. default 1 for every fleet. 0 skips that fleet's process error likelihood altogether, so the deviations stay estimated but enter the objective only through the data and any explicit smoothness or centering penalties, which is how several existing assessments constrain them. values other than 0 or 1 make an estimated process error sigma reinterpretable, so prefer 0 or 1 unless deliberately down-weighting. applies only to ln_fishsel_devs; the bin-override deviations have their own process error and are not affected."><td><code class="optref-arg">fishsel_pe_wt</code></td><td><code>rep(1, input_list$data$n_fish_fleets)</code></td><td>Numeric vector of length n_fish_fleets. Per-fleet multiplier on the fishery selectivity process error likelihood. Default 1 for every fleet. 0 skips that fleet's process error likelihood altogether, so the deviations stay estimated but enter the objective only through the data and any explicit smoothness or centering penalties, which is how several existing assessments constrain them. Values other than 0 or 1 make an estimated process error sigma reinterpretable, so prefer 0 or 1 unless deliberately down-weighting. Applies only to ln_fishsel_devs; the bin-override deviations have their own process error and are not affected.</td></tr> <tr data-k="fishsel_rw_init_sigma rep(5, input_list$data$n_fish_fleets) numeric vector of length n_fish_fleets. standard deviation given to the first year of an "rw" deviation series. default 5, which leaves that year effectively free. na instead starts the walk at zero under the walk's own estimated sigma, making the first year as smooth as every later step. appropriate when the base parametric curve already describes the first year well."><td><code class="optref-arg">fishsel_rw_init_sigma</code></td><td><code>rep(5, input_list$data$n_fish_fleets)</code></td><td>Numeric vector of length n_fish_fleets. Standard deviation given to the first year of an "rw" deviation series. Default 5, which leaves that year effectively free. NA instead starts the walk at zero under the walk's own estimated sigma, making the first year as smooth as every later step. Appropriate when the base parametric curve already describes the first year well.</td></tr> <tr data-k="fishsel_dont_est_dev_first rep(0, input_list$data$n_fish_fleets) integer vector of length n_fish_fleets of 0/1, default 0. where 1, that fleet's deviations start in year two and the fixed selectivity parameters hold year one. a non-parametric form ("nonpar", "nonparlog", "nonparfree") has one free base parameter per bin, so year one's deviation is that same value written twice and only fishsel_rw_init_sigma separates them, as a prior on a level that is usually meant to be free. dropping it removes the redundant parameter and that prior, and leaves the walk a sum of differences. refused for the gmrf and 2d ar1 forms, whose deviations are a field over years and bins rather than a walk anchored at year one."><td><code class="optref-arg">fishsel_dont_est_dev_first</code></td><td><code>rep(0, input_list$data$n_fish_fleets)</code></td><td>Integer vector of length n_fish_fleets of 0/1, default 0. Where 1, that fleet's deviations start in year two and the fixed selectivity parameters hold year one. A non-parametric form ("nonpar", "nonparlog", "nonparfree") has one free base parameter per bin, so year one's deviation is that same value written twice and only fishsel_rw_init_sigma separates them, as a prior on a level that is usually meant to be free. Dropping it removes the redundant parameter and that prior, and leaves the walk a sum of differences. Refused for the GMRF and 2D AR1 forms, whose deviations are a field over years and bins rather than a walk anchored at year one.</td></tr> <tr data-k="cont_tv_fishsel_bin_devs rep("none", input_list$data$n_fish_fleets) character vector of length n_fish_fleets giving the process error on the bin-override deviations for each fleet: "none" (default), "iid", or "rw". a random walk has its own estimated sigma per bin, with fishsel_bin_devs_rw_init_sigma governing its first year."><td><code class="optref-arg">cont_tv_fishsel_bin_devs</code></td><td><code>rep("none", input_list$data$n_fish_fleets)</code></td><td>Character vector of length n_fish_fleets giving the process error on the bin-override deviations for each fleet: "none" (default), "iid", or "rw". A random walk has its own estimated sigma per bin, with fishsel_bin_devs_rw_init_sigma governing its first year.</td></tr> <tr data-k="fish_selex_penalty null data frame of centering penalty specifications, required when use_fish_selex_penalty = 1. required columns: region, fleet, block, sex, par, and wt. each row penalizes wt * (log(mean(exp(pars))))^2 over the set of parameters named in par, which may be a single index or a list column of integer vectors naming a whole set. this pins the scalar of a non-parametric curve that catchability or fishing mortality would otherwise absorb, and is softer than fixing a bin outright. intended for parameter sets kept on the log scale. default null."><td><code class="optref-arg">fish_selex_penalty</code></td><td><code>NULL</code></td><td>Data frame of centering penalty specifications, required when Use_fish_selex_penalty = 1. Required columns: region, fleet, block, sex, par, and wt. Each row penalizes wt * (log(mean(exp(pars))))^2 over the set of parameters named in par, which may be a single index or a list column of integer vectors naming a whole set. This pins the scalar of a non-parametric curve that catchability or fishing mortality would otherwise absorb, and is softer than fixing a bin outright. Intended for parameter sets kept on the log scale. Default NULL.</td></tr> <tr data-k="fishsel_devs_shared_bins null list of integer vectors grouping age or length bins that share a single deviation series. only used when fish_sel_devs_spec contains one of the "est_shared_b" variants. example: list(1:5, 6:10, 11:30)."><td><code class="optref-arg">fishsel_devs_shared_bins</code></td><td><code>NULL</code></td><td>List of integer vectors grouping age or length bins that share a single deviation series. Only used when fish_sel_devs_spec contains one of the "est_shared_b" variants. Example: list(1:5, 6:10, 11:30).</td></tr> <tr data-k="fish_selex_type "age" character scalar specifying whether selectivity is age- or length-based. options: "age"selectivity is defined over age bins. "length"selectivity is defined over length bins. determines the bin dimension used for all fishery selectivity functions, including parametric, time-varying, and non-parametric forms."><td><code class="optref-arg">fish_selex_type</code></td><td><code>"age"</code></td><td>Character scalar specifying whether selectivity is age- or length-based. Options: "age"Selectivity is defined over age bins. "length"Selectivity is defined over length bins. Determines the bin dimension used for all fishery selectivity functions, including parametric, time-varying, and non-parametric forms.</td></tr> <tr data-k="use_fixed_fish_sel rep(0, input_list$data$n_fish_fleets) integer vector of length n_fish_fleets indicating whether fishery selectivity is fixed (1) or estimated (0) for each fleet."><td><code class="optref-arg">use_fixed_fish_sel</code></td><td><code>rep(0, input_list$data$n_fish_fleets)</code></td><td>Integer vector of length n_fish_fleets indicating whether fishery selectivity is fixed (1) or estimated (0) for each fleet.</td></tr> <tr data-k="fish_sel_input null array of fixed fishery selectivity values with dimensions: [n_pop × n_regions × n_years × n_seas × n_bins × n_sexes × n_fish_fleets]. required when any element of use_fixed_fish_sel == 1."><td><code class="optref-arg">fish_sel_input</code></td><td><code>NULL</code></td><td>Array of fixed fishery selectivity values with dimensions: [n_pop × n_regions × n_years × n_seas × n_bins × n_sexes × n_fish_fleets]. Required when any element of use_fixed_fish_sel == 1.</td></tr> <tr data-k="fish_sel_nonpar_est_bins null optional list defining bin groupings for non-parametric fishery selectivity. structure is [[fleet]][[block]], where each element is a list of integer vectors. each vector defines a group of bins that share a single estimated selectivity parameter. indices must correspond to the bin dimension defined by fish_selex_type."><td><code class="optref-arg">fish_sel_nonpar_est_bins</code></td><td><code>NULL</code></td><td>Optional list defining bin groupings for non-parametric fishery selectivity. Structure is [[fleet]][[block]], where each element is a list of integer vectors. Each vector defines a group of bins that share a single estimated selectivity parameter. Indices must correspond to the bin dimension defined by fish_selex_type.</td></tr> <tr data-k="fish_sel_sex_offset rep("none", input_list$data$n_fish_fleets) character vector of length n_fish_fleets linking the sexes of a fleet's selectivity, for models with n_sexes > 1. options per fleet: "none" (default)each sex's stored parameters are its own. "par"the stored fixed-effect parameter slots of every sex beyond the first hold additive offsets on the first sex's stored (transformed-scale) parameters, so for log-scale parameters the sex-s natural value is the first sex's times e^{\delta}. offsets fixed at zero reproduce sex-shared parameters; estimating them links the sexes through the offset the way several existing assessments parameterize male selectivity. "scale"each sex keeps its own parameters, and every sex beyond the first additionally has a constant log-scale offset on the whole realized curve, exp(ln_fishsel_sex_scale), estimated per region, block, and sex. the scaled curve may exceed one. refused for non-parametric forms and semi-parametric time variation, whose post-hoc standardization would cancel a constant multiplier. "apical"each sex keeps its own parameters, and for every sex beyond the first the double normal builds its limbs up to exp(ln_*sel_sex_scale) rather than to one. selectivity at the first and last bins stays where that sex's own parameters put it, so the offset moves the middle of the curve and leaves its ends anchored. requires the double normal. "par_apical"both a par offset and an apical offset. "par_scale"both a par offset and a scale offset."><td><code class="optref-arg">fish_sel_sex_offset</code></td><td><code>rep("none", input_list$data$n_fish_fleets)</code></td><td>Character vector of length n_fish_fleets linking the sexes of a fleet's selectivity, for models with n_sexes > 1. Options per fleet: "none" (default)Each sex's stored parameters are its own. "par"The stored fixed-effect parameter slots of every sex beyond the first hold additive offsets on the first sex's stored (transformed-scale) parameters, so for log-scale parameters the sex-s natural value is the first sex's times e^{\delta}. Offsets fixed at zero reproduce sex-shared parameters; estimating them links the sexes through the offset the way several existing assessments parameterize male selectivity. "scale"Each sex keeps its own parameters, and every sex beyond the first additionally has a constant log-scale offset on the whole realized curve, exp(ln_fishsel_sex_scale), estimated per region, block, and sex. The scaled curve may exceed one. Refused for non-parametric forms and semi-parametric time variation, whose post-hoc standardization would cancel a constant multiplier. "apical"Each sex keeps its own parameters, and for every sex beyond the first the double normal builds its limbs up to exp(ln_*sel_sex_scale) rather than to one. Selectivity at the first and last bins stays where that sex's own parameters put it, so the offset moves the middle of the curve and leaves its ends anchored. Requires the double normal. "par_apical"Both a par offset and an apical offset. "par_scale"Both a par offset and a scale offset.</td></tr> <tr data-k="fish_sel_dbnrml_raw null null (default) or a 0/1 matrix [n_fish_fleets x 2] for fleets on the double normal: column one leaves the ascending limb as a raw gaussian instead of anchoring it to p5 at the first bin, column two does the same for the descending limb and p6."><td><code class="optref-arg">fish_sel_dbnrml_raw</code></td><td><code>NULL</code></td><td>NULL (default) or a 0/1 matrix [n_fish_fleets x 2] for fleets on the double normal: column one leaves the ascending limb as a raw Gaussian instead of anchoring it to p5 at the first bin, column two does the same for the descending limb and p6.</td></tr> <tr data-k="fish_sel_dbnrml_startbin null null (default) or an integer vector [n_fish_fleets], the bin each fleet's double normal anchors its ascending limb at (1 is the first bin). bins below it take the squared ratio of their bin to it times the selectivity there, stock synthesis's convention when the compositions start above the population's first length bin."><td><code class="optref-arg">fish_sel_dbnrml_startbin</code></td><td><code>NULL</code></td><td>NULL (default) or an integer vector [n_fish_fleets], the bin each fleet's double normal anchors its ascending limb at (1 is the first bin). Bins below it take the squared ratio of their bin to it times the selectivity there, Stock Synthesis's convention when the compositions start above the population's first length bin.</td></tr> <tr data-k="cont_tv_ret_sel paste("none_fleet_", 1:input_list$data$n_fish_fleets, sep = "") character vector of length n_fish_fleets specifying continuous time-varying selectivity per fleet. each element must be "<type>_fleet_<f>". valid types: "none"no continuous time-variation (default). "iid"iid annual deviations on selectivity parameters. "rw"random walk in selectivity parameters over time. "3dmarg"3d gmrf with marginal variance parameterization. "3dcond"3d gmrf with conditional variance parameterization. "2dar1"2d separable ar1 in bin and year dimensions. if any fleet has cont_tv_ret_sel != "none", both retsel_pe_pars_spec and ret_sel_devs_spec must also be provided."><td><code class="optref-arg">cont_tv_ret_sel</code></td><td><code>paste("none_Fleet_", 1:input_list$data$n_fish_fleets, sep = "")</code></td><td>Character vector of length n_fish_fleets specifying continuous time-varying selectivity per fleet. Each element must be "<type>_Fleet_<f>". Valid types: "none"No continuous time-variation (default). "iid"IID annual deviations on selectivity parameters. "rw"Random walk in selectivity parameters over time. "3dmarg"3D GMRF with marginal variance parameterization. "3dcond"3D GMRF with conditional variance parameterization. "2dar1"2D separable AR1 in bin and year dimensions. If any fleet has cont_tv_ret_sel != "none", both retsel_pe_pars_spec and ret_sel_devs_spec must also be provided.</td></tr> <tr data-k="ret_sel_blocks paste("none_fleet_", 1:input_list$data$n_fish_fleets, sep = "") character vector defining discrete selectivity time blocks per fleet. each element follows "block_<b>_year_<s>-<e>_fleet_<f>" or "block_<b>_year_<s>-terminal_fleet_<f>". use "none_fleet_<f>" (default) for a single constant block. blocks must be non-overlapping and together span all model years for the specified fleet. mutually exclusive with cont_tv_ret_sel != "none" for the same fleet."><td><code class="optref-arg">ret_sel_blocks</code></td><td><code>paste("none_Fleet_", 1:input_list$data$n_fish_fleets, sep = "")</code></td><td>Character vector defining discrete selectivity time blocks per fleet. Each element follows "Block_<b>_Year_<s>-<e>_Fleet_<f>" or "Block_<b>_Year_<s>-terminal_Fleet_<f>". Use "none_Fleet_<f>" (default) for a single constant block. Blocks must be non-overlapping and together span all model years for the specified fleet. Mutually exclusive with cont_tv_ret_sel != "none" for the same fleet.</td></tr> <tr data-k="ret_sel_model paste("logist1_fleet_", 1:input_list$data$n_fish_fleets, sep = "") character vector specifying the selectivity functional form for each fleet (and optionally each time block). each element must follow one of: "<model>_fleet_<f>": single form for all years of fleet f. "<model>_fleet_<f>_block_<b>": form specific to block b of fleet f, as defined in ret_sel_blocks. available models: "logist1"logistic with a_{50} and slope k (2 parameters). "logist2"logistic with a_{50} and a_{95} (2 parameters). "gamma"dome-shaped gamma with a_{max} and \delta (2 parameters). "exponential"exponential with a single power parameter (1 parameter). "dbnrml"double-normal with 6 parameters. "nonpar"non-parametric over discrete age or length bins, on the logit scale, then mean-standardized jointly over years and bins so the grand mean of the surface is one. bins may be grouped through the non-parametric bin mapping. no fixed functional form is imposed. "nonparlog"non-parametric on the log scale, standardized so each year's selectivity averages to one over *_sel_norm_bins. only within-year contrasts are identified; the level is absorbed by catchability or fishing mortality. "nonparfree"non-parametric on the log scale with no standardization, \exp(\theta), so the values hold the height of the curve as well as its shape. this is the form for a data source fit age by age: a free catchability per age and a selectivity estimated at age are one quantity written two ways, so the whole age multiplier lives here and no catchability is set. pin one bin, by leaving it out of the estimated bins, whenever the mean it multiplies is also free. "asymplogist1"logistic selectivity with a_{50} and slope k and asymptotic control (3 parameters). "asymplogist2"logistic selectivity with a_{50} and a_{95} and asymptotic control (3 parameters). "bicubic"bicubic spline over a bin-node x year-node grid, specified as "bicubic_bin_<n_bin_nodes>_yr_<n_yr_nodes>_fleet_x" (optionally with _block_k, _selstyr_<year>, and/or _nselbins_<n>); see fish_sel_model above for the full syntax and get_selex (selex_model == 8) for the underlying math. see the model equations vignette for mathematical definitions."><td><code class="optref-arg">ret_sel_model</code></td><td><code>paste("logist1_Fleet_", 1:input_list$data$n_fish_fleets, sep = "")</code></td><td>Character vector specifying the selectivity functional form for each fleet (and optionally each time block). Each element must follow one of: "<model>_Fleet_<f>": single form for all years of fleet f. "<model>_Fleet_<f>_Block_<b>": form specific to block b of fleet f, as defined in ret_sel_blocks. Available models: "logist1"Logistic with a_{50} and slope k (2 parameters). "logist2"Logistic with a_{50} and a_{95} (2 parameters). "gamma"Dome-shaped gamma with a_{max} and \delta (2 parameters). "exponential"Exponential with a single power parameter (1 parameter). "dbnrml"Double-normal with 6 parameters. "nonpar"Non-parametric over discrete age or length bins, on the logit scale, then mean-standardized jointly over years and bins so the grand mean of the surface is one. Bins may be grouped through the non-parametric bin mapping. No fixed functional form is imposed. "nonparlog"Non-parametric on the log scale, standardized so each year's selectivity averages to one over *_sel_norm_bins. Only within-year contrasts are identified; the level is absorbed by catchability or fishing mortality. "nonparfree"Non-parametric on the log scale with no standardization, \exp(\theta), so the values hold the height of the curve as well as its shape. This is the form for a data source fit age by age: a free catchability per age and a selectivity estimated at age are one quantity written two ways, so the whole age multiplier lives here and no catchability is set. Pin one bin, by leaving it out of the estimated bins, whenever the mean it multiplies is also free. "asymplogist1"Logistic selectivity with a_{50} and slope k and asymptotic control (3 parameters). "asymplogist2"Logistic selectivity with a_{50} and a_{95} and asymptotic control (3 parameters). "bicubic"Bicubic spline over a bin-node x year-node grid, specified as "bicubic_Bin_<n_bin_nodes>_Yr_<n_yr_nodes>_Fleet_x" (optionally with _Block_k, _SelStyr_<year>, and/or _NSelBins_<n>); see fish_sel_model above for the full syntax and Get_Selex (Selex_Model == 8) for the underlying math. See the model equations vignette for mathematical definitions.</td></tr> <tr data-k="retsel_pe_pars_spec null character vector of length n_fish_fleets specifying the estimation structure for selectivity process error hyperparameters. required when any fleet has continuous time-variation. see do_sel_pe_pars_mapping for all options."><td><code class="optref-arg">retsel_pe_pars_spec</code></td><td><code>NULL</code></td><td>Character vector of length n_fish_fleets specifying the estimation structure for selectivity process error hyperparameters. Required when any fleet has continuous time-variation. See do_sel_pe_pars_mapping for all options.</td></tr> <tr data-k="ret_fixed_sel_pars_spec rep("fix_ret_sel_input", input_list$data$n_fish_fleets) character vector of length n_fish_fleets specifying how fixed-effect selectivity parameters are estimated. see do_fixed_sel_pars_mapping for all options ("est_all", "est_shared_r", "est_shared_s", "est_shared_r_s", "est_shared_f_x", "fix")."><td><code class="optref-arg">ret_fixed_sel_pars_spec</code></td><td><code>rep("fix_ret_sel_input", input_list$data$n_fish_fleets)</code></td><td>Character vector of length n_fish_fleets specifying how fixed-effect selectivity parameters are estimated. See do_fixed_sel_pars_mapping for all options ("est_all", "est_shared_r", "est_shared_s", "est_shared_r_s", "est_shared_f_x", "fix").</td></tr> <tr data-k="ret_sel_devs_spec null character vector of length n_fish_fleets specifying the estimation structure for annual selectivity deviations. required when any fleet has continuous time-variation. see do_sel_devs_mapping for all options including age-sharing options for semi-parametric forms."><td><code class="optref-arg">ret_sel_devs_spec</code></td><td><code>NULL</code></td><td>Character vector of length n_fish_fleets specifying the estimation structure for annual selectivity deviations. Required when any fleet has continuous time-variation. See do_sel_devs_mapping for all options including age-sharing options for semi-parametric forms.</td></tr> <tr data-k="ret_sel_corr_opt_semipar null character vector of length n_fish_fleets controlling which correlation components to suppress in semi-parametric (3d gmrf or 2d ar1) time-varying selectivity. set to na (default) for no suppression. see do_sel_pe_pars_mapping for valid suppression codes. cohort-correlation options are invalid for "2dar1"."><td><code class="optref-arg">ret_sel_corr_opt_semipar</code></td><td><code>NULL</code></td><td>Character vector of length n_fish_fleets controlling which correlation components to suppress in semi-parametric (3D GMRF or 2D AR1) time-varying selectivity. Set to NA (default) for no suppression. See do_sel_pe_pars_mapping for valid suppression codes. Cohort-correlation options are invalid for "2dar1".</td></tr> <tr data-k="use_ret_selex_prior 0 integer flag. 1 = apply lognormal priors to selectivity parameters; 0 = no priors (default). requires ret_selex_prior."><td><code class="optref-arg">Use_ret_selex_prior</code></td><td><code>0</code></td><td>Integer flag. 1 = apply lognormal priors to selectivity parameters; 0 = no priors (default). Requires ret_selex_prior.</td></tr> <tr data-k="ret_selex_prior null data frame of selectivity prior hyperparameters. required columns: region, fleet, block, sex, par, mu, sd, plus an optional type ("par"/"value"; see fish_selex_prior)."><td><code class="optref-arg">ret_selex_prior</code></td><td><code>NULL</code></td><td>Data frame of selectivity prior hyperparameters. Required columns: region, fleet, block, sex, par, mu, sd, plus an optional type ("par"/"value"; see fish_selex_prior).</td></tr> <tr data-k="retsel_devs_shared_bins null list of integer vectors grouping age or length bins that share a single deviation series. only used when ret_sel_devs_spec contains one of the "est_shared_b" variants. example: list(1:5, 6:10, 11:30)."><td><code class="optref-arg">retsel_devs_shared_bins</code></td><td><code>NULL</code></td><td>List of integer vectors grouping age or length bins that share a single deviation series. Only used when ret_sel_devs_spec contains one of the "est_shared_b" variants. Example: list(1:5, 6:10, 11:30).</td></tr> <tr data-k="retsel_pe_wt rep(1, input_list$data$n_fish_fleets) numeric vector of length n_fish_fleets. per-fleet multiplier on the retention selectivity process error likelihood, the retention counterpart of fishsel_pe_wt. default 1 for every fleet, and 0 skips that fleet's process error likelihood so its deviations stay estimated but are constrained only by the data and any explicit smoothness or centering penalties."><td><code class="optref-arg">retsel_pe_wt</code></td><td><code>rep(1, input_list$data$n_fish_fleets)</code></td><td>Numeric vector of length n_fish_fleets. Per-fleet multiplier on the retention selectivity process error likelihood, the retention counterpart of fishsel_pe_wt. Default 1 for every fleet, and 0 skips that fleet's process error likelihood so its deviations stay estimated but are constrained only by the data and any explicit smoothness or centering penalties.</td></tr> <tr data-k="retsel_rw_init_sigma rep(5, input_list$data$n_fish_fleets) numeric vector of length n_fish_fleets. standard deviation given to the first year of an "rw" retention deviation series, the retention counterpart of fishsel_rw_init_sigma. default 5; na instead starts the walk at zero under the walk's own estimated sigma."><td><code class="optref-arg">retsel_rw_init_sigma</code></td><td><code>rep(5, input_list$data$n_fish_fleets)</code></td><td>Numeric vector of length n_fish_fleets. Standard deviation given to the first year of an "rw" retention deviation series, the retention counterpart of fishsel_rw_init_sigma. Default 5; NA instead starts the walk at zero under the walk's own estimated sigma.</td></tr> <tr data-k="retsel_dont_est_dev_first rep(0, input_list$data$n_fish_fleets) integer vector of length n_fish_fleets of 0/1, default 0. where 1, that fleet's deviations start in year two and the fixed selectivity parameters hold year one. a non-parametric form ("nonpar", "nonparlog", "nonparfree") has one free base parameter per bin, so year one's deviation is that same value written twice and only retsel_rw_init_sigma separates them, as a prior on a level that is usually meant to be free. dropping it removes the redundant parameter and that prior, and leaves the walk a sum of differences. refused for the gmrf and 2d ar1 forms, whose deviations are a field over years and bins rather than a walk anchored at year one."><td><code class="optref-arg">retsel_dont_est_dev_first</code></td><td><code>rep(0, input_list$data$n_fish_fleets)</code></td><td>Integer vector of length n_fish_fleets of 0/1, default 0. Where 1, that fleet's deviations start in year two and the fixed selectivity parameters hold year one. A non-parametric form ("nonpar", "nonparlog", "nonparfree") has one free base parameter per bin, so year one's deviation is that same value written twice and only retsel_rw_init_sigma separates them, as a prior on a level that is usually meant to be free. Dropping it removes the redundant parameter and that prior, and leaves the walk a sum of differences. Refused for the GMRF and 2D AR1 forms, whose deviations are a field over years and bins rather than a walk anchored at year one.</td></tr> <tr data-k="ret_selex_type "age" character scalar specifying whether retained selectivity is age- or length-based. options: "age"selectivity is defined over age bins. "length"selectivity is defined over length bins. determines the bin dimension used for all retained selectivity functions, including parametric, time-varying, and non-parametric forms."><td><code class="optref-arg">ret_selex_type</code></td><td><code>"age"</code></td><td>Character scalar specifying whether retained selectivity is age- or length-based. Options: "age"Selectivity is defined over age bins. "length"Selectivity is defined over length bins. Determines the bin dimension used for all retained selectivity functions, including parametric, time-varying, and non-parametric forms.</td></tr> <tr data-k="use_fixed_ret_sel rep(1, input_list$data$n_fish_fleets) integer vector of length n_fish_fleets indicating whether to fix selectivity (1) or estimate it (0)."><td><code class="optref-arg">use_fixed_ret_sel</code></td><td><code>rep(1, input_list$data$n_fish_fleets)</code></td><td>Integer vector of length n_fish_fleets indicating whether to fix selectivity (1) or estimate it (0).</td></tr> <tr data-k="ret_sel_input array(1, dim = c(input_list$datadatadatadatadatadatadata$n_fish_fleets)) array of fixed selectivity values with dimensions [n_pop × n_regions × n_years × n_seas × n_bins × n_sexes × n_fish_fleets]."><td><code class="optref-arg">ret_sel_input</code></td><td><code>array(1, dim = c(input_list$datadatadatadatadatadatadata$n_fish_fleets))</code></td><td>Array of fixed selectivity values with dimensions [n_pop × n_regions × n_years × n_seas × n_bins × n_sexes × n_fish_fleets].</td></tr> <tr data-k="ret_sel_nonpar_est_bins null optional list specifying bin groupings for non-parametric retained selectivity. structure is [[fleet]][[block]], where each element is a list of bin index vectors defining grouped parameters."><td><code class="optref-arg">ret_sel_nonpar_est_bins</code></td><td><code>NULL</code></td><td>Optional list specifying bin groupings for non-parametric retained selectivity. Structure is [[fleet]][[block]], where each element is a list of bin index vectors defining grouped parameters.</td></tr> <tr data-k="ret_sel_sex_offset rep("none", input_list$data$n_fish_fleets) character vector of length n_fish_fleets linking the sexes of a fleet's retention curve, with the options and meaning of fish_sel_sex_offset. default "none". retention is a fraction, so a scale offset is only sensible where the scaled curve stays at or below one."><td><code class="optref-arg">ret_sel_sex_offset</code></td><td><code>rep("none", input_list$data$n_fish_fleets)</code></td><td>Character vector of length n_fish_fleets linking the sexes of a fleet's retention curve, with the options and meaning of fish_sel_sex_offset. Default "none". Retention is a fraction, so a scale offset is only sensible where the scaled curve stays at or below one.</td></tr> </tbody></table> </section> <section class="optref-stage" data-stage="Srvsel_and_Q"> <h3>Setup_Mod_Srvsel_and_Q</h3> <p class="optref-n">33 arguments</p> <table class="optref-table"> <thead><tr><th>Argument</th><th>Default</th><th>Description</th></tr></thead> <tbody> <tr data-k="cont_tv_srv_sel paste("none_fleet_", 1:input_list$data$n_srv_fleets, sep = "") character vector defining the continuous time-variation form per fleet. each element follows "<type>_fleet_x". options: "none"no continuous time variation (default). "iid"iid deviations across years. "rw"random walk in time. "3dmarg"3d marginal gmrf (age × year × cohort). "3dcond"3d conditional gmrf. "2dar1"2d ar1 (bin × year). when any fleet uses a non-"none" type, both srvsel_pe_pars_spec and srv_sel_devs_spec must be specified. default: "none_fleet_x" for each fleet."><td><code class="optref-arg">cont_tv_srv_sel</code></td><td><code>paste("none_Fleet_", 1:input_list$data$n_srv_fleets, sep = "")</code></td><td>Character vector defining the continuous time-variation form per fleet. Each element follows "<type>_Fleet_x". Options: "none"No continuous time variation (default). "iid"IID deviations across years. "rw"Random walk in time. "3dmarg"3D marginal GMRF (age × year × cohort). "3dcond"3D conditional GMRF. "2dar1"2D AR1 (bin × year). When any fleet uses a non-"none" type, both srvsel_pe_pars_spec and srv_sel_devs_spec must be specified. Default: "none_Fleet_x" for each fleet.</td></tr> <tr data-k="srv_sel_blocks paste("none_fleet_", 1:input_list$data$n_srv_fleets, sep = "") character vector defining discrete time blocks for survey selectivity. each element follows "block_k_year_a-b_fleet_x" or "none_fleet_x" (constant selectivity). use "terminal" in place of the end year to extend to the final model year. parsed into an internal array [n_regions × n_years × n_srv_fleets]. blocked and continuous time-varying selectivity are mutually exclusive for a given fleet. default: "none_fleet_x" for each fleet."><td><code class="optref-arg">srv_sel_blocks</code></td><td><code>paste("none_Fleet_", 1:input_list$data$n_srv_fleets, sep = "")</code></td><td>Character vector defining discrete time blocks for survey selectivity. Each element follows "Block_k_Year_a-b_Fleet_x" or "none_Fleet_x" (constant selectivity). Use "terminal" in place of the end year to extend to the final model year. Parsed into an internal array [n_regions × n_years × n_srv_fleets]. Blocked and continuous time-varying selectivity are mutually exclusive for a given fleet. Default: "none_Fleet_x" for each fleet.</td></tr> <tr data-k="srv_sel_model required character vector specifying the selectivity functional form per fleet, and optionally per time block. each element follows one of: "<model>_fleet_x"single form applied across all years for fleet x. "<model>_fleet_x_block_k"form applied only to block k for fleet x, as defined in srv_sel_blocks. required when multiple blocks are defined for a fleet. available models (see the model equations vignette for parameterizations): "logist1"logistic with a_{50} and slope k (2 parameters). "logist2"logistic with a_{50} and a_{95} (2 parameters). "gamma"dome-shaped gamma with a_{max} and \delta (2 parameters). "exponential"exponential with a single power parameter (1 parameter). "dbnrml"double-normal with 6 parameters. "nonpar"non-parametric over discrete age or length bins, on the logit scale, then mean-standardized jointly over years and bins so the grand mean of the surface is one. bins may be grouped through the non-parametric bin mapping. no fixed functional form is imposed. "nonparlog"non-parametric on the log scale, standardized so each year's selectivity averages to one over *_sel_norm_bins. only within-year contrasts are identified; the level is absorbed by catchability or fishing mortality. "nonparfree"non-parametric on the log scale with no standardization, \exp(\theta), so the values hold the height of the curve as well as its shape. this is the form for a data source fit age by age: a free catchability per age and a selectivity estimated at age are one quantity written two ways, so the whole age multiplier lives here and no catchability is set. pin one bin, by leaving it out of the estimated bins, whenever the mean it multiplies is also free. "asymplogist1"logistic selectivity with a_{50} and slope k and asymptotic control (3 parameters). "asymplogist2"logistic selectivity with a_{50} and a_{95} and asymptotic control (3 parameters). "bicubic"bicubic spline over a bin-node x year-node grid (see get_selex, selex_model == 8). specified as "bicubic_bin_<n_bin_nodes>_yr_<n_yr_nodes>_fleet_x" (optionally with _block_k). one generalized form covers a smooth bin x year surface (n_yr_nodes > 1), a time-invariant bin-only spline (n_yr_nodes == 1), or a bin-only spline re-fit independently per year-block (n_yr_nodes == 1 within each of several blocks defined via srv_sel_blocks). an optional _selstyr_<year> suffix (a calendar year within the block) restricts the actual spline fit to selstyr:block-end; years within the block before selstyr are kept constant at the selstyr year's fitted curve, rather than fitting the surface over the whole block. an optional _nselbins_<n> suffix restricts the actual spline fit to the first n bins (ages or lengths, per srv_selex_type); bins beyond n are kept constant at the last fitted bin's curve. no default; must be provided."><td><code class="optref-arg">srv_sel_model</code></td><td><em class="optref-req">required</em></td><td>Character vector specifying the selectivity functional form per fleet, and optionally per time block. Each element follows one of: "<model>_Fleet_x"Single form applied across all years for fleet x. "<model>_Fleet_x_Block_k"Form applied only to block k for fleet x, as defined in srv_sel_blocks. Required when multiple blocks are defined for a fleet. Available models (see the model equations vignette for parameterizations): "logist1"Logistic with a_{50} and slope k (2 parameters). "logist2"Logistic with a_{50} and a_{95} (2 parameters). "gamma"Dome-shaped gamma with a_{max} and \delta (2 parameters). "exponential"Exponential with a single power parameter (1 parameter). "dbnrml"Double-normal with 6 parameters. "nonpar"Non-parametric over discrete age or length bins, on the logit scale, then mean-standardized jointly over years and bins so the grand mean of the surface is one. Bins may be grouped through the non-parametric bin mapping. No fixed functional form is imposed. "nonparlog"Non-parametric on the log scale, standardized so each year's selectivity averages to one over *_sel_norm_bins. Only within-year contrasts are identified; the level is absorbed by catchability or fishing mortality. "nonparfree"Non-parametric on the log scale with no standardization, \exp(\theta), so the values hold the height of the curve as well as its shape. This is the form for a data source fit age by age: a free catchability per age and a selectivity estimated at age are one quantity written two ways, so the whole age multiplier lives here and no catchability is set. Pin one bin, by leaving it out of the estimated bins, whenever the mean it multiplies is also free. "asymplogist1"Logistic selectivity with a_{50} and slope k and asymptotic control (3 parameters). "asymplogist2"Logistic selectivity with a_{50} and a_{95} and asymptotic control (3 parameters). "bicubic"Bicubic spline over a bin-node x year-node grid (see Get_Selex, Selex_Model == 8). Specified as "bicubic_Bin_<n_bin_nodes>_Yr_<n_yr_nodes>_Fleet_x" (optionally with _Block_k). One generalized form covers a smooth bin x year surface (n_yr_nodes > 1), a time-invariant bin-only spline (n_yr_nodes == 1), or a bin-only spline re-fit independently per year-block (n_yr_nodes == 1 within each of several blocks defined via srv_sel_blocks). An optional _SelStyr_<year> suffix (a calendar year within the block) restricts the actual spline fit to SelStyr:block-end; years within the block before SelStyr are kept constant at the SelStyr year's fitted curve, rather than fitting the surface over the whole block. An optional _NSelBins_<n> suffix restricts the actual spline fit to the first n bins (ages or lengths, per srv_selex_type); bins beyond n are kept constant at the last fitted bin's curve. No default; must be provided.</td></tr> <tr data-k="use_srv_q_prior 0 integer (0/1). whether log-normal priors are applied to survey catchability parameters. default 0."><td><code class="optref-arg">Use_srv_q_prior</code></td><td><code>0</code></td><td>Integer (0/1). Whether log-normal priors are applied to survey catchability parameters. Default 0.</td></tr> <tr data-k="srv_q_prior na data frame of catchability prior specifications. required columns: region, fleet, block, mu (prior mean on natural scale), sd (prior sd on log scale). each row specifies a \log\text{n}(\log(\mu), \text{sd}) prior. ignored when use_srv_q_prior = 0. default na."><td><code class="optref-arg">srv_q_prior</code></td><td><code>NA</code></td><td>Data frame of catchability prior specifications. Required columns: region, fleet, block, mu (prior mean on natural scale), sd (prior SD on log scale). Each row specifies a \log\text{N}(\log(\mu), \text{sd}) prior. Ignored when Use_srv_q_prior = 0. Default NA.</td></tr> <tr data-k="srv_q_blocks paste("none_fleet_", 1:input_list$data$n_srv_fleets, sep = "") character vector defining discrete time blocks for survey catchability. same format as srv_sel_blocks: "block_k_year_a-b_fleet_x" or "none_fleet_x". parsed into an array [n_regions × n_years × n_srv_fleets]. default: "none_fleet_x" for each fleet."><td><code class="optref-arg">srv_q_blocks</code></td><td><code>paste("none_Fleet_", 1:input_list$data$n_srv_fleets, sep = "")</code></td><td>Character vector defining discrete time blocks for survey catchability. Same format as srv_sel_blocks: "Block_k_Year_a-b_Fleet_x" or "none_Fleet_x". Parsed into an array [n_regions × n_years × n_srv_fleets]. Default: "none_Fleet_x" for each fleet.</td></tr> <tr data-k="srvsel_pe_pars_spec null character vector [n_srv_fleets] or null. sharing structure for process error hyperparameters. see do_sel_pe_pars_mapping for full option descriptions. default null."><td><code class="optref-arg">srvsel_pe_pars_spec</code></td><td><code>NULL</code></td><td>Character vector [n_srv_fleets] or NULL. Sharing structure for process error hyperparameters. See do_sel_pe_pars_mapping for full option descriptions. Default NULL.</td></tr> <tr data-k="srv_fixed_sel_pars_spec required character vector [n_srv_fleets]. sharing structure for fixed-effect selectivity parameters. see do_fixed_sel_pars_mapping for full option descriptions. no default; must be provided."><td><code class="optref-arg">srv_fixed_sel_pars_spec</code></td><td><em class="optref-req">required</em></td><td>Character vector [n_srv_fleets]. Sharing structure for fixed-effect selectivity parameters. See do_fixed_sel_pars_mapping for full option descriptions. No default; must be provided.</td></tr> <tr data-k="srv_q_spec null character vector [n_srv_fleets] or null. sharing structure for catchability. see do_q_mapping for full option descriptions. default null."><td><code class="optref-arg">srv_q_spec</code></td><td><code>NULL</code></td><td>Character vector [n_srv_fleets] or NULL. Sharing structure for catchability. See do_q_mapping for full option descriptions. Default NULL.</td></tr> <tr data-k="srv_q_type rep("est", input_list$data$n_srv_fleets) character vector [n_srv_fleets] controlling how catchability is obtained. "est" (default) estimates ln_srv_q. "arith" concentrates it out of the likelihood as the ratio of mean observed to mean predicted index, and "geo" does the same on the log scale as exp(mean(log(obs) - log(pred))). both analytic forms use only the years with observations and fix that fleet's ln_srv_q regardless of srv_q_spec. the solve is done within each srv_q_blocks time block, so a blocked catchability gets one solved value per block. a single block, the default, is one value for the whole series."><td><code class="optref-arg">srv_q_type</code></td><td><code>rep("est", input_list$data$n_srv_fleets)</code></td><td>Character vector [n_srv_fleets] controlling how catchability is obtained. "est" (default) estimates ln_srv_q. "arith" concentrates it out of the likelihood as the ratio of mean observed to mean predicted index, and "geo" does the same on the log scale as exp(mean(log(obs) - log(pred))). Both analytic forms use only the years with observations and fix that fleet's ln_srv_q regardless of srv_q_spec. The solve is done within each srv_q_blocks time block, so a blocked catchability gets one solved value per block. A single block, the default, is one value for the whole series.</td></tr> <tr data-k="srv_sel_devs_spec null character vector [n_srv_fleets] or null. sharing structure for selectivity deviation time series. see do_sel_devs_mapping for full option descriptions. default null."><td><code class="optref-arg">srv_sel_devs_spec</code></td><td><code>NULL</code></td><td>Character vector [n_srv_fleets] or NULL. Sharing structure for selectivity deviation time series. See do_sel_devs_mapping for full option descriptions. Default NULL.</td></tr> <tr data-k="corr_opt_semipar null character vector [n_srv_fleets] or null. specifies correlation components to suppress for 3d gmrf or 2d ar1 forms. see do_sel_pe_pars_mapping for valid values. default null."><td><code class="optref-arg">corr_opt_semipar</code></td><td><code>NULL</code></td><td>Character vector [n_srv_fleets] or NULL. Specifies correlation components to suppress for 3D GMRF or 2D AR1 forms. See do_sel_pe_pars_mapping for valid values. Default NULL.</td></tr> <tr data-k="srv_q_formula null named list of r formulas specifying environmental covariate relationships for catchability per region-fleet combination. names follow the convention "region_r_fleet_f". covariates must be present in srv_q_cov_dat. if null, no covariate effects are included. default null."><td><code class="optref-arg">srv_q_formula</code></td><td><code>NULL</code></td><td>Named list of R formulas specifying environmental covariate relationships for catchability per region-fleet combination. Names follow the convention "Region_r_Fleet_f". Covariates must be present in srv_q_cov_dat. If NULL, no covariate effects are included. Default NULL.</td></tr> <tr data-k="srv_q_cov_dat null named list of numeric vectors (length = n_years) containing covariate time series referenced in srv_q_formula. all vectors must be the same length and contain no missing values; set values to 0 for years when the survey is not active. if null, covariate effects are excluded. default null."><td><code class="optref-arg">srv_q_cov_dat</code></td><td><code>NULL</code></td><td>Named list of numeric vectors (length = n_years) containing covariate time series referenced in srv_q_formula. All vectors must be the same length and contain no missing values; set values to 0 for years when the survey is not active. If NULL, covariate effects are excluded. Default NULL.</td></tr> <tr data-k="use_srv_selex_prior 0 integer (0/1). whether log-normal priors are applied to survey selectivity parameters. default 0."><td><code class="optref-arg">Use_srv_selex_prior</code></td><td><code>0</code></td><td>Integer (0/1). Whether log-normal priors are applied to survey selectivity parameters. Default 0.</td></tr> <tr data-k="srv_selex_prior null data frame of selectivity prior specifications, one row per prior. required columns: region, fleet, block, sex, par, mu, sd, plus an optional type giving each row's target: "par" (the default when the column is absent) is a lognormal prior on one fixed selectivity parameter, with mu on the natural scale and sd on the log scale; "value" is a normal prior on the realized selectivity value at one bin, with both on the natural scale, where par instead names the bin (on ages or lengths per srv_selex_type) and the value is read at the first model year of block. a "value" row constrains the derived selectivity value rather than the parameters, matching the admb convention of pinning survey selectivity at a reference age near one, which no set of independent parameter priors can express. ignored when use_srv_selex_prior = 0. default null."><td><code class="optref-arg">srv_selex_prior</code></td><td><code>NULL</code></td><td>Data frame of selectivity prior specifications, one row per prior. Required columns: region, fleet, block, sex, par, mu, sd, plus an optional type giving each row's target: "par" (the default when the column is absent) is a lognormal prior on one fixed selectivity parameter, with mu on the natural scale and sd on the log scale; "value" is a normal prior on the realized selectivity value at one bin, with both on the natural scale, where par instead names the bin (on ages or lengths per srv_selex_type) and the value is read at the first model year of block. A "value" row constrains the derived selectivity value rather than the parameters, matching the ADMB convention of pinning survey selectivity at a reference age near one, which no set of independent parameter priors can express. Ignored when Use_srv_selex_prior = 0. Default NULL.</td></tr> <tr data-k="use_srv_selex_penalty 0 integer (0/1). whether a centering penalty is applied to sets of survey selectivity fixed-effect parameters. default 0."><td><code class="optref-arg">Use_srv_selex_penalty</code></td><td><code>0</code></td><td>Integer (0/1). Whether a centering penalty is applied to sets of survey selectivity fixed-effect parameters. Default 0.</td></tr> <tr data-k="srv_sel_norm_bins null list with one element per survey fleet naming the bins the mean-one standardization averages over, or null for fleets standardizing over every bin (selex_model = 9 only). a gear whose catchability is defined against part of the bin range standardizes over that part, and catchability absorbs the difference in scale. default null."><td><code class="optref-arg">srv_sel_norm_bins</code></td><td><code>NULL</code></td><td>List with one element per survey fleet naming the bins the mean-one standardization averages over, or NULL for fleets standardizing over every bin (Selex_Model = 9 only). A gear whose catchability is defined against part of the bin range standardizes over that part, and catchability absorbs the difference in scale. Default NULL.</td></tr> <tr data-k="srv_sel_bin_dev_bins null list with one element per survey fleet naming the bins that fleet overrides, or null for fleets with no overrides (e.g. list(1, null) frees bin 1 of fleet 1 only). an overridden bin takes a freely estimated annual value \exp(\epsilon_{y,b}) in place of whatever the functional form produced, applied after every other transformation including standardization. the rest of the curve keeps its parametric shape. default null."><td><code class="optref-arg">srv_sel_bin_dev_bins</code></td><td><code>NULL</code></td><td>List with one element per survey fleet naming the bins that fleet overrides, or NULL for fleets with no overrides (e.g. list(1, NULL) frees bin 1 of fleet 1 only). An overridden bin takes a freely estimated annual value \exp(\epsilon_{y,b}) in place of whatever the functional form produced, applied after every other transformation including standardization. The rest of the curve keeps its parametric shape. Default NULL.</td></tr> <tr data-k="srvsel_pe_wt rep(1, input_list$data$n_srv_fleets) numeric vector [n_srv_fleets]. per-fleet multiplier on the survey selectivity process error likelihood. default 1 for every fleet. 0 skips that fleet's process error likelihood altogether, so the deviations stay estimated but enter the objective only through the data and any explicit smoothness or centering penalties, which is how several existing assessments constrain them. values other than 0 or 1 make an estimated process error sigma reinterpretable, so prefer 0 or 1 unless deliberately down-weighting. applies only to ln_srvsel_devs; the bin-override deviations have their own process error and are not affected."><td><code class="optref-arg">srvsel_pe_wt</code></td><td><code>rep(1, input_list$data$n_srv_fleets)</code></td><td>Numeric vector [n_srv_fleets]. Per-fleet multiplier on the survey selectivity process error likelihood. Default 1 for every fleet. 0 skips that fleet's process error likelihood altogether, so the deviations stay estimated but enter the objective only through the data and any explicit smoothness or centering penalties, which is how several existing assessments constrain them. Values other than 0 or 1 make an estimated process error sigma reinterpretable, so prefer 0 or 1 unless deliberately down-weighting. Applies only to ln_srvsel_devs; the bin-override deviations have their own process error and are not affected.</td></tr> <tr data-k="srvsel_rw_init_sigma rep(5, input_list$data$n_srv_fleets) numeric vector [n_srv_fleets]. standard deviation given to the first year of an "rw" deviation series. default 5, which leaves that year effectively free. na instead starts the walk at zero under the walk's own estimated sigma, making the first year as smooth as every later step. appropriate when the base parametric curve already describes the first year well."><td><code class="optref-arg">srvsel_rw_init_sigma</code></td><td><code>rep(5, input_list$data$n_srv_fleets)</code></td><td>Numeric vector [n_srv_fleets]. Standard deviation given to the first year of an "rw" deviation series. Default 5, which leaves that year effectively free. NA instead starts the walk at zero under the walk's own estimated sigma, making the first year as smooth as every later step. Appropriate when the base parametric curve already describes the first year well.</td></tr> <tr data-k="cont_tv_srvsel_bin_devs rep("none", input_list$data$n_srv_fleets) character vector [n_srv_fleets] giving the process error on the bin-override deviations for each fleet: "none" (default), "iid", or "rw". a random walk has its own estimated sigma per bin, with srvsel_bin_devs_rw_init_sigma governing its first year."><td><code class="optref-arg">cont_tv_srvsel_bin_devs</code></td><td><code>rep("none", input_list$data$n_srv_fleets)</code></td><td>Character vector [n_srv_fleets] giving the process error on the bin-override deviations for each fleet: "none" (default), "iid", or "rw". A random walk has its own estimated sigma per bin, with srvsel_bin_devs_rw_init_sigma governing its first year.</td></tr> <tr data-k="srv_selex_penalty null data frame of centering penalty specifications, required when use_srv_selex_penalty = 1. required columns: region, fleet, block, sex, par, and wt. each row penalizes wt * (log(mean(exp(pars))))^2 over the set of parameters named in par, which may be a single index or a list column of integer vectors naming a whole set. this pins the scalar of a non-parametric curve that catchability or fishing mortality would otherwise absorb, and is softer than fixing a bin outright. intended for parameter sets kept on the log scale. default null."><td><code class="optref-arg">srv_selex_penalty</code></td><td><code>NULL</code></td><td>Data frame of centering penalty specifications, required when Use_srv_selex_penalty = 1. Required columns: region, fleet, block, sex, par, and wt. Each row penalizes wt * (log(mean(exp(pars))))^2 over the set of parameters named in par, which may be a single index or a list column of integer vectors naming a whole set. This pins the scalar of a non-parametric curve that catchability or fishing mortality would otherwise absorb, and is softer than fixing a bin outright. Intended for parameter sets kept on the log scale. Default NULL.</td></tr> <tr data-k="t_srv array(1, dim = c(input_list$datadatadata$n_srv_fleets)) survey timing fraction within a given year (annual models) or season (seasonal models), array [n_regions × n_seas × n_srv_fleets]. default: 1 (end of period)."><td><code class="optref-arg">t_srv</code></td><td><code>array(1, dim = c(input_list$datadatadata$n_srv_fleets))</code></td><td>Survey timing fraction within a given year (annual models) or season (seasonal models), array [n_regions × n_seas × n_srv_fleets]. Default: 1 (end of period).</td></tr> <tr data-k="srvsel_devs_shared_bins null list of integer vectors defining bin groups for age/length-sharing of deviations under semi-parametric forms (e.g., list(1:5, 6:10, 11:30)). required when srv_sel_devs_spec includes any "est_shared_b" variant. default null."><td><code class="optref-arg">srvsel_devs_shared_bins</code></td><td><code>NULL</code></td><td>List of integer vectors defining bin groups for age/length-sharing of deviations under semi-parametric forms (e.g., list(1:5, 6:10, 11:30)). Required when srv_sel_devs_spec includes any "est_shared_b" variant. Default NULL.</td></tr> <tr data-k="srv_selex_type "age" character. whether survey selectivity type is 'age' or 'length' based. default: age."><td><code class="optref-arg">srv_selex_type</code></td><td><code>"age"</code></td><td>Character. Whether survey selectivity type is 'age' or 'length' based. Default: age.</td></tr> <tr data-k="use_fixed_srv_sel rep(0, input_list$data$n_srv_fleets) integer vector of length n_srv_fleets indicating whether survey selectivity is fixed (1) or estimated (0) for each survey index."><td><code class="optref-arg">use_fixed_srv_sel</code></td><td><code>rep(0, input_list$data$n_srv_fleets)</code></td><td>Integer vector of length n_srv_fleets indicating whether survey selectivity is fixed (1) or estimated (0) for each survey index.</td></tr> <tr data-k="srv_sel_input null array of fixed survey selectivity values used when use_fixed_srv_sel == 1. dimensions: [n_pop × n_regions × n_years × n_seas × n_bins × n_sexes × n_srv_fleets]. required whenever any survey has fixed selectivity specified."><td><code class="optref-arg">srv_sel_input</code></td><td><code>NULL</code></td><td>Array of fixed survey selectivity values used when use_fixed_srv_sel == 1. Dimensions: [n_pop × n_regions × n_years × n_seas × n_bins × n_sexes × n_srv_fleets]. Required whenever any survey has fixed selectivity specified.</td></tr> <tr data-k="srv_sel_nonpar_est_bins null optional list defining bin groupings for non-parametric survey selectivity. structure is [[survey]][[block]], where each element is a list of integer vectors. each vector defines a group of bins that share a single estimated selectivity parameter. indices must correspond to the bin dimension defined by the survey selectivity type (age or length)."><td><code class="optref-arg">srv_sel_nonpar_est_bins</code></td><td><code>NULL</code></td><td>Optional list defining bin groupings for non-parametric survey selectivity. Structure is [[survey]][[block]], where each element is a list of integer vectors. Each vector defines a group of bins that share a single estimated selectivity parameter. Indices must correspond to the bin dimension defined by the survey selectivity type (age or length).</td></tr> <tr data-k="srvsel_dont_est_dev_first rep(0, input_list$data$n_srv_fleets) integer vector of length n_srv_fleets of 0/1, default 0. where 1, that fleet's deviations start in year two and the fixed selectivity parameters hold year one. a non-parametric form ("nonpar", "nonparlog", "nonparfree") has one free base parameter per bin, so year one's deviation is that same value written twice and only srvsel_rw_init_sigma separates them, as a prior on a level that is usually meant to be free. dropping it removes the redundant parameter and that prior, and leaves the walk a sum of differences. refused for the gmrf and 2d ar1 forms, whose deviations are a field over years and bins rather than a walk anchored at year one."><td><code class="optref-arg">srvsel_dont_est_dev_first</code></td><td><code>rep(0, input_list$data$n_srv_fleets)</code></td><td>Integer vector of length n_srv_fleets of 0/1, default 0. Where 1, that fleet's deviations start in year two and the fixed selectivity parameters hold year one. A non-parametric form ("nonpar", "nonparlog", "nonparfree") has one free base parameter per bin, so year one's deviation is that same value written twice and only srvsel_rw_init_sigma separates them, as a prior on a level that is usually meant to be free. Dropping it removes the redundant parameter and that prior, and leaves the walk a sum of differences. Refused for the GMRF and 2D AR1 forms, whose deviations are a field over years and bins rather than a walk anchored at year one.</td></tr> <tr data-k="srv_sel_sex_offset rep("none", input_list$data$n_srv_fleets) character vector of length n_srv_fleets linking the sexes of a fleet's selectivity, for models with n_sexes > 1. options per fleet are "none" (default, each sex's stored parameters are its own), "par" (sexes beyond the first store additive offsets on the first sex's transformed-scale parameters), "scale" (sexes beyond the first have an estimated constant log-scale offset on the whole realized curve), "par_scale" (both), "apical" (sexes beyond the first build their double normal's limbs up to an estimated height rather than to one, which moves the middle of the curve and leaves its two ends where their own parameters put them), and "par_apical" (both). see fish_sel_sex_offset in setup_mod_fishsel_and_q for the full description."><td><code class="optref-arg">srv_sel_sex_offset</code></td><td><code>rep("none", input_list$data$n_srv_fleets)</code></td><td>Character vector of length n_srv_fleets linking the sexes of a fleet's selectivity, for models with n_sexes > 1. Options per fleet are "none" (default, each sex's stored parameters are its own), "par" (sexes beyond the first store additive offsets on the first sex's transformed-scale parameters), "scale" (sexes beyond the first have an estimated constant log-scale offset on the whole realized curve), "par_scale" (both), "apical" (sexes beyond the first build their double normal's limbs up to an estimated height rather than to one, which moves the middle of the curve and leaves its two ends where their own parameters put them), and "par_apical" (both). See fish_sel_sex_offset in Setup_Mod_Fishsel_and_Q for the full description.</td></tr> <tr data-k="srv_sel_dbnrml_raw null null (default) or a 0/1 matrix [n_srv_fleets x 2] for fleets on the double normal: column one leaves the ascending limb as a raw gaussian instead of anchoring it to p5 at the first bin, column two does the same for the descending limb and p6."><td><code class="optref-arg">srv_sel_dbnrml_raw</code></td><td><code>NULL</code></td><td>NULL (default) or a 0/1 matrix [n_srv_fleets x 2] for fleets on the double normal: column one leaves the ascending limb as a raw Gaussian instead of anchoring it to p5 at the first bin, column two does the same for the descending limb and p6.</td></tr> <tr data-k="srv_sel_dbnrml_startbin null null (default) or an integer vector [n_srv_fleets], the bin each survey's double normal anchors its ascending limb at; see fish_sel_dbnrml_startbin in setup_mod_fishsel_and_q."><td><code class="optref-arg">srv_sel_dbnrml_startbin</code></td><td><code>NULL</code></td><td>NULL (default) or an integer vector [n_srv_fleets], the bin each survey's double normal anchors its ascending limb at; see fish_sel_dbnrml_startbin in Setup_Mod_Fishsel_and_Q.</td></tr> </tbody></table> </section> <section class="optref-stage" data-stage="Weighting"> <h3>Setup_Mod_Weighting</h3> <p class="optref-n">35 arguments</p> <table class="optref-table"> <thead><tr><th>Argument</th><th>Default</th><th>Description</th></tr></thead> <tbody> <tr data-k="addtocomp 0.001 small constant added to composition proportions before likelihood evaluation to avoid log(0). default 1e-3. ignored when a logistic-normal likelihood is specified, as that family handles zeros internally."><td><code class="optref-arg">addtocomp</code></td><td><code>0.001</code></td><td>Small constant added to composition proportions before likelihood evaluation to avoid log(0). Default 1e-3. Ignored when a logistic-normal likelihood is specified, as that family handles zeros internally.</td></tr> <tr data-k="comp_const_obs 1 integer switch (0 or 1) controlling where addtocomp is applied in the multinomial likelihood, not a constant to be tuned. 1 (default) adds it to the observed proportions that weight the multinomial as well as inside the logarithms, so the likelihood is stationary exactly at pred = obs. 0 weights by the raw observed proportions. if any fishery or survey conditional age-at-length fleet uses the dirichlet-multinomial, 1 triggers a warning, since the added constant biases theta upward when most age bins in a length bin are structurally empty."><td><code class="optref-arg">comp_const_obs</code></td><td><code>1</code></td><td>Integer switch (0 or 1) controlling where addtocomp is applied in the multinomial likelihood, not a constant to be tuned. 1 (default) adds it to the observed proportions that weight the multinomial as well as inside the logarithms, so the likelihood is stationary exactly at pred = obs. 0 weights by the raw observed proportions. If any fishery or survey conditional age-at-length fleet uses the Dirichlet-Multinomial, 1 triggers a warning, since the added constant biases theta upward when most age bins in a length bin are structurally empty.</td></tr> <tr data-k="addtofishidx 1e-04 small constant added to fishery indices. default 1e-4."><td><code class="optref-arg">addtofishidx</code></td><td><code>1e-04</code></td><td>Small constant added to fishery indices. Default 1e-4.</td></tr> <tr data-k="addtosrvidx 1e-04 small constant added to survey indices. default 1e-4."><td><code class="optref-arg">addtosrvidx</code></td><td><code>1e-04</code></td><td>Small constant added to survey indices. Default 1e-4.</td></tr> <tr data-k="addtotag 1e-10 small constant added to tag recovery observations. default 1e-10."><td><code class="optref-arg">addtotag</code></td><td><code>1e-10</code></td><td>Small constant added to tag recovery observations. Default 1e-10.</td></tr> <tr data-k="wt_catch 1 weight applied to the catch likelihood. either a scalar applied uniformly across all fleets, regions, years, and seasons, or a numeric array [n_regions × n_years × n_seas × n_fish_fleets] for fleet- or time-specific weighting. default 1."><td><code class="optref-arg">Wt_Catch</code></td><td><code>1</code></td><td>Weight applied to the catch likelihood. Either a scalar applied uniformly across all fleets, regions, years, and seasons, or a numeric array [n_regions × n_years × n_seas × n_fish_fleets] for fleet- or time-specific weighting. Default 1.</td></tr> <tr data-k="wt_fishidx 1 weight applied to the fishery index likelihood. accepts the same scalar or array format as wt_catch, dimensioned [n_regions × n_years × n_seas × n_fish_fleets]. default 1."><td><code class="optref-arg">Wt_FishIdx</code></td><td><code>1</code></td><td>Weight applied to the fishery index likelihood. Accepts the same scalar or array format as Wt_Catch, dimensioned [n_regions × n_years × n_seas × n_fish_fleets]. Default 1.</td></tr> <tr data-k="wt_srvidx 1 weight applied to the survey index likelihood. accepts the same scalar or array format, dimensioned [n_regions × n_years × n_seas × n_srv_fleets]. default 1."><td><code class="optref-arg">Wt_SrvIdx</code></td><td><code>1</code></td><td>Weight applied to the survey index likelihood. Accepts the same scalar or array format, dimensioned [n_regions × n_years × n_seas × n_srv_fleets]. Default 1.</td></tr> <tr data-k="wt_catch_pop 1 weight applied to the population-specific catch likelihood. either a scalar applied uniformly or a numeric array [n_pop × n_regions × n_years × n_seas × n_fish_fleets]. default 1."><td><code class="optref-arg">Wt_Catch_pop</code></td><td><code>1</code></td><td>Weight applied to the population-specific catch likelihood. Either a scalar applied uniformly or a numeric array [n_pop × n_regions × n_years × n_seas × n_fish_fleets]. Default 1.</td></tr> <tr data-k="wt_fishidx_pop 1 weight applied to the population-specific fishery index likelihood. same scalar or array format as wt_catch_pop, dimensioned [n_pop × n_regions × n_years × n_seas × n_fish_fleets]. default 1."><td><code class="optref-arg">Wt_FishIdx_pop</code></td><td><code>1</code></td><td>Weight applied to the population-specific fishery index likelihood. Same scalar or array format as Wt_Catch_pop, dimensioned [n_pop × n_regions × n_years × n_seas × n_fish_fleets]. Default 1.</td></tr> <tr data-k="wt_srvidx_pop 1 weight applied to the population-specific survey index likelihood. same scalar or array format as wt_catch_pop, dimensioned [n_pop × n_regions × n_years × n_seas × n_srv_fleets]. default 1."><td><code class="optref-arg">Wt_SrvIdx_pop</code></td><td><code>1</code></td><td>Weight applied to the population-specific survey index likelihood. Same scalar or array format as Wt_Catch_pop, dimensioned [n_pop × n_regions × n_years × n_seas × n_srv_fleets]. Default 1.</td></tr> <tr data-k="wt_rec 1 weight applied to the recruitment deviation penalty (ln_recdevs). either a scalar applied uniformly or a numeric array [n_pop × n_regions × n_est_rec_devs] for deviation-specific weighting, where n_est_rec_devs is the third dimension of ln_recdevs rather than the number of years, since dont_est_recdev_last and n_proj_yrs_devs both move it. default 1. a weight of zero on a deviation leaves it estimated but removes it from the penalty entirely, which is how a stock-recruit relationship is fit over a window of years while recruitment stays free in every year. that is distinct from dont_est_recdev_last, which removes the deviations themselves so recruitment reverts to the deterministic prediction in those years."><td><code class="optref-arg">Wt_Rec</code></td><td><code>1</code></td><td>Weight applied to the recruitment deviation penalty (ln_RecDevs). Either a scalar applied uniformly or a numeric array [n_pop × n_regions × n_est_rec_devs] for deviation-specific weighting, where n_est_rec_devs is the third dimension of ln_RecDevs rather than the number of years, since dont_est_recdev_last and n_proj_yrs_devs both move it. Default 1. A weight of zero on a deviation leaves it estimated but removes it from the penalty entirely, which is how a stock-recruit relationship is fit over a window of years while recruitment stays free in every year. That is distinct from dont_est_recdev_last, which removes the deviations themselves so recruitment reverts to the deterministic prediction in those years.</td></tr> <tr data-k="wt_init_rec null weight applied to the initial age deviation penalty (ln_initdevs). either a scalar or a numeric array [n_pop × n_regions × (n_ages - 1) × n_sexes]. defaults to null, which takes whatever wt_rec is when wt_rec is a scalar; supply it explicitly when wt_rec is an array, since the two penalties are dimensioned differently."><td><code class="optref-arg">Wt_Init_Rec</code></td><td><code>NULL</code></td><td>Weight applied to the initial age deviation penalty (ln_InitDevs). Either a scalar or a numeric array [n_pop × n_regions × (n_ages - 1) × n_sexes]. Defaults to NULL, which takes whatever Wt_Rec is when Wt_Rec is a scalar; supply it explicitly when Wt_Rec is an array, since the two penalties are dimensioned differently.</td></tr> <tr data-k="wt_f 1 scalar weight applied to the fishing mortality deviation penalty (ln_f_devs). default 1."><td><code class="optref-arg">Wt_F</code></td><td><code>1</code></td><td>Scalar weight applied to the fishing mortality deviation penalty (ln_F_devs). Default 1.</td></tr> <tr data-k="wt_tagging 1 scalar weight applied to the tag-recovery likelihood. default 1."><td><code class="optref-arg">Wt_Tagging</code></td><td><code>1</code></td><td>Scalar weight applied to the tag-recovery likelihood. Default 1.</td></tr> <tr data-k="wt_fishagecomps array(1, dim = c(input_list$datadatadatadatadata$n_fish_fleets)) weight applied to the fishery age composition likelihood. either a scalar or a numeric array [n_regions × n_years × n_seas × n_sexes × n_fish_fleets]. default: array of 1s."><td><code class="optref-arg">Wt_FishAgeComps</code></td><td><code>array(1, dim = c(input_list$datadatadatadatadata$n_fish_fleets))</code></td><td>Weight applied to the fishery age composition likelihood. Either a scalar or a numeric array [n_regions × n_years × n_seas × n_sexes × n_fish_fleets]. Default: array of 1s.</td></tr> <tr data-k="wt_srvagecomps array(1, dim = c(input_list$datadatadatadatadata$n_srv_fleets)) weight applied to the survey age composition likelihood. either a scalar or a numeric array [n_regions × n_years × n_seas × n_sexes × n_srv_fleets]. default: array of 1s."><td><code class="optref-arg">Wt_SrvAgeComps</code></td><td><code>array(1, dim = c(input_list$datadatadatadatadata$n_srv_fleets))</code></td><td>Weight applied to the survey age composition likelihood. Either a scalar or a numeric array [n_regions × n_years × n_seas × n_sexes × n_srv_fleets]. Default: array of 1s.</td></tr> <tr data-k="wt_fishlencomps array(1, dim = c(input_list$datadatadatadatadata$n_fish_fleets)) weight applied to the fishery length composition likelihood. same format as wt_fishagecomps, [n_regions × n_years × n_seas × n_sexes × n_fish_fleets]. default: array of 1s."><td><code class="optref-arg">Wt_FishLenComps</code></td><td><code>array(1, dim = c(input_list$datadatadatadatadata$n_fish_fleets))</code></td><td>Weight applied to the fishery length composition likelihood. Same format as Wt_FishAgeComps, [n_regions × n_years × n_seas × n_sexes × n_fish_fleets]. Default: array of 1s.</td></tr> <tr data-k="wt_srvlencomps array(1, dim = c(input_list$datadatadatadatadata$n_srv_fleets)) weight applied to the survey length composition likelihood. same format as wt_srvagecomps, [n_regions × n_years × n_seas × n_sexes × n_srv_fleets]. default: array of 1s."><td><code class="optref-arg">Wt_SrvLenComps</code></td><td><code>array(1, dim = c(input_list$datadatadatadatadata$n_srv_fleets))</code></td><td>Weight applied to the survey length composition likelihood. Same format as Wt_SrvAgeComps, [n_regions × n_years × n_seas × n_sexes × n_srv_fleets]. Default: array of 1s.</td></tr> <tr data-k="wt_fishagecomps_pop array(1, dim = c(input_list$datadatadatadatadatadata$n_fish_fleets)) weight applied to the population-specific fishery age composition likelihood. either a scalar or a numeric array [n_pop × n_regions × n_years × n_seas × n_sexes × n_fish_fleets]. default: array of 1s."><td><code class="optref-arg">Wt_FishAgeComps_pop</code></td><td><code>array(1, dim = c(input_list$datadatadatadatadatadata$n_fish_fleets))</code></td><td>Weight applied to the population-specific fishery age composition likelihood. Either a scalar or a numeric array [n_pop × n_regions × n_years × n_seas × n_sexes × n_fish_fleets]. Default: array of 1s.</td></tr> <tr data-k="wt_srvagecomps_pop array(1, dim = c(input_list$datadatadatadatadatadata$n_srv_fleets)) weight applied to the population-specific survey age composition likelihood. either a scalar or a numeric array [n_pop × n_regions × n_years × n_seas × n_sexes × n_srv_fleets]. default: array of 1s."><td><code class="optref-arg">Wt_SrvAgeComps_pop</code></td><td><code>array(1, dim = c(input_list$datadatadatadatadatadata$n_srv_fleets))</code></td><td>Weight applied to the population-specific survey age composition likelihood. Either a scalar or a numeric array [n_pop × n_regions × n_years × n_seas × n_sexes × n_srv_fleets]. Default: array of 1s.</td></tr> <tr data-k="wt_fishlencomps_pop array(1, dim = c(input_list$datadatadatadatadatadata$n_fish_fleets)) weight applied to the population-specific fishery length composition likelihood. same format as wt_fishagecomps_pop, [n_pop × n_regions × n_years × n_seas × n_sexes × n_fish_fleets]. default: array of 1s."><td><code class="optref-arg">Wt_FishLenComps_pop</code></td><td><code>array(1, dim = c(input_list$datadatadatadatadatadata$n_fish_fleets))</code></td><td>Weight applied to the population-specific fishery length composition likelihood. Same format as Wt_FishAgeComps_pop, [n_pop × n_regions × n_years × n_seas × n_sexes × n_fish_fleets]. Default: array of 1s.</td></tr> <tr data-k="wt_srvlencomps_pop array(1, dim = c(input_list$datadatadatadatadatadata$n_srv_fleets)) weight applied to the population-specific survey length composition likelihood. same format as wt_srvagecomps_pop, [n_pop × n_regions × n_years × n_seas × n_sexes × n_srv_fleets]. default: array of 1s."><td><code class="optref-arg">Wt_SrvLenComps_pop</code></td><td><code>array(1, dim = c(input_list$datadatadatadatadatadata$n_srv_fleets))</code></td><td>Weight applied to the population-specific survey length composition likelihood. Same format as Wt_SrvAgeComps_pop, [n_pop × n_regions × n_years × n_seas × n_sexes × n_srv_fleets]. Default: array of 1s.</td></tr> <tr data-k="wt_discard 1 weight applied to the aggregated discard amount or fraction likelihood. either a scalar applied uniformly or a numeric array [n_regions × n_years × n_seas × n_fish_fleets]. default 1."><td><code class="optref-arg">Wt_Discard</code></td><td><code>1</code></td><td>Weight applied to the aggregated discard amount or fraction likelihood. Either a scalar applied uniformly or a numeric array [n_regions × n_years × n_seas × n_fish_fleets]. Default 1.</td></tr> <tr data-k="wt_discard_pop 1 weight applied to the population-specific discard likelihood. either a scalar or a numeric array [n_pop × n_regions × n_years × n_seas × n_fish_fleets]. default 1."><td><code class="optref-arg">Wt_Discard_pop</code></td><td><code>1</code></td><td>Weight applied to the population-specific discard likelihood. Either a scalar or a numeric array [n_pop × n_regions × n_years × n_seas × n_fish_fleets]. Default 1.</td></tr> <tr data-k="wt_d 1 scalar weight applied to the discard mortality rate deviation penalty (logit_dmr_devs). default 1."><td><code class="optref-arg">Wt_D</code></td><td><code>1</code></td><td>Scalar weight applied to the discard mortality rate deviation penalty (logit_dmr_devs). Default 1.</td></tr> <tr data-k="wt_fishagecomps_discard array(1, dim = c(input_list$datadatadatadatadata$n_fish_fleets)) weight applied to the discard fishery age composition likelihood. either a scalar or a numeric array [n_regions × n_years × n_seas × n_sexes × n_fish_fleets]. default: array of 1s."><td><code class="optref-arg">Wt_FishAgeComps_discard</code></td><td><code>array(1, dim = c(input_list$datadatadatadatadata$n_fish_fleets))</code></td><td>Weight applied to the discard fishery age composition likelihood. Either a scalar or a numeric array [n_regions × n_years × n_seas × n_sexes × n_fish_fleets]. Default: array of 1s.</td></tr> <tr data-k="wt_fishlencomps_discard array(1, dim = c(input_list$datadatadatadatadata$n_fish_fleets)) weight applied to the discard fishery length composition likelihood. same format as wt_fishagecomps_discard, [n_regions × n_years × n_seas × n_sexes × n_fish_fleets]. default: array of 1s."><td><code class="optref-arg">Wt_FishLenComps_discard</code></td><td><code>array(1, dim = c(input_list$datadatadatadatadata$n_fish_fleets))</code></td><td>Weight applied to the discard fishery length composition likelihood. Same format as Wt_FishAgeComps_discard, [n_regions × n_years × n_seas × n_sexes × n_fish_fleets]. Default: array of 1s.</td></tr> <tr data-k="wt_fishagecomps_discard_pop array(1, dim = c(input_list$datadatadatadatadatadata$n_fish_fleets)) weight applied to the population-specific discard fishery age composition likelihood. either a scalar or a numeric array [n_pop × n_regions × n_years × n_seas × n_sexes × n_fish_fleets]. default: array of 1s."><td><code class="optref-arg">Wt_FishAgeComps_discard_pop</code></td><td><code>array(1, dim = c(input_list$datadatadatadatadatadata$n_fish_fleets))</code></td><td>Weight applied to the population-specific discard fishery age composition likelihood. Either a scalar or a numeric array [n_pop × n_regions × n_years × n_seas × n_sexes × n_fish_fleets]. Default: array of 1s.</td></tr> <tr data-k="wt_fishlencomps_discard_pop array(1, dim = c(input_list$datadatadatadatadatadata$n_fish_fleets)) weight applied to the population-specific discard fishery length composition likelihood. same format as wt_fishagecomps_discard_pop, [n_pop × n_regions × n_years × n_seas × n_sexes × n_fish_fleets]. default: array of 1s."><td><code class="optref-arg">Wt_FishLenComps_discard_pop</code></td><td><code>array(1, dim = c(input_list$datadatadatadatadatadata$n_fish_fleets))</code></td><td>Weight applied to the population-specific discard fishery length composition likelihood. Same format as Wt_FishAgeComps_discard_pop, [n_pop × n_regions × n_years × n_seas × n_sexes × n_fish_fleets]. Default: array of 1s.</td></tr> <tr data-k="wt_fish_caal array(1, dim = c(input_list$datadatadatadatadatadata$n_fish_fleets)) weight applied to the fishery conditional age-at-length likelihood, multiplying the input sample size of each length bin's age composition. array [n_regions x n_years x n_seas x n_lens x n_sexes x n_fish_fleets], the shape of iss_fish_caal. defaults to one everywhere."><td><code class="optref-arg">Wt_Fish_caal</code></td><td><code>array(1, dim = c(input_list$datadatadatadatadatadata$n_fish_fleets))</code></td><td>Weight applied to the fishery conditional age-at-length likelihood, multiplying the input sample size of each length bin's age composition. Array [n_regions x n_years x n_seas x n_lens x n_sexes x n_fish_fleets], the shape of ISS_Fish_caal. Defaults to one everywhere.</td></tr> <tr data-k="wt_srv_caal array(1, dim = c(input_list$datadatadatadatadatadata$n_srv_fleets)) weight applied to the survey conditional age-at-length likelihood. same format as wt_fish_caal, with n_srv_fleets as the last dimension. defaults to one everywhere."><td><code class="optref-arg">Wt_Srv_caal</code></td><td><code>array(1, dim = c(input_list$datadatadatadatadatadata$n_srv_fleets)) | Weight applied to the survey conditional age-at-length likelihood. Same format as Wt_Fish_caal, with n_srv_fleets as the last dimension. Defaults to one everywhere. |
fish_sel_pen_wts |
NULL |
NULL (default), or a named numeric vector/list with independent weights for any subset of six selectivity smoothness penalty terms (see resolve_sel_pen_wts and Get_Selex_Smoothness_Penalty), evaluated directly on the fleet's realized selectivity-at-bin-at-year surface and so applicable to any selectivity functional form: "smooth_bin_curve"Second-difference (curvature) penalty across bins. "smooth_bin_diff"Unconditional first-difference penalty across bins. "smooth_yr_diff"First-difference penalty across years. "smooth_yr_curve"Second-difference (curvature) penalty across years. "smooth_dome"Dome-shape (non-monotonicity) penalty across bins. "smooth_mean_center"Per-year mean-centering regularization. Any name not supplied defaults to 0 (off). Must be called after Setup_Mod_Fishsel_and_Q. Each weight may instead be a vector with one value per model year, so a penalty can act only in some years or with a different strength in each. The specification may also have "bin_range", a length-two vector giving the first and last bin the penalties act over. To give each fleet its own penalties, pass an unnamed list with one named specification per fleet instead of a single specification. | |
ret_sel_pen_wts
|
NULL
|
Same format as fish_sel_pen_wts, for the retained fishery selectivity penalty. | |
srv_sel_pen_wts
|
NULL
|
Same format as fish_sel_pen_wts, for the survey selectivity penalty. Must be called after Setup_Mod_Srvsel_and_Q. |