Setup Estimation Model Argument Reference
Source:vignettes/ta_option_reference.Rmd
ta_option_reference.RmdEvery argument the twelve Setup_Mod_* stages accept,
with its default and its own documentation. This page is the place to
look for what a given setting is, whereas Overview of Model Options explains why
it exists and which ones to specify.
Setup_Mod_Dim
17 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. |
bias_correct_pe |
"rec" |
Which log scale process deviations are centered on minus half their marginal variance, so the process they act on keeps its mean. "rec" (default) the recruitment and initial age deviations, which is every model's behaviour before this existed; "all" those plus the numbers at age state; "none" nothing. The bias ramp (do_rec_bias_ramp, bias_year) still scales the recruitment part. |
bias_correct_oe
|
0
|
Whether a lognormally fit observation is predicted at its mean rather than its median, by subtracting sigma^2/2 from the log prediction. 0 (default) predicts the median, every model’s behaviour before this existed. |
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, required. "mean_rec" (steepness fixed and not estimated), "bh_rec", or "ricker_rec". Steepness is not interchangeable between the last two, see Get_Det_Recruitment. |
rec_dd |
"global" |
Density dependence. "local" is one stock-recruit relationship per population, required when n_pop > 1. "global" (default) pools across regions and restricts h_spec, RecDevs_spec and InitDevs_spec to shared or fixed options when n_regions > 1. |
rec_lag
|
1
|
Integer lag in seasons between spawning biomass and recruitment. 1 (default) uses SSB from that many seasons prior. 0 is age-0 recruitment on the same year’s SSB, so recruits may only enter in spawn_seas or later. |
SR_ref_yr |
1 |
Integer year index supplying every input to unfished spawning biomass per recruit, and so to S0 and the curve's scale: weight-at-age, maturity, natural mortality, movement, stray rate, sex ratio, and what enters through init_F. R0 is the exception and is always the year's own value. Default 1. Ignored under rec_model = "mean_rec". |
Use_h_prior
|
0
|
Integer (0/1). Normal priors on steepness. Default 0. |
h_prior
|
NULL
|
Data frame with columns pop, region, mu and sd. Default NULL. |
rec_region_prop_spec
|
NULL
|
Character or NULL. Regional recruitment dispersal structure, default NULL (all estimated freely). Stored as rec_region_prop_spec, 0 = full dispersal, 1 = none. See do_rec_region_prop_mapping. |
use_rec_region_prop_prior
|
0
|
Integer (0/1). Dirichlet priors on regional recruitment proportions. Not valid when n_regions = 1. Default 0. |
rec_region_prop_prior
|
NULL
|
Data frame of Dirichlet concentrations with columns pop and alpha, a list-column of length-n_regions vectors. Default NULL. |
rec_seas_prop_spec |
"fix" |
Character or NULL. Seasonal apportionment structure, default "fix". See do_rec_seas_prop_mapping. |
use_rec_seas_prop_prior
|
0
|
Integer (0/1). Dirichlet priors on seasonal proportions. Not valid when n_seas = 1. Evaluated only over spawn_seas:n_seas when rec_lag = 0 and spawn_seas > 1. Default 0. |
rec_seas_prop_prior
|
NULL
|
Data frame of Dirichlet concentrations with columns pop and alpha. Default NULL. |
use_fixed_rec_seas_prop
|
1
|
Integer (0/1). Whether fixed_rec_seas_prop is used. Reset to 0 with a warning if rec_seas_prop_spec estimates. 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] of fixed seasonal proportions, default all recruitment in season 1. Must be zero before spawn_seas when rec_lag = 0 and spawn_seas > 1. |
do_rec_bias_ramp
|
0
|
Integer (0/1). Whether a bias ramp is applied to ln_RecDevs. Under 0 every penalty is centered on the full -_R^2/2, under 1 the center follows the ramp. Default 0. |
bias_year
|
NA
|
Numeric calendar year at which the ramp reaches its maximum correction. Default NA. |
max_bias_ramp_fct
|
1
|
Numeric in [0, 1], the maximum correction applied at bias_year. Default 1. |
sigmaR_switch
|
1
|
Integer year index at which _R switches from the early to the late value. (default) uses one value throughout. |
dont_est_recdev_last |
0 |
Non-negative integer. Terminal years for which recruitment deviations are not estimated. Forced to 0 when n_proj_yrs_devs > 0, refused under RecDevs_model = "dsem". Default 0. |
dont_pen_recdev_first
|
0
|
Integer. How many leading years of recruitment deviations are estimated but left out of the penalty. 0 (default) penalizes every year. |
init_age_strc |
2 |
Initialization method, default 2. 0/"iterative" iterates to approximate equilibrium, 1/"scalar_no_move" is a scalar geometric series without movement, 2/"matrix" is the matrix series with movement, and 3/"scalar_plus_only" moves only the plus group; all four treat ln_InitDevs as multiplicative deviations from the equilibrium. 4/"free" projects no equilibrium: ages 2 and older are exp(ln_InitDevs) apportioned by sex ratio, so the deviations are on the scale of numbers and equil_init_age_strc becomes a prior on log abundance. |
equil_init_age_strc |
1 |
Plus-group treatment during stochastic initialization, default 1. 0/"equil" estimates no ln_InitDevs, 1/"stoch_no_plus" estimates every age but the plus group, 2/"stoch_all" estimates every age, 3/"stoch_shared_ages" shares ages through init_age_devs_shared (non-NULL required; the plus group is not fixed automatically), and 4/"stoch_all_no_pen" estimates every age and penalizes none, for pairing with init_age_strc = "free". |
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. A non-zero value without init_F_par is converted to init_F_par = qlogis(init_F_prop) with init_F_form = "prop", so each value must be below one. Prefer init_F_par. Default zero. |
init_F_form |
"prop" |
What init_F_par means. "prop" (default) gives init_F = plogis(init_F_par) * exp(ln_F_mean), a proportion of the estimated mean F bounded to (0, 1). "abs" gives init_F = exp(init_F_par), independent of ln_F_mean. Use "abs" when bridging an assessment with a separate historical F; under "prop" the two collapse into one parameter and catch constrains only their product. |
init_F_spec |
"fix" |
"fix" (default) or "est", whether init_F_par is estimated. Sets only the mapping, so it combines freely with init_F_form. Refused under init_age_strc = "free". The value comes from init_F_par [n_regions x n_seas x n_fish_fleets], passed through ..., on the logit scale under "prop" and the log scale under "abs". |
sigmaR_spec |
"est_all" |
Character. Estimation structure for \sigma_R, stored in ln_sigmaR [2 x n_pop x n_regions] with index 1 the initial period and 2 the annual period. Default "est_all", see do_sigmaR_mapping. |
InitDevs_spec
|
NULL
|
Character or NULL. Sharing structure for ln_InitDevs [n_pop x n_regions x (n_ages - 1) x n_sexes]. Default NULL (all independent), see do_InitDevs_mapping. |
InitDevs_sex_spec |
"est_shared_s" |
"est_shared_s" (default) estimates one initial age deviation curve read by every sex; "est_all" gives each sex its own, pooling the level across sexes under an "own_mean" InitDevs_pen_center. Requires n_sexes > 1. |
RecDevs_spec
|
NULL
|
Character or NULL. Sharing structure for ln_RecDevs [n_pop x n_regions x n_years]. Default NULL (all independent), see do_RecDevs_mapping. |
RecDevs_model |
"iid" |
Process error on ln_RecDevs. "iid" (default) is independent about the prior mean, "rw" centers each deviation on the previous one with a diffuse first year, "ar1" reverts toward zero at rate RecDevs_rho with a stationary first year, and "dsem" takes the density from the arrows in Setup_Mod_DSEM. Steps span estimated years, not calendar years. "rw" and "ar1" are refused alongside do_rec_bias_ramp = 1 or RecDevs_pen_center = "own_mean"; "dsem" reads sigmaR off the arrows, so sigmaR_spec other than "fix", dont_est_recdev_last > 0 and a nonzero ramp are refused. |
RecDevs_rho_spec |
"fix" |
Sharing structure for RecDevs_rho [n_pop x n_regions]: "est_all", "est_shared_pop", "est_shared_r", "est_shared_pop_r" or "fix" (default). Only read under RecDevs_model = "ar1", see do_RecDevs_rho_mapping. |
RecDevs_rw_init_sigma |
5 |
Standard deviation given to year one of a random walk, which sets the level of the series. Default 5; NA instead starts the walk at zero under its own sigma. Only read under RecDevs_model = "rw". |
RecDevs_pen_center |
"fixed" |
Where the recruitment and initial age deviation penalties are centered. "fixed" (default) centers on zero or the bias-corrected -\sigma_R^2/2; "own_mean" centers on the estimated deviations' own mean, leaving their level free to be set elsewhere. Cannot be combined with do_rec_bias_ramp = 1. |
Use_rec_level_pen
|
0
|
Integer (0/1). Whether the log recruitment series itself is penalized, separately from the deviation penalty. 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" |
"own_mean" (default) centers on the mean of the log recruitment series, "fixed" centers on zero. |
rec_level_pen_yrs
|
NULL
|
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 by a Gaussian on their difference. Requires n_sexes > 1 and InitDevs_sex_spec = "est_all". Enters the objective unweighted. Default 0. |
init_sex_pen_sigma
|
1
|
Numeric standard deviation of that tie. Default 1. |
sr_penalty |
"none" |
Character. "none" (default), "bh" or "ricker". Only valid under rec_model = "mean_rec". Fits the curve as a likelihood on \log R_y - \log\widehat{R}_y without letting it generate recruitment. |
sr_pen_sigma
|
1
|
Numeric standard deviation of that residual. |
sr_pen_yrs
|
NULL
|
Years the stock-recruit penalty applies over, or NULL (default) for every year with a lagged spawning biomass. Naming a year without one is an error. |
sr_R0_spec |
"shared" |
Character. "shared" (default) takes the curve's scale from ln_global_R0, "est" gives it its own ln_sr_R0, and "rinit" takes it from ln_rinit and requires use_rinit = 1. |
InitDevs_pen_center |
"fixed" |
Where the recruitment and initial age deviation penalties are centered. "fixed" (default) centers on zero or the bias-corrected -\sigma_R^2/2; "own_mean" centers on the estimated deviations' own mean, leaving their level free to be set elsewhere. Cannot be combined with do_rec_bias_ramp = 1. |
h_spec |
NULL |
Character or NULL. Sharing structure for steepness_h [n_pop x n_regions], on a logit scale bounded to (0.2, 1). Default NULL, ignored under rec_model = "mean_rec". See do_h_mapping. |
sgl_seas_spawning_movement
|
NA
|
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 row-stochastic. NA (default) assumes complete natal homing and builds the array internally. |
t_spawn
|
0
|
Numeric fraction of the spawning season elapsed before spawning. 0 (default) spawns before any mortality, 1 after all of it. |
stray_rate_spec |
"fix" |
Estimation structure for stray_rate_pars [n_pop x max_stray_blocks] on the logit scale. "fix" (default) holds every value, "est_all" estimates per population and block, and "est_shared_pop" gives one parameter per block shared across populations, which requires identical block structures. Ignored when use_fixed_stray_rate = 1 or n_pop = 1. |
stray_rate_blocks |
paste0("none_Pop_", seq_len(input_list$data$n_pop)) |
Character vector of length n_pop, either "none_Pop_x" for one block or "Block_k_Year_a-b_Pop_x", with "terminal" allowed as the end year. Default one block each. Stray rate is generally unidentifiable from fisheries data alone, so use use_stray_rate_prior whenever stray_rate_spec != "fix". |
use_fixed_stray_rate |
if (stray_rate_spec != "fix") 0 else 1 |
Integer (0/1). Whether stray rates come from fixed_stray_rate rather than being estimated. Default 1. |
fixed_stray_rate
|
array(0, dim =
c(input_listn_pop,
length(input_listyears)))
|
Array [n_pop x n_years] of stray rates in [0, 1]. Default 0. |
use_stray_rate_prior
|
0
|
Integer (0/1). Beta priors on estimated stray rates. Only relevant when use_fixed_stray_rate = 0 and n_pop > 1; an error is raised alongside use_fixed_stray_rate = 1. Default 0. |
stray_rate_prior
|
NULL
|
Data frame with columns pop, block, mu in (0,1) and sd, one row per population and block. Default NULL. |
spawn_seas
|
1
|
Integer season index in which spawning occurs. Default 1. |
sexratio_spec |
"fix" |
Estimation structure for sexratio_pars [n_pop x n_regions x n_blocks]. Default "fix", which is required when n_sexes = 1. See do_sexratio_pars_mapping. |
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, one entry per population and region, either "none_Pop_x_Region_x" or "Block_k_Year_a-b_Pop_x_Region_x", with "terminal" allowed as the end year. Default one block each. |
use_rinit
|
0
|
Integer (0/1). Whether ln_rinit initializes the population separately from ln_global_R0. Under 0 (default) ln_rinit is fixed and ln_global_R0 does both jobs. |
init_age_devs_shared |
NULL |
Integer vector of length n_ages - 1 giving the factor level of each age position for ln_InitDevs; positions sharing a value share one parameter. Read under equil_init_age_strc = 3, and also respected by InitDevs_spec = "est_shared_r" (applied per population, with a population offset) and "est_shared_pop_r" (applied globally, no offset). c(1:42, rep(42, 9)) gives 42 free parameters for a 52-age model with 43 data ages. Default NULL. |
R0_blocks |
NULL |
Character vector of time blocks for R0, one per population, in the selectivity block vocabulary: "none_Pop_<p>" or "Block_<b>_Year_<a>-<e>_Pop_<p>" on 1-based year indices, with "terminal" allowed. Under "mean_rec" a block is a productivity regime; under a stock-recruit form it makes the curve time-varying, so S0, depletion and any reference point step at the boundary. Default NULL. |
R0_ref_block |
1 |
Integer, the block whose R0 is used wherever a single value is needed: the initial age structure, the regional apportionment, the R0 prior, the ln_rinit penalty, and the stock-recruit scale under sr_R0_spec = "shared". Default 1. |
use_r0_prior
|
0
|
Integer (0/1). Lognormal prior on R0. Default 0. |
r0_prior
|
NULL
|
Data frame with columns pop, mu on the natural scale and sd on the log scale. Required when use_r0_prior = 1. |
Use_rinit_pen
|
0
|
Integer (0/1). Whether (R_{init} / R_0) is penalized under use_rinit = 1. An equilibrium recruitment stands for an average of several years, so _R / (1 / M - 0.5) is a reasonable sd. Default 0. |
rinit_pen_sd
|
1
|
Standard deviation of that penalty, log scale. Default 1. |
ln_global_R0_spec |
"est" |
"est" (default) or "fix". "fix" maps ln_global_R0 off at its starting value, so the deviations hold log recruitment outright. Under rec_model = "mean_rec" a random walk with dont_pen_recdev_first >= 1 leaves the level unidentified and is refused; a walk with the first year still penalized is accepted with a warning. |
Setup_Mod_Biologicals
73 arguments
| Argument | Default | Description |
|---|---|---|
WAA
|
required | Spawning weight-at-age array [n_pop × n_regions × n_years × n_seas × n_ages × n_sexes], also the fallback for WAA_fish and WAA_srv. |
WAA_fish
|
NULL
|
Fishery weight-at-age array, WAA with a trailing n_fish_fleets dim. NULL (default) reads WAA for every fleet. |
WAA_srv
|
NULL
|
Survey weight-at-age array, WAA with a trailing n_srv_fleets dim. NULL (default) reads WAA for every fleet. |
MatAA
|
required | Maturity-at-age array in [0,1], dimensioned like WAA. Maturity at the first age must be exactly 0 under rec_lag = 0, so Setup_Mod_Rec must have been called first. |
addtocomp
|
NULL
|
Deprecated here, pass it to Setup_Mod_Weighting. Still forwarded with a message. The constant added to composition proportions to avoid log(0), ignored by the logistic normal. |
comp_const_obs
|
NULL
|
Deprecated here, pass it to Setup_Mod_Weighting. Still forwarded with a message. Integer switch for where addtocomp enters the multinomial: 1 adds it to the observed proportions that weight the likelihood as well as inside the logarithms, so the likelihood is stationary at pred = obs, 0 weights by the raw observed proportions. |
addtofishidx
|
NULL
|
Deprecated here, pass them to Setup_Mod_Weighting. Still forwarded with a message. Constants added to the fishery indices, survey indices and tag recoveries. |
addtosrvidx
|
NULL
|
Deprecated here, pass them to Setup_Mod_Weighting. Still forwarded with a message. Constants added to the fishery indices, survey indices and tag recoveries. |
addtotag
|
NULL
|
Deprecated here, pass them to Setup_Mod_Weighting. Still forwarded with a message. Constants added to the fishery indices, survey indices and tag recoveries. |
AgeingError
|
NULL
|
Ageing error array mapping true model ages onto observed age bins. Each row is one model age’s share across the observed bins, summing to one, or to zero to drop that age. The age-axis twin of LenBinMap: the likelihood applies and validates the two identically. It sets which bins ObsCatchAA, ObsDiscardAA and ObsSrvIdxAA are dimensioned by; use the *_bins arguments to leave bins out of the likelihood instead. A [n_model_ages × n_obs_ages] matrix is time-invariant and expanded across years, a [n_years × n_model_ages × n_obs_ages] array is time-varying, and NULL (default) builds an identity matrix. For observed bins that are a subset of the model ages, supply a shifted identity such as diag(1, n_model_ages)[, obs_age_index]. |
AgeingError_fish
|
NULL
|
Optional per-fleet ageing error for the fishery fleets, either [n_model_ages × n_obs_ages × n_fish_fleets] or with a leading n_years dim, or NULL (default) to read the shared AgeingError. Each slice is validated as AgeingError is, and every fleet must land on the same observed bins. Read by a fleet’s age compositions and its catch and discards at age. |
AgeingError_srv
|
NULL
|
As AgeingError_fish with n_srv_fleets in place of n_fish_fleets. Read by a fleet’s age compositions and its index at age. |
Use_M_prior
|
0
|
Integer flag for a lognormal prior on natural mortality. 0 (default) or 1. |
M_prior
|
NA
|
Data frame of prior hyperparameters, one row per block combination, with columns popblk, regionblk, yearblk, ageblk, sexblk, mu on the natural scale, sd, and optionally seasblk (left out, it reads the block covering season one). Only used when Use_M_prior = 1. |
fit_lengths
|
0
|
Integer flag for fitting length compositions, 0 (default) or 1. Requires a valid SizeAgeTrans. |
SizeAgeTrans
|
NA
|
Size-at-age transition array [n_pop × n_regions × n_years × n_seas × n_lens × n_ages × n_sexes], column-stochastic over ages. Required when fit_lengths = 1. Read by every fleet unless overridden. |
SizeAgeTrans_fish |
NULL |
Optional per-fleet size-at-age arrays, dimensioned like SizeAgeTrans with a trailing fleet dim. NULL (default) reads the shared array. Only meaningful under growth_model = "none"; a growth model already derives one key per fleet at that fleet's timing and refuses these. |
SizeAgeTrans_srv |
NULL |
Optional per-fleet size-at-age arrays, dimensioned like SizeAgeTrans with a trailing fleet dim. NULL (default) reads the shared array. Only meaningful under growth_model = "none"; a growth model already derives one key per fleet at that fleet's timing and refuses these. |
do_caal
|
0
|
Integer flag for building the joint arrays at length and age, 0 (default) or 1. Requires fit_lengths = 1 and adds Fish_caal, Fish_caal_discard and Srv_caal to the report. |
growth_model |
"none" |
"none" (default) keeps SizeAgeTrans and the weight-at-age arrays as data. "vb_schnute" builds the size-age key from estimable von Bertalanffy parameters in Schnute's form: length L1 at growth_A1, L2 at growth_A2, rate K, and CVs CV1 and CV2 at the two reference ages. "richards" adds the coefficient rho, with rho = 1 recovering von Bertalanffy. Both require fit_lengths = 1 and ignore SizeAgeTrans. |
growth_spec |
"est_all" |
How the growth parameters are estimated: "est_all" (default, one set per population, region and sex), "est_shared_r", "est_shared_s", "est_shared_r_s", 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 of length n_growth_pars in parameter order, or named by parameter, each "none", "iid", "rw", or "dsem". A varying parameter gets a deviation series ln_growth_devs and a log sigma in the time-varying half of growth_pe_pars; under "dsem" the density comes from Setup_Mod_DSEM and that sigma stays at its start. |
growth_tv_years
|
NULL
|
Calendar years the deviations are active in. NULL (default) for every model year, a vector for every varying parameter, or a list named by parameter. Deviations outside the range are kept at zero. |
growth_tv_link |
"log" |
The scale a deviation enters on. "log" (default) multiplies the parameter by e^{\delta}; "logit" keeps it inside growth_par_bounds, so the parameter approaches a bound instead of crossing it. |
growth_par_bounds
|
NULL
|
Matrix [n_growth_pars x 2] of lower and upper bounds on the natural scale, required under the logit link. |
growth_tv_sigma_spec |
"fix" |
"fix" (default) holds the process error sds of the deviations at their starting values, "est" estimates them. Both read the time-varying half of growth_pe_pars, one slot per growth parameter. |
growth_tv_spec |
"est_all" |
How the deviations are shared across strata, in the growth_spec vocabulary: "est_all" (default), "est_shared_r", "est_shared_s" or "est_shared_r_s". |
growth_tv_type |
"curve" |
"curve" (default) reads every year's size at age off that year's curve. "cohort" advances size at age cohort by cohort: each cohort grows by the increment the current year's parameters imply from the size it reached, ages still in the linear phase keep their birth year's length at growth_A1, the first age past growth_A1 is placed on the current year's curve, and the plus group blends the entering cohort with the fish already there by numbers at age. The CV at age stays at the first year's sizes, and propagation starts in the first year any deviation is active. |
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" |
Semi-parametric growth: a year by age surface of deviations multiplying the parametric curve, so the deviations move mean length around it. "none" (default) keeps growth parametric; otherwise "iid", "rw" over years within an age, "3dmarg" or "3dcond" (a Gaussian Markov random field over age, year and cohort on the marginal or conditional variance), "2dar1" (separable over ages and years), or "dsem" (density from Setup_Mod_DSEM, one series per age, which refuses growth_semipar_spec = "est"). The spread at age follows the deviated mean, leaving the CV at age to the parametric part. |
growth_semipar_spec |
"fix" |
Whether the semi-parametric half of growth_pe_pars is estimated ("est") or kept at its starting values ("fix", default). The deviations themselves are always estimated. |
growth_semipar_ages
|
NULL
|
Ages the deviations are estimated over, as ages rather than indices. NULL (default) uses every age; ages outside the set stay at zero. |
growth_semipar_years
|
NULL
|
Calendar years the deviations are estimated over. 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 compositions are recorded on, for compositions on coarser bins than the model has. Each row is one model bin’s share across the observed bins, summing to one, or to zero to drop that bin. The length-axis twin of AgeingError, applied and validated identically. Use the *LenComps_bins arguments to leave bins out of the likelihood instead. NULL (default) fits on the model bins. |
CAAL_LenBinMap
|
NULL
|
Optional 0/1 matrix [n_lens x n_caal_lens] saying which model length bins each length row of the conditional age-at-length data covers, one column per row. A row’s expected ages are the numbers at length and age summed over the bins it covers, so rows can sit on coarser bins than the model, and need not cover every bin. Unlike LenBinMap, its rows need not sum to one, since a model bin can sit in no row or in several. The age-at-length arrays are then dimensioned by n_caal_lens. NULL (default) gives one row per model bin. |
growth_A1 |
NULL |
Reference ages for L1 and L2. growth_A2 = "Linf" makes L2 the asymptotic length itself. |
growth_A2 |
NULL |
Reference ages for L1 and L2. growth_A2 = "Linf" makes L2 the asymptotic length itself. |
growth_len_lower
|
NULL
|
Lower edges of the length bins. lens in Setup_Mod_Dim are 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" |
"len" (default) interpolates the CV on mean length between L1 and L2, "age" on age. |
growth_sd_type |
"cv" |
"cv" (default) scales the mean by the CV parameters, "sd" reads them as standard deviations. |
growth_dist |
"normal" |
"normal" (default) or "lognormal" length at age. |
growth_plus_group |
"mixture" |
"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; "curve" reads the curve at the accumulator age. |
waa_model |
"data" |
Where weight at age comes from. "data" (default) reads WAA, WAA_fish and WAA_srv. "wt_len" builds them from the size-age key and W = a L^b at the bin midpoints, so weight at age holds the spread of length at age; the spawning weight uses the key at spawning time and each fleet's weight the key at 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, a vector of two or an array [n_pop x n_regions x n_sexes x 2]. Required under waa_model = "wt_len". |
M_spec |
"est_ln_M" |
Natural mortality estimation. "est_ln_M" (default) estimates ln_M across the blocks; "fix" holds mortality at Fixed_natmort and maps ln_M off. |
M_popblk_spec |
"constant" |
Blocking for ln_M across populations, either "constant" (default) or a list of integer index vectors, e.g. list(1, 2). |
M_ageblk_spec |
"constant" |
Blocking across ages, "constant" (default) or a list of integer index vectors, e.g. list(1:5, 6:10). |
M_regionblk_spec |
"constant" |
Blocking across regions, "constant" (default) or a list of integer index vectors, e.g. list(1:3, 4:5). |
M_yearblk_spec |
"constant" |
Blocking across years, "constant" (default) or a list of integer index vectors, e.g. list(1:10, 11:30). |
M_seasblk_spec |
"constant" |
Blocking across seasons, "constant" (default, one rate all year) or a list of integer index vectors, e.g. list(1:2, 3:4). Blocks hold rates per year, so two half-year seasons at 0.2 and 0.4 accumulate an annual 0.3. Only identifiable off within-year data (seasonal catch, seasonal comps, or surveys in more than one season), and even then the annual total comes back much better than the split, so prefer fixing the split and estimating the level. Warns for a single season model. |
M_sexblk_spec |
"constant" |
Blocking across sexes, "constant" (default) or a list of integer index vectors, e.g. list(1, 2). |
Fixed_natmort |
NULL |
Fixed natural mortality array, 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. Values are rates per year either way, so mortality in a season is the rate times seasdur. Required when M_spec = "fix". |
NAA_re |
"none" |
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. "none" (default) keeps numbers deterministic; otherwise "iid", "1dar1_a" over ages, "1dar1_y" over years, "2dar1" separable over both, "3dcond" or "3dmarg" over age, year and cohort, or "dsem", which takes the density from Setup_Mod_DSEM one series per state age, leaves ln_sigmaNAA at its start and refuses NAA_sigma_spec = "est". Each series is the log state with the log deterministic prediction as its mean. 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. 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, so a forecast from Do_Population_Projection omits this process error while the closed loop operating model projects the state forward. |
NAA_re_ages
|
NULL
|
Ages the state is estimated over, matched against input_listages by value. A model on ages 0:4 takes c(1, 2, 3, 4) for the full state. NULL (default) uses ages[-1]. Must be a contiguous run. |
NAA_re_years
|
NULL
|
Calendar years the state is estimated over, matched against input_listyears by value. NULL (default) uses years[-1]. Must be a contiguous run. |
NAA_re_seasons |
"annual" |
Seasons the state is estimated over. "annual" (default) puts a state at season one only, leaving the numbers within a year deterministic. "all" puts one at the start of every season, and an integer vector selects specific seasons, which need not be contiguous. Use it 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; only the standard deviation varies by season, through NAA_sigma_seasblk_spec. |
NAA_re_season |
"iid" |
Correlation across seasons within a year. "iid" (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" |
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 state runs and 0 where a population never occupies that region. NULL (default) gives every cell a state. A cell holding no fish has an undefined lognormal state, so 0 drops it from the map and the penalty; such cells need the region and population correlations off. |
NAA_pe_spec |
"est_all" |
How the age, year and cohort correlations in NAA_pe_pars are shared. "est_all" (default) gives a free set per population, region and sex. "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" two, and "est_shared_p_r_s" gives one set for the model. "fix" holds them at their starting values. Sharing a correlation is not correlating the innovations: regions that share \rho still get independent shocks, whereas NAA_re_region = "us" makes the shocks covary. |
NAA_sigma_spec |
"est" |
Whether the process error standard deviations are estimated ("est", default) or kept at their starting values ("fix"). The states themselves are always estimated. |
NAA_re_region |
"iid" |
Correlation across regions, composed with the age and year grid. "iid" (default) leaves regions independent, "us" estimates an unstructured correlation of n_r(n_r-1)/2 parameters. |
NAA_re_region_spec |
"est_all" |
How the region correlations are shared. "est_all" (default) gives a free matrix per population and sex, "est_shared_p" and "est_shared_s" share one dim, "est_shared_p_s" gives a single matrix, and "fix" holds them. |
NAA_re_pop |
"iid" |
Correlation across populations and across sexes, composed with the region, age and year structures. "iid" (default) leaves them independent, "us" estimates an unstructured correlation. Both are global, so a two-sex model spends one parameter on NAA_re_sex = "us". |
NAA_re_sex |
"iid" |
Correlation across populations and across sexes, composed with the region, age and year structures. "iid" (default) leaves them independent, "us" estimates an unstructured correlation. Both are global, so a two-sex model spends one parameter on NAA_re_sex = "us". |
NAA_sigma_popblk_spec |
"constant" |
Blocking for the process error standard deviation, each "constant" (default) or a list of integer vectors, exactly as the M_*blk_spec arguments. Blocking shares a standard deviation and never removes a cell from the state. Only NAA_re = "iid" admits one varying over years or ages; every other form is separable or Markov in a dim. The season dim is the exception, being whitened outside the age and year density, and is ruled out only by NAA_re_season = "us". |
NAA_sigma_regionblk_spec |
"constant" |
Blocking for the process error standard deviation, each "constant" (default) or a list of integer vectors, exactly as the M_*blk_spec arguments. Blocking shares a standard deviation and never removes a cell from the state. Only NAA_re = "iid" admits one varying over years or ages; every other form is separable or Markov in a dim. The season dim is the exception, being whitened outside the age and year density, and is ruled out only by NAA_re_season = "us". |
NAA_sigma_yearblk_spec |
"constant" |
Blocking for the process error standard deviation, each "constant" (default) or a list of integer vectors, exactly as the M_*blk_spec arguments. Blocking shares a standard deviation and never removes a cell from the state. Only NAA_re = "iid" admits one varying over years or ages; every other form is separable or Markov in a dim. The season dim is the exception, being whitened outside the age and year density, and is ruled out only by NAA_re_season = "us". |
NAA_sigma_seasblk_spec |
"constant" |
Blocking for the process error standard deviation, each "constant" (default) or a list of integer vectors, exactly as the M_*blk_spec arguments. Blocking shares a standard deviation and never removes a cell from the state. Only NAA_re = "iid" admits one varying over years or ages; every other form is separable or Markov in a dim. The season dim is the exception, being whitened outside the age and year density, and is ruled out only by NAA_re_season = "us". |
NAA_sigma_ageblk_spec |
"constant" |
Blocking for the process error standard deviation, each "constant" (default) or a list of integer vectors, exactly as the M_*blk_spec arguments. Blocking shares a standard deviation and never removes a cell from the state. Only NAA_re = "iid" admits one varying over years or ages; every other form is separable or Markov in a dim. The season dim is the exception, being whitened outside the age and year density, and is ruled out only by NAA_re_season = "us". |
NAA_sigma_sexblk_spec |
"constant" |
Blocking for the process error standard deviation, each "constant" (default) or a list of integer vectors, exactly as the M_*blk_spec arguments. Blocking shares a standard deviation and never removes a cell from the state. Only NAA_re = "iid" admits one varying over years or ages; every other form is separable or Markov in a dim. The season dim is the exception, being whitened outside the age and year density, and is ruled out only by NAA_re_season = "us". |
Setup_Mod_Movement
32 arguments
| Argument | Default | Description |
|---|---|---|
move_type
|
0
|
Integer. 0 (default) unstructured Markov, 1 CTMC. |
do_recruits_move
|
0
|
Integer flag. 0 (default) fixes the movement deviations and CTMC rows at the minimum age to zero, 1 moves recruits. |
use_fixed_movement
|
0
|
Integer flag. 0 (default) estimates movement, 1 fixes it at Fixed_Movement and maps every movement parameter to NA. |
Fixed_Movement
|
NA
|
Movement probability array [n_pop × n_regions × n_regions × n_years × n_seas × n_ages × n_sexes], each [n_regions × n_regions] slice row-stochastic. Required when use_fixed_movement = 1. NA (default) builds an identity matrix. |
Use_Movement_Prior
|
0
|
Integer flag, 1 for Dirichlet priors on the movement rows. Default 0. |
Movement_prior
|
NULL
|
Data frame with columns pop, region_from, year, seas, age, sex and alpha, the last a list-column of length-n_regions concentrations for transitions out of region_from. Values near 1 are uninformative, larger ones concentrate toward equal movement. Read when Use_Movement_Prior = 1. |
Movement_popblk_spec |
"constant" |
Blocking across populations, ages, years, seasons and sexes: "constant" (default) or a list of integer vectors, e.g. list(c(1, 2), 3) for populations, list(1:4, 5:10) for a juvenile and an adult block, or list(1, 2) for sex-specific movement. Use Movement_yearblk_spec for structural breaks or move_year_re for annual variation, not both, and likewise Movement_ageblk_spec or move_age_re. All are ignored when move_type = 1. |
Movement_ageblk_spec |
"constant" |
Blocking across populations, ages, years, seasons and sexes: "constant" (default) or a list of integer vectors, e.g. list(c(1, 2), 3) for populations, list(1:4, 5:10) for a juvenile and an adult block, or list(1, 2) for sex-specific movement. Use Movement_yearblk_spec for structural breaks or move_year_re for annual variation, not both, and likewise Movement_ageblk_spec or move_age_re. All are ignored when move_type = 1. |
Movement_yearblk_spec |
"constant" |
Blocking across populations, ages, years, seasons and sexes: "constant" (default) or a list of integer vectors, e.g. list(c(1, 2), 3) for populations, list(1:4, 5:10) for a juvenile and an adult block, or list(1, 2) for sex-specific movement. Use Movement_yearblk_spec for structural breaks or move_year_re for annual variation, not both, and likewise Movement_ageblk_spec or move_age_re. All are ignored when move_type = 1. |
Movement_seasblk_spec |
"constant" |
Blocking across populations, ages, years, seasons and sexes: "constant" (default) or a list of integer vectors, e.g. list(c(1, 2), 3) for populations, list(1:4, 5:10) for a juvenile and an adult block, or list(1, 2) for sex-specific movement. Use Movement_yearblk_spec for structural breaks or move_year_re for annual variation, not both, and likewise Movement_ageblk_spec or move_age_re. All are ignored when move_type = 1. |
Movement_sexblk_spec |
"constant" |
Blocking across populations, ages, years, seasons and sexes: "constant" (default) or a list of integer vectors, e.g. list(c(1, 2), 3) for populations, list(1:4, 5:10) for a juvenile and an adult block, or list(1, 2) for sex-specific movement. Use Movement_yearblk_spec for structural breaks or move_year_re for annual variation, not both, and likewise Movement_ageblk_spec or move_age_re. All are ignored when move_type = 1. |
move_year_re |
"none" |
How the deviations vary across years within a surface: "none" (default), "iid", "ar1", or "dsem", which takes every cell's density from the arrows given to Setup_Mod_DSEM, one series per cell of every dim with more than one level (per region under CTMC movement, whose deviations hold no destination), and leaves move_pe_pars read by nothing. Refuses a Movement_yearblk_spec other than "constant" unless "none", since a year block and year deviations describe one thing twice. |
move_age_re |
"none" |
How the deviations vary across ages within a surface: "none" (default), "iid" or "ar1"; must be "none" under move_year_re = "dsem", and refuses a Movement_ageblk_spec other than "constant" unless "none". Every switch "none" is no deviations. Otherwise each surface's sd is estimated, with an AR1 correlation parameter wherever a dim is "ar1", and the deviations are random effects with random = "move_devs" in fit_model or penalized fixed effects without it. |
move_pop_re |
"none" |
How the deviations vary across populations, seasons and sexes: "none" (default, one deviation shared across the dim), "iid" (independent), "us" (an unstructured correlation of n(n-1)/2 parameters, shared by every pair, as NAA_re_sex is), or a list of blocks of levels such as list(1:2, 3), where the levels in a block share one deviation and blocks are independent. Blocks must cover each active level once. "us" needs more than one active level, and neither it nor a block list is allowed under move_year_re = "dsem". Every origin and destination pair (region under the CTMC) always has its own deviations. |
move_seas_re |
"none" |
How the deviations vary across populations, seasons and sexes: "none" (default, one deviation shared across the dim), "iid" (independent), "us" (an unstructured correlation of n(n-1)/2 parameters, shared by every pair, as NAA_re_sex is), or a list of blocks of levels such as list(1:2, 3), where the levels in a block share one deviation and blocks are independent. Blocks must cover each active level once. "us" needs more than one active level, and neither it nor a block list is allowed under move_year_re = "dsem". Every origin and destination pair (region under the CTMC) always has its own deviations. |
move_sex_re |
"none" |
How the deviations vary across populations, seasons and sexes: "none" (default, one deviation shared across the dim), "iid" (independent), "us" (an unstructured correlation of n(n-1)/2 parameters, shared by every pair, as NAA_re_sex is), or a list of blocks of levels such as list(1:2, 3), where the levels in a block share one deviation and blocks are independent. Blocks must cover each active level once. "us" needs more than one active level, and neither it nor a block list is allowed under move_year_re = "dsem". Every origin and destination pair (region under the CTMC) always has its own deviations. |
move_re_pops
|
NULL
|
Integer vectors of the populations, years, seasons, ages and sexes the deviations are estimated over. Note that an AR1 or unstructured correlation runs over the active levels. |
move_re_years
|
NULL
|
Integer vectors of the populations, years, seasons, ages and sexes the deviations are estimated over. Note that an AR1 or unstructured correlation runs over the active levels. |
move_re_seas
|
NULL
|
Integer vectors of the populations, years, seasons, ages and sexes the deviations are estimated over. Note that an AR1 or unstructured correlation runs over the active levels. |
move_re_ages
|
NULL
|
Integer vectors of the populations, years, seasons, ages and sexes the deviations are estimated over. Note that an AR1 or unstructured correlation runs over the active levels. |
move_re_sexes
|
NULL
|
Integer vectors of the populations, years, seasons, ages and sexes the deviations are estimated over. Note that an AR1 or unstructured correlation runs over the active levels. |
move_pe_spec |
"est_all" |
"est_all" (default) gives every pair its own log sd and AR1 correlations in move_pe_pars, "est_shared" gives one set to every pair, "fix" holds every pair's sd and correlations at their starting value instead of estimating them (the deviations, if any, are still estimated against that fixed sd), and a list of blocks of rows of the pair table (input_list$data$move_pairs, origins and destinations over the edges of the adjacency matrix in origin then destination order, one row per region under the CTMC) gives one set per block. The unstructured correlations are always shared. |
ctmc_move_dat
|
NULL
|
Data frame required when move_type = 1, one row per population, region, year, season, age and sex, with columns pop, regions, years, seas, ages, sexes and any covariates the formulas name. Projection years beyond n_years are capped at the final estimation year to prevent spline extrapolation. |
adjacency_mat
|
NULL
|
Square [n_regions × n_regions] matrix, 1 for an allowed transition and 0 for none. 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) (diag(1, n_regions) is the identity, not an adjacency matrix). Required under move_type = 1, where it is validated for dimension, 0/1 entries, a zero diagonal and at least one connection; built automatically under move_type = 0. |
area_r
|
rep(1,
input_listn_regions)
|
Numeric vector [n_regions] of region areas, used to scale the CTMC diffusion rates. Required under move_type = 1. Default rep(1, n_regions). |
diffusion_formula
|
NULL
|
Formula for the CTMC diffusion () linear predictor, e.g. ~ bs(depth, df = 4). Every right-hand-side variable must be in ctmc_move_dat. Required under move_type = 1. |
preference_formula
|
NULL
|
Formula for the CTMC preference (taxis, ) linear predictor, on the same terms. Required under move_type = 1. |
ctmc_diffusion_bounds |
0 |
How the CTMC generator is kept a valid Metzler matrix when taxis outweighs diffusion. "softplus" takes a softplus of \theta_j + d of width ctmc_diffusion_eps; "upwind" takes the finite volume flux \theta_j + \max(d, 0), which keeps diffusion whole and adds only the down-gradient taxis, so positivity never depends on the two cancelling; "sg" takes the Scharfetter-Gummel flux \theta_j B(-d / \theta_j), B(x) = x / (e^x - 1), smooth and positive everywhere with no width to choose. |
ctmc_diffusion_eps |
0.1 |
Positive width of the softplus under ctmc_diffusion_bounds = "softplus". Default 0.1. An edge where taxis exactly cancels diffusion has eps * log(2), so this is a floor on exchange as well as a smoothing constant. |
move_timing
|
0
|
How movement and mortality are sequenced within a season. 0 (default) moves then kills, 1 kills then moves, and 2 runs the two together through the matrix exponential of Q- (Z). 2 needs an estimated CTMC generator, so move_type = 1 and use_fixed_movement = 0. |
ctmc_scale_by_seasdur
|
1
|
Integer flag for the time units of the CTMC generator. 1 (default) treats Q as an annual rate and exponentiates Q [s] each season, so movement and mortality share time units; 0 exponentiates Q once per season whatever its duration. Only matters under move_type = 1 with n_seas > 1, and is forced to 1 under move_timing = 2. |
move_expm_nsub
|
0
|
How matrix exponentials of the generator are evaluated, both converting Q to movement fractions and inside the move_timing = 2 seasonal operators. 0 (default) uses Matrix::expm. A power of two n uses n implicit backward Euler substeps, (I - A/n)^{-n}, as one linear solve plus _2 n squarings, which is why n must be a power of two. Its reverse-mode derivative is much cheaper, so the gradient is several times faster, but it is a first-order approximation and n = 1 is plain solve(I - A). |
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) of whether each fleet’s tagging data enter the likelihood. Default 0. |
conv_tag_release_indicator
|
NULL
|
Integer matrix [n_conv_tag_cohorts × 3] of the release region, year and season of each cohort. Required when any use_conv_fish_tagging = 1. Default NULL. |
conv_tag_max_liberty
|
0
|
Integer maximum years at liberty in the likelihood; later recaptures are ignored. Must exceed 0 when tagging is active. Default 0. |
conv_tagged_fish
|
NA
|
Array [n_conv_tag_cohorts × n_pop × n_ages × n_sexes] of fish released per cohort. Dims not attended in conv_fish_tag_attr take all their fish in index 1 and zero elsewhere. Default NA. |
obs_conv_tag_fish_recap
|
NA
|
Observed recaptures [conv_tag_max_liberty × n_seas × n_conv_tag_cohorts × n_pop × n_regions × n_ages × n_sexes × n_fish_fleets]. Default NA. |
conv_fish_tag_like |
NA |
Tag recapture likelihood: "Poisson", "NegBin", "Multinomial_Release", "Multinomial_Recapture", "Dirichlet-Multinomial_Release" or "Dirichlet-Multinomial_Recapture", stored as 0-5. Default NA. |
conv_tag_mixing_period
|
1
|
Integer years, or seasons in a seasonal model, after release before recaptures contribute to the likelihood, allowing the tags to mix before they inform movement. Default 1. |
conv_tag_t_tagging
|
1
|
Numeric scalar or vector [n_conv_tag_cohorts] in [0, 1], the fraction of the season remaining at release: 1 the start of the season, 0.5 mid-season, 0 the end. A scalar is recycled. Default 1. |
use_conv_tag_fishrep_prior
|
0
|
Integer (0/1) for priors on the reporting rates. Default 0. |
conv_tag_fishrep_prior
|
NULL
|
Data frame with columns region, block, fleet, mu, sd and type. Default NULL. |
conv_tag_pop_pool
|
as.list(1:input_listn_pop)
|
Lists of integer vectors defining the population, age and sex pooling groups for the tagging likelihood. Use list(1:n) for a dim that is not attended; custom groupings such as list(1:5, 6:10) work for an attended one. A structure inconsistent with conv_fish_tag_attr warns and is overridden to a single group. Default one group per level. |
conv_tag_age_pool
|
as.list(seq_along(input_listages))
|
Lists of integer vectors defining the population, age and sex pooling groups for the tagging likelihood. Use list(1:n) for a dim that is not attended; custom groupings such as list(1:5, 6:10) work for an attended one. A structure inconsistent with conv_fish_tag_attr warns and is overridden to a single group. Default one group per level. |
conv_tag_sex_pool
|
as.list(1:input_listn_sexes)
|
Lists of integer vectors defining the population, age and sex pooling groups for the tagging likelihood. Use list(1:n) for a dim that is not attended; custom groupings such as list(1:5, 6:10) work for an attended one. A structure inconsistent with conv_fish_tag_attr warns and is overridden to a single group. Default one group per level. |
init_conv_tag_mort_spec |
NULL |
"fix", "est_shared" or "est_all": whether the initial tag-induced mortality and the chronic shedding rate are held at their starting values, estimated as one value across release events, or estimated per event. See do_conv_init_tag_mort_mapping and do_conv_tag_shed_mapping. Default NULL. |
conv_tag_shed_spec |
NULL |
"fix", "est_shared" or "est_all": whether the initial tag-induced mortality and the chronic shedding rate are held at their starting values, estimated as one value across release events, or estimated per event. See do_conv_init_tag_mort_mapping and do_conv_tag_shed_mapping. Default NULL. |
conv_tagrep_spec |
"fix" |
Sharing structure for conv_tag_fish_reporting_pars [n_regions × max_tagrep_blocks × n_fish_fleets]. Default "fix", which warns. See do_conv_tag_fish_reporting_pars_mapping. |
conv_tag_fish_reporting_blocks |
NULL |
Character vector of time blocks for the fishery reporting rates, each "none_Region_r_Fleet_f" or "Block_b_Year_y1-y2_Region_r_Fleet_f" with "terminal" allowed as the end year. Parsed into an [n_regions × n_years × n_fish_fleets] array. NULL (default) gives one constant block per region and fleet. |
conv_fish_tag_attr |
"p_a_s" |
Character scalar or vector [n_conv_tag_cohorts] naming which dims are resolved at release, built from "p" (population), "a" (age) and "s" (sex) joined by underscores: "p_a_s" (default), "a_s", "p_a", "p_s", "a", "s", "p" or "none". A scalar is recycled; a vector lets events resolve different dims. Region and fleet are always kept. An unattended dim takes all that event's fish in index 1 and is apportioned to full resolution by the release platform. A dim may only be split into several pooling groups if it is attended in every release event; otherwise its pooling argument is overridden to a single group with a warning. |
conv_tag_release_platform
|
NULL
|
Character matrix [n_conv_tag_cohorts × 2] of the release platform and fleet index per cohort, in the format Setup_Sim_Tagging uses. Default NULL releases from the survey, fleet 1, which is read only when conv_fish_tag_attr leaves a dim of the released fish to be spread. |
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] in the units catch_units names. Where UseCatch == 0 and no population-specific catch is used, an NA here is a missing observation: fishing is assumed to have continued and Fmort and ln_F_devs are estimated as usual. A recorded value, typically 0, is a real closure: Fmort is forced to zero and no deviation is estimated. See Get_Fdev_PE_loglik. |
ObsCatchAA
|
NULL
|
Observed catch at age [n_regions, n_years, n_seas, n_obs_ages, n_sexes, n_fish_fleets], the ages being the columns of the fleet’s ageing error matrix, through which the predicted catch at each model age is read before it is compared. 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, which is the native form for ICES age-structured assessments. The exact factorization of an at-age observation into a total and a composition holds for Poisson and multinomial but not lognormal, so a fleet must use one or the other and supplying both is an error. NULL (default) keeps the fleet on aggregated catch. |
UseCatchAA
|
NULL
|
Integer array shaped like ObsCatchAA, 1 where an observation is fit. A cell that is not fit is also not fished, so this governs closures the way UseCatch does. |
ObsCatchAA_SE
|
NULL
|
Reported standard errors shaped like their observation array, read only when that data source’s sigma_form asks for them. |
sigmaCAA_key
|
NULL
|
Integer array [n_obs_ages, n_sexes, n_fish_fleets] coupling the catch at age observation error, the key matrix 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 ages, 1 2 3 4 5 gives one sd per age, 1 1 2 2 2 gives sds by age group, and 1 1 1 1 1 gives one for the fleet. Defaults to one parameter per fleet. A parameter informed by fewer than two observations is refused, since an sd with a single observation drives the likelihood to negative infinity rather than failing outright. |
sigmaCAA_spec |
"est" |
"est" (default) or "fix". Starting values go through ... as ln_sigmaCAA. |
ObsDiscardAA
|
NULL
|
Observed discard at age and its use flags, shaped like ObsCatchAA and read through the same fishery ageing error. |
UseDiscardAA
|
NULL
|
Observed discard at age and its use flags, shaped like ObsCatchAA and read through the same fishery ageing error. |
ObsDiscardAA_SE
|
NULL
|
Reported standard errors shaped like their observation array, read only when that data source’s sigma_form asks for them. |
ObsDiscardAA_pop
|
NULL
|
Population-specific counterparts, with a leading population dim. |
UseDiscardAA_pop
|
NULL
|
Population-specific counterparts, with a leading population dim. |
ObsDiscardAA_pop_SE
|
NULL
|
Reported standard errors shaped like their observation array, read only when that data source’s sigma_form asks for them. |
ObsCatchAA_pop
|
NULL
|
Population-specific counterparts, with a leading population dim. |
UseCatchAA_pop
|
NULL
|
Population-specific counterparts, with a leading population dim. |
ObsCatchAA_pop_SE
|
NULL
|
Reported standard errors shaped like their observation array, read only when that 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 sigmaCAA_key. sigmaDAA_key is [n_obs_ages, n_sexes, n_fish_fleets]; the two population-specific keys take a leading population dim. |
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 sigmaCAA_key. sigmaDAA_key is [n_obs_ages, n_sexes, n_fish_fleets]; the two population-specific keys take a leading population dim. |
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 sigmaCAA_key. sigmaDAA_key is [n_obs_ages, n_sexes, n_fish_fleets]; the two population-specific keys take a leading population dim. |
sigmaDAA_pop_spec |
"est" |
"est" or "fix". |
CatchAA_Type |
"spltRaggS" |
Which dims the fleet reports separately, in the composition vocabulary, as one setting for every fleet, one per fleet, or year and fleet specifications such as "spltRaggS_Year_1-20_Fleet_1". "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, in the composition vocabulary, as one setting for every fleet, one per fleet, or year and fleet specifications such as "spltRaggS_Year_1-20_Fleet_1". "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, in the composition vocabulary, as one setting for every fleet, one per fleet, or year and fleet specifications such as "spltRaggS_Year_1-20_Fleet_1". "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, in the composition vocabulary, as one setting for every fleet, one per fleet, or year and fleet specifications such as "spltRaggS_Year_1-20_Fleet_1". "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" (default) fits the observation against the prediction for the season it sits in; "aggSeas" sums the prediction over the year's seasons and fits one observation, which is how a fleet that lands catch all year but reports one annual total is usually recorded. Under "aggSeas" the observation stays in the season it was placed in and exactly one season per region and year may be on in the matching Use array, since more than one would be fit against the same year total. 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" (default) fits the observation against the prediction for the season it sits in; "aggSeas" sums the prediction over the year's seasons and fits one observation, which is how a fleet that lands catch all year but reports one annual total is usually recorded. Under "aggSeas" the observation stays in the season it was placed in and exactly one season per region and year may be on in the matching Use array, since more than one would be fit against the same year total. 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" (default) fits the observation against the prediction for the season it sits in; "aggSeas" sums the prediction over the year's seasons and fits one observation, which is how a fleet that lands catch all year but reports one annual total is usually recorded. Under "aggSeas" the observation stays in the season it was placed in and exactly one season per region and year may be on in the matching Use array, since more than one would be fit against the same year total. 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" (default) fits the observation against the prediction for the season it sits in; "aggSeas" sums the prediction over the year's seasons and fits one observation, which is how a fleet that lands catch all year but reports one annual total is usually recorded. Under "aggSeas" the observation stays in the season it was placed in and exactly one season per region and year may be on in the matching Use array, since more than one would be fit against the same year total. 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" (default) fits the observation against the prediction for the season it sits in; "aggSeas" sums the prediction over the year's seasons and fits one observation, which is how a fleet that lands catch all year but reports one annual total is usually recorded. Under "aggSeas" the observation stays in the season it was placed in and exactly one season per region and year may be on in the matching Use array, since more than one would be fit against the same year total. 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" (default) fits the observation against the prediction for the season it sits in; "aggSeas" sums the prediction over the year's seasons and fits one observation, which is how a fleet that lands catch all year but reports one annual total is usually recorded. Under "aggSeas" the observation stays in the season it was placed in and exactly one season per region and year may be on in the matching Use array, since more than one would be fit against the same year total. 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" (default) fits the observation against the prediction for the season it sits in; "aggSeas" sums the prediction over the year's seasons and fits one observation, which is how a fleet that lands catch all year but reports one annual total is usually recorded. Under "aggSeas" the observation stays in the season it was placed in and exactly one season per region and year may be on in the matching Use array, since more than one would be fit against the same year total. 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" (default) fits the observation against the prediction for the season it sits in; "aggSeas" sums the prediction over the year's seasons and fits one observation, which is how a fleet that lands catch all year but reports one annual total is usually recorded. Under "aggSeas" the observation stays in the season it was placed in and exactly one season per region and year may be on in the matching Use array, since more than one would be fit against the same year total. 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, and "2dar1" correlates over ages and years jointly through a separable AR(1), which needs the fleet's observed ages and years to form a complete grid. A cell with one observed age falls back to independent. The population-specific data sources have their own settings. The 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, and "2dar1" correlates over ages and years jointly through a separable AR(1), which needs the fleet's observed ages and years to form a complete grid. A cell with one observed age falls back to independent. The population-specific data sources have their own settings. The 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, and "2dar1" correlates over ages and years jointly through a separable AR(1), which needs the fleet's observed ages and years to form a complete grid. A cell with one observed age falls back to independent. The population-specific data sources have their own settings. The 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, and "2dar1" correlates over ages and years jointly through a separable AR(1), which needs the fleet's observed ages and years to form a complete grid. A cell with one observed age falls back to independent. The population-specific data sources have their own settings. The 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, in the spec strings sigmaF_spec uses. 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 (default) takes "est_shared_r_s", or "est_shared_p_r_s" for the population data sources. 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. |
rho_catch_pop_spec |
NULL |
How each data source's correlation parameters are shared, in the spec strings sigmaF_spec uses. 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 (default) takes "est_shared_r_s", or "est_shared_p_r_s" for the population data sources. 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. |
rho_discard_spec |
NULL |
How each data source's correlation parameters are shared, in the spec strings sigmaF_spec uses. 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 (default) takes "est_shared_r_s", or "est_shared_p_r_s" for the population data sources. 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. |
rho_discard_pop_spec |
NULL |
How each data source's correlation parameters are shared, in the spec strings sigmaF_spec uses. 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 (default) takes "est_shared_r_s", or "est_shared_p_r_s" for the population data sources. 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. |
UseCatch
|
required | Binary array dimensioned like ObsCatch controlling which aggregated catch observations enter the likelihood and whether ln_F_devs is estimated in each cell. 0 excludes the observation, unless ObsCatch is NA there, in which case the deviation is still estimated. |
catch_units |
array("biom", dim = c(input_list$data$n_fish_fleets)) |
Character array [n_fish_fleets]: "biom" (default) or "abd", stored as 0/1. |
UseCatch_pop
|
array(0, dim =
c(input_listn_pop,
input_listn_regions,
length(input_listyears),
input_listn_seas,
input_listn_fish_fleets))
|
Binary array dimensioned like ObsCatch_pop. |
ObsCatch_pop
|
NULL
|
Observed population-specific catch array [n_pop x n_regions x n_years x n_seas x n_fish_fleets], in catch_units. |
Use_F_pen
|
1
|
Integer flag for the fishing mortality penalty on ln_F_devs. 1 (default) applies it. |
sigmaC_spec |
"fix" |
Sharing structure for ln_sigmaC, the aggregated catch observation error sd. "fix" (default) holds it at its starting value, log(0.01) unless supplied through ..., and warns when no starting value was given. Estimated options are "est_shared_<dims>" over any of "r" (regions), "y" (years), "seas" and "f" (fleets), e.g. "est_shared_r_y_seas_f", or "est_all" for one parameter per cell. |
sigmaC_pop_spec |
"fix" |
Sharing structure for ln_sigmaC_pop, as sigmaC_spec with an added population dim, e.g. "est_shared_pop_r" or "est_shared_pop_r_y_seas_f". |
sigmaF_spec |
"fix" |
Sharing structure for ln_sigmaF, the fishing mortality process error sd, following sigmaC_spec. "fix" (default) holds it at log(1) unless supplied through ..., and warns. |
Fdev_model |
"iid" |
Process error on ln_F_devs: "iid" (default), "rw" (the first catch-active year per region, season and fleet takes a diffuse N(0,5)), or "ar1" (that year is drawn from the stationary marginal, with Fdev_rho_spec setting the correlation). Catch-active years need not be contiguous under "rw" or "ar1": the transition across a gap of d closed years is taken over the elapsed gap, the same marginal as estimating the closed years and integrating them out. See Get_Fdev_PE_loglik. Warns under Use_F_pen = 0 (the penalty is never evaluated), sigmaF_spec = "fix", or, for "ar1", Fdev_rho_spec = "fix". |
Fdev_pen_center |
"fixed" |
Where the fishing mortality deviation penalty is centered. "fixed" (default) centers on zero, constraining the level and the spread. "own_mean" centers on the deviations' own mean, penalizing only their spread; the level is then already set by ln_F_mean, so it is not penalized twice, but the two are mutually unidentified unless one is fixed, which ln_F_mean_spec = "fix" does. |
Fdev_rho_spec |
"fix" |
Sharing structure for Fdev_rho, following sigmaF_spec. Only read under Fdev_model = "ar1" and mapped entirely to NA otherwise. |
ObsDiscard
|
NULL
|
Observed aggregated discard array [n_regions x n_years x n_seas x n_fish_fleets] in discard_units. Default NULL. |
UseDiscard
|
array(0, dim =
c(input_listn_regions,
length(input_listyears),
input_listn_seas,
input_listn_fish_fleets))
|
Binary array dimensioned like ObsDiscard. Default all zeros. |
discard_units |
array("biom_frac", dim = c(input_list$data$n_fish_fleets)) |
Character array [n_fish_fleets]: "abd" (0), "biom" (1), "abd_frac" (2) or "biom_frac" (3, default). |
UseDiscard_pop
|
array(0, dim =
c(input_listn_pop,
input_listn_regions,
length(input_listyears),
input_listn_seas,
input_listn_fish_fleets))
|
Binary array [n_pop x n_regions x n_years x n_seas x n_fish_fleets]. Default all zeros. |
ObsDiscard_pop
|
NULL
|
Observed population-specific discard array, same dims, in discard_units. Default NULL. |
Use_dmr_pen |
0 |
Integer flag for the penalty on logit_dmr_devs. Default 0. Must be 1 under dmr_dev_spec = "est_all" and 0 under "fix". |
sigmaD_spec |
"fix" |
Sharing structures for ln_sigmaD and ln_sigmaD_pop, the discard observation error sds, following sigmaC_spec and sigmaC_pop_spec. "fix" (default) holds them at log(0.01) and warns when no starting value was given. |
sigmaD_pop_spec |
"fix" |
Sharing structures for ln_sigmaD and ln_sigmaD_pop, the discard observation error sds, following sigmaC_spec and sigmaC_pop_spec. "fix" (default) holds them at log(0.01) and warns when no starting value was given. |
sigma_dmr_spec |
"fix" |
Sharing structure for ln_sigma_dmr, the discard mortality rate process error sd, following sigmaF_spec. "fix" (default) holds it at log(1) and warns. |
dmr_mean_spec |
"fix" |
Sharing structure for logit_dmr_mean. "fix" (default) holds it at 0, a rate of 0.5 on the natural scale. See do_dmr_mean_mapping. |
dmr_dev_spec |
"fix" |
Sharing structure for logit_dmr_devs. "fix" (default) holds the deviations at zero; "est_all" estimates one in every fished cell and requires Use_dmr_pen = 1. See do_dmr_dev_mapping. |
ln_F_mean_spec |
"est" |
"est" (default) or "fix", matched by exact name only because it sits after .... "fix" maps ln_F_mean off at its starting value, 0 unless supplied through ..., so the deviations hold all of log fishing mortality, F = exp(ln_F_devs). It must be paired with Fdev_pen_center = "own_mean", Fdev_model = "rw" or Use_F_pen = 0: an "iid" or "ar1" penalty centered on a fixed zero would shrink the deviations toward F = 1, so that combination is rejected at setup. |
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 | Log-scale standard errors of ObsFishIdx, same dims. |
sigmaFishIdx_spec |
"fix" |
The estimated component of the aggregated and population-specific fishery index observation error, one value per fleet. "fix" (default) uses the reported standard errors as they are. "est_additive" adds an estimated component to them, "est_quadrature" adds it in quadrature, and "est_replace" replaces them. An estimated component is confounded with a likelihood weight, since a weight on a normal likelihood is the same statement as dividing the variance, and Setup_Mod_Weighting warns when both are used. A fleet with a multivariate normal index takes its scale from the supplied covariance and cannot have one, which is an error. |
sigmaFishIdx_map
|
NULL
|
Optional integer vectors [n_fish_fleets] of estimation groups for ln_sigmaFishIdx and 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. |
sigmaFishIdx_pop_spec |
"fix" |
The estimated component of the aggregated and population-specific fishery index observation error, one value per fleet. "fix" (default) uses the reported standard errors as they are. "est_additive" adds an estimated component to them, "est_quadrature" adds it in quadrature, and "est_replace" replaces them. An estimated component is confounded with a likelihood weight, since a weight on a normal likelihood is the same statement as dividing the variance, and Setup_Mod_Weighting warns when both are used. A fleet with a multivariate normal index takes its scale from the supplied covariance and cannot have one, which is an error. |
sigmaFishIdx_pop_map
|
NULL
|
Optional integer vectors [n_fish_fleets] of estimation groups for ln_sigmaFishIdx and 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. |
ObsFishIdx_pop
|
NULL
|
Observed population-specific index array [n_pop × n_regions × n_years × n_seas × n_fish_fleets]. |
ObsFishIdx_pop_SE
|
NULL
|
Lognormal standard errors for ObsFishIdx_pop, same dims. |
UseFishIdx_pop
|
array(0, dim =
c(input_listn_pop,
input_listn_regions,
length(input_listyears),
input_listn_seas,
input_listn_fish_fleets))
|
Binary array dimensioned like ObsFishIdx_pop. Default all zeros. |
fish_idx_type |
required | Character vector [n_fish_fleets]: "biom", "abd", or "none". |
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] of 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, as t_srv does for surveys. Default 0; use 0.5 for a mid-season index. |
FishLenComps_sel |
rep("age", input_list$data$n_fish_fleets) |
Character vector [n_fish_fleets], whether length-based selectivity applies before or after the fish are spread over lengths. "age" (default) selects at age and spreads afterwards, so the length composition within an age is the key's. "length" spreads first and selects length by length, so the long fish of an age are taken more often. The key is the fleet's own at t_fish, and length-based fishery selectivity is required. The two give different expected compositions. |
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), rather than the population mean weight. With flat or age-based selectivity the two agree. |
UseFishIdx
|
required | Binary array dimensioned like ObsFishIdx, 1 to include the index in the likelihood. |
ObsFishAgeComps
|
required | Observed fishery age composition array [n_regions × n_years × n_seas × n_ages × n_sexes × n_fish_fleets], raw counts or proportions; supply ISS_FishAgeComps for proportions. |
UseFishAgeComps
|
required | Binary array [n_regions × n_years × n_seas × n_fish_fleets], 1 to fit the age compositions. |
ISS_FishAgeComps
|
NULL
|
Input sample size array [n_regions × n_years × n_seas × n_sexes × n_fish_fleets]. NULL (default) sums ObsFishAgeComps. |
ObsFishLenComps
|
required | Observed fishery length composition array [n_regions × n_years × n_seas × n_lens × n_sexes × n_fish_fleets]. Only needed when input_listfit_lengths == 1. |
UseFishLenComps
|
required | Binary array [n_regions × n_years × n_seas × n_fish_fleets], 1 to fit the length compositions. |
ISS_FishLenComps
|
NULL
|
Input sample size array [n_regions × n_years × n_seas × n_sexes × n_fish_fleets]. NULL (default) sums ObsFishLenComps. |
FishAgeComps_LikeType |
required | Character vector [n_fish_fleets]: "Multinomial", "Dirichlet-Multinomial", "iid-Logistic-Normal", "1d-Logistic-Normal", "2d-Logistic-Normal", the three -miss0 forms, which drop the empty bins and scale the standard deviation by the input sample size, or "none". |
FishLenComps_LikeType
|
required | As FishAgeComps_LikeType, for length compositions. |
FishAgeComps_Type |
required | Character vector of the composition structure per fleet and time period, each "<type>_Year_<start>-<end>_Fleet_<f>" with "terminal" allowed as the end year. Types are "agg" (aggregated across regions and sexes, not valid with "2d-Logistic-Normal"), "spltRspltS" (split by region and sex), "spltRjntS" (split by region, joint across sexes) and "none". For example c("spltRjntS_Year_1-10_Fleet_1", "agg_Year_11-terminal_Fleet_1"). |
FishLenComps_Type
|
required | As FishAgeComps_Type, for length compositions. |
ObsFishAgeComps_pop
|
NULL
|
Observed population-specific age composition array [n_pop × n_regions × n_years × n_seas × n_ages × n_sexes × n_fish_fleets]. Required when any 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 array [n_pop × n_regions × n_years × n_seas × n_fish_fleets]. Default all zeros. |
ISS_FishAgeComps_pop
|
NULL
|
Input sample size array [n_pop × n_regions × n_years × n_seas × n_sexes × n_fish_fleets]. NULL (default) sums ObsFishAgeComps_pop. |
ObsFishLenComps_pop
|
NULL
|
Observed population-specific length composition array [n_pop × n_regions × n_years × n_seas × n_lens × n_sexes × n_fish_fleets]. Required when fit_lengths == 1 and any 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 array [n_pop × n_regions × n_years × n_seas × n_fish_fleets]. Default all zeros. |
ISS_FishLenComps_pop
|
NULL
|
Input sample size array [n_pop × n_regions × n_years × n_seas × n_sexes × n_fish_fleets]. NULL (default) sums ObsFishLenComps_pop. |
FishAgeComps_pop_LikeType |
rep("none", input_list$data$n_fish_fleets) |
Character vectors [n_fish_fleets] for the population-specific compositions, with the same options as FishAgeComps_LikeType. Default "none". |
FishLenComps_pop_LikeType |
rep("none", input_list$data$n_fish_fleets) |
Character vectors [n_fish_fleets] for the population-specific compositions, with the same options as FishAgeComps_LikeType. Default "none". |
FishAgeComps_pop_Type |
paste("none_Year_1-terminal_Fleet_", 1:input_list$data$n_fish_fleets, sep = "") |
Composition structure for the population-specific compositions, in the same format as FishAgeComps_Type. Default "none" for every fleet and year. |
FishLenComps_pop_Type |
paste("none_Year_1-terminal_Fleet_", 1:input_list$data$n_fish_fleets, sep = "") |
Composition structure for the population-specific compositions, in the same format as FishAgeComps_Type. Default "none" for every fleet and year. |
fish_idx_ages
|
NULL
|
Which ages contribute to each fleet’s index total, either a list with one element per fleet (a vector of ages, or NULL for all) or an [n_ages x n_fish_fleets] array of 0/1 weights. NULL (default) uses every age. The compositions are unaffected. |
FishAgeComps_bins
|
NULL
|
Which age bins each fleet’s age composition is fitted over, either a list with one element per fleet (bin indices, or NULL for all) or an [n_obs_ages x n_fish_fleets] array of 0/1 weights. Observed and expected are both restricted to the named bins and renormalized within them, so excluded bins leave the likelihood rather than being forced to be explained. Indices are observed bins, after any ageing error. For sex-joint comps the named bins are dropped from each sex’s block, so the sex ratio becomes the ratio within the fitted bins. Every fleet must keep at least two bins. Default NULL, all bins. |
FishLenComps_bins
|
NULL
|
Which length bins each fleet’s length composition is fitted over, as FishAgeComps_bins. Indices are observed length bins, after any LenBinMap. |
Fish_caal_bins
|
NULL
|
Which age bins each fleet’s CAAL data are fitted over, as FishAgeComps_bins, applied to every length bin’s row of ages alike. |
FishAgeComps_pop_bins
|
NULL
|
Which bins each fleet’s population-specific age and length compositions are fitted over, as FishAgeComps_bins. |
FishLenComps_pop_bins
|
NULL
|
Which bins each fleet’s population-specific age and length compositions are fitted over, as FishAgeComps_bins. |
FishIdx_LikeType |
rep("lognormal", input_list$data$n_fish_fleets) |
Character vector [n_fish_fleets] of each index's error structure: "lognormal" (default, standard errors on the log scale), "normal" (arithmetic scale), or "mvn" (multivariate normal on the arithmetic scale with a fixed covariance from FishIdx_Cov). One-step-ahead residuals are available for lognormal fleets only. A fleet's population-specific index follows the same choice for the first two and stays lognormal under "mvn", whose covariance describes the regional series alone. |
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" (default) fits the observation against the prediction for the season it sits in; "aggSeas" sums the prediction over the year's seasons and fits one observation. Under "aggSeas" the observation stays in the season it was placed in, exactly one season per region and year may be on in the matching Use array, and the likelihood lands in that season. An index measured at a point in time belongs in its own season. |
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" (default) fits the observation against the prediction for the season it sits in; "aggSeas" sums the prediction over the year's seasons and fits one observation. Under "aggSeas" the observation stays in the season it was placed in, exactly one season per region and year may be on in the matching Use array, and the likelihood lands in that season. An index measured at a point in time belongs in its own season. |
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" (default) fits the observation against the prediction for the season it sits in; "aggSeas" sums the prediction over the year's seasons and fits one observation. Under "aggSeas" the observation stays in the season it was placed in, exactly one season per region and year may be on in the matching Use array, and the likelihood lands in that season. An index measured at a point in time belongs in its own season. |
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" (default) fits the observation against the prediction for the season it sits in; "aggSeas" sums the prediction over the year's seasons and fits one observation. Under "aggSeas" the observation stays in the season it was placed in, exactly one season per region and year may be on in the matching Use array, and the likelihood lands in that season. An index measured at a point in time belongs in its own season. |
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" (default) fits the observation against the prediction for the season it sits in; "aggSeas" sums the prediction over the year's seasons and fits one observation. Under "aggSeas" the observation stays in the season it was placed in, exactly one season per region and year may be on in the matching Use array, and the likelihood lands in that season. An index measured at a point in time belongs in its own season. |
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" (default) fits the observation against the prediction for the season it sits in; "aggSeas" sums the prediction over the year's seasons and fits one observation. Under "aggSeas" the observation stays in the season it was placed in, exactly one season per region and year may be on in the matching Use array, and the likelihood lands in that season. An index measured at a point in time belongs in its own season. |
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" (default) fits the observation against the prediction for the season it sits in; "aggSeas" sums the prediction over the year's seasons and fits one observation. Under "aggSeas" the observation stays in the season it was placed in, exactly one season per region and year may be on in the matching Use array, and the likelihood lands in that season. An index measured at a point in time belongs in its own season. |
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" (default) fits the observation against the prediction for the season it sits in; "aggSeas" sums the prediction over the year's seasons and fits one observation. Under "aggSeas" the observation stays in the season it was placed in, exactly one season per region and year may be on in the matching Use array, and the likelihood lands in that season. An index measured at a point in time belongs in its own season. |
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" (default) fits the observation against the prediction for the season it sits in; "aggSeas" sums the prediction over the year's seasons and fits one observation. Under "aggSeas" the observation stays in the season it was placed in, exactly one season per region and year may be on in the matching Use array, and the likelihood lands in that season. An index measured at a point in time belongs in its own season. |
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" (default) fits the observation against the prediction for the season it sits in; "aggSeas" sums the prediction over the year's seasons and fits one observation. Under "aggSeas" the observation stays in the season it was placed in, exactly one season per region and year may be on in the matching Use array, and the likelihood lands in that season. An index measured at a point in time belongs in its own season. |
FishIdx_Cov |
NULL |
List with one element per fleet holding the fixed covariance for "mvn" fleets and NULL otherwise. Each matrix is square with one row per observation the fleet fits, ordered as they 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]. An observation is the age composition of the fish aged from one length bin, so the age dim of each length row is what is fit. NULL (default) for 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 take 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 [n_fish_fleets]: "none", "Multinomial" or "Dirichlet-Multinomial". The logistic-normal families are not available for CAAL, since a length bin's age sample is small and mostly zeros. |
Fish_caal_Type |
paste("none_Year_1-terminal_Fleet_", 1:input_list$data$n_fish_fleets, sep = "") |
Composition type, in the same "CompType_Year_x-y_Fleet_z" vocabulary 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 discard age composition [n_regions × n_years × n_seas × n_ages × n_sexes × n_fish_fleets], structured as ObsFishAgeComps. |
UseFishAgeComps_discard
|
array(0, dim =
c(input_listn_regions,
length(input_listyears),
input_listn_seas,
input_listn_fish_fleets))
|
Binary array [n_regions × n_years × n_seas × n_fish_fleets]. |
ISS_FishAgeComps_discard
|
NULL
|
Input sample size array [n_regions × n_years × n_seas × n_sexes × n_fish_fleets]. NULL sums ObsFishAgeComps_discard. |
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 discard length composition [n_regions × n_years × n_seas × n_lens × n_sexes × n_fish_fleets]. Required when fit_lengths == 1. |
UseFishLenComps_discard
|
array(0, dim =
c(input_listn_regions,
length(input_listyears),
input_listn_seas,
input_listn_fish_fleets))
|
Binary array [n_regions × n_years × n_seas × n_fish_fleets]. |
ISS_FishLenComps_discard
|
NULL
|
Input sample size array [n_regions × n_years × n_seas × n_sexes × n_fish_fleets]. NULL sums ObsFishLenComps_discard. |
FishAgeComps_discard_LikeType |
rep("none", input_list$data$n_fish_fleets) |
Character vectors [n_fish_fleets] for the discard compositions, with the same options as FishAgeComps_LikeType. |
FishLenComps_discard_LikeType |
rep("none", input_list$data$n_fish_fleets) |
Character vectors [n_fish_fleets] for the discard compositions, with the same options as FishAgeComps_LikeType. |
FishAgeComps_discard_Type |
paste("none_Year_1-terminal_Fleet_", 1:input_list$data$n_fish_fleets, sep = "") |
Composition structure for the discard compositions, in the same format as FishAgeComps_Type. |
FishLenComps_discard_Type |
paste("none_Year_1-terminal_Fleet_", 1:input_list$data$n_fish_fleets, sep = "") |
Composition structure for the discard compositions, in the same format as FishAgeComps_Type. |
ObsFishAgeComps_discard_pop
|
NULL
|
Observed population-specific discard age composition [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 array [n_pop × n_regions × n_years × n_seas × n_fish_fleets]. |
ISS_FishAgeComps_discard_pop
|
NULL
|
Input sample size array [n_pop × n_regions × n_years × n_seas × n_sexes × n_fish_fleets]. NULL sums ObsFishAgeComps_discard_pop. |
ObsFishLenComps_discard_pop
|
NULL
|
Observed population-specific discard length composition [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 array [n_pop × n_regions × n_years × n_seas × n_fish_fleets]. |
ISS_FishLenComps_discard_pop
|
NULL
|
Input sample size array [n_pop × n_regions × n_years × n_seas × n_sexes × n_fish_fleets]. NULL sums ObsFishLenComps_discard_pop. |
FishAgeComps_discard_pop_LikeType |
rep("none", input_list$data$n_fish_fleets) |
Character vectors [n_fish_fleets] for the population-specific discard compositions, with the same options as FishAgeComps_LikeType. |
FishLenComps_discard_pop_LikeType |
rep("none", input_list$data$n_fish_fleets) |
Character vectors [n_fish_fleets] for the population-specific discard compositions, with the same options as FishAgeComps_LikeType. |
FishAgeComps_discard_pop_Type |
paste("none_Year_1-terminal_Fleet_", 1:input_list$data$n_fish_fleets, sep = "") |
Composition structure for the population-specific discard compositions, in the same format as FishAgeComps_Type. |
FishLenComps_discard_pop_Type |
paste("none_Year_1-terminal_Fleet_", 1:input_list$data$n_fish_fleets, sep = "") |
Composition structure for the population-specific discard compositions, in the same format as FishAgeComps_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 dims. |
UseSrvIdx
|
required | Binary array dimensioned like ObsSrvIdx, 1 to include the index in the likelihood. |
ObsSrvIdxAA
|
NULL
|
Observed survey index at age [n_regions, n_years, n_seas, n_obs_ages, n_sexes, n_srv_fleets], the ages being the columns of the fleet’s ageing error matrix, through which the predicted index at each model age is read before it is compared. 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. |
ObsSrvIdxAA_pop
|
NULL
|
Population-specific counterparts, with a leading population dim. |
UseSrvIdxAA_pop
|
NULL
|
Population-specific counterparts, with a leading population dim. |
ObsSrvIdxAA_pop_SE
|
NULL
|
Reported standard errors shaped like their observation array, read only when SrvIdxAA_sigma_form asks for them. |
sigmaSrvIdxAA_key |
NULL |
Integer arrays [n_obs_ages, n_sexes, n_srv_fleets] coupling the index at age observation error, the key matrix 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. See Setup_Mod_Srvsel_and_Q. |
sigmaSrvIdxAA_spec |
"est" |
"est" (default) or "fix". |
sigmaSrvIdxAA_pop_key |
NULL |
Integer arrays [n_obs_ages, n_sexes, n_srv_fleets] coupling the index at age observation error, the key matrix 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. 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. NULL (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. NULL (default) gives one per fleet. See Setup_Mod_Catch_and_F. |
sigmaSrvIdx_spec |
"fix" |
The estimated component of the aggregated and population-specific survey index observation error, one value per fleet. "fix" (default) uses the reported standard errors as they are. "est_additive" adds an estimated component to them, "est_quadrature" adds it in quadrature, and "est_replace" replaces them, 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, and Setup_Mod_Weighting warns when both are used. A fleet with a multivariate normal index takes its scale from the supplied covariance and cannot have one, which is an error. |
sigmaSrvIdx_map
|
NULL
|
Optional integer vectors [n_srv_fleets] of estimation groups for ln_sigmaSrvIdx and 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. |
sigmaSrvIdx_pop_spec |
"fix" |
The estimated component of the aggregated and population-specific survey index observation error, one value per fleet. "fix" (default) uses the reported standard errors as they are. "est_additive" adds an estimated component to them, "est_quadrature" adds it in quadrature, and "est_replace" replaces them, 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, and Setup_Mod_Weighting warns when both are used. A fleet with a multivariate normal index takes its scale from the supplied covariance and cannot have one, which is an error. |
sigmaSrvIdx_pop_map
|
NULL
|
Optional integer vectors [n_srv_fleets] of estimation groups for ln_sigmaSrvIdx and 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. |
ObsSrvIdx_pop
|
NULL
|
Observed population-specific index array [n_pop × n_regions × n_years × n_seas × n_srv_fleets]. |
ObsSrvIdx_pop_SE
|
NULL
|
Lognormal standard errors for ObsSrvIdx_pop, same dims. |
UseSrvIdx_pop
|
array(0, dim =
c(input_listn_pop,
input_listn_regions,
length(input_listyears),
input_listn_seas,
input_listn_srv_fleets))
|
Binary array dimensioned like ObsSrvIdx_pop. Default all zeros. |
srv_idx_type |
required | Character vector [n_srv_fleets]: "biom", "abd" or "none", stored as 1, 0 and 999. |
ObsSrvAgeComps
|
required | Observed survey age compositions [n_regions × n_years × n_seas × n_ages × n_sexes × n_srv_fleets], counts or proportions on a comparable scale. |
UseSrvAgeComps
|
required | Binary array [n_regions × n_years × n_seas × n_srv_fleets], 1 to fit the age compositions. |
ObsSrvLenComps
|
required | Observed survey length compositions [n_regions × n_years × n_seas × n_lens × n_sexes × n_srv_fleets]. Only validated when fit_lengths = 1. |
UseSrvLenComps
|
required | Binary array [n_regions × n_years × n_seas × n_srv_fleets], 1 to fit the length compositions. |
ISS_SrvAgeComps
|
NULL
|
Input sample sizes [n_regions × n_years × n_seas × n_sexes × n_srv_fleets]. NULL sums ObsSrvAgeComps over ages. |
ISS_SrvLenComps
|
NULL
|
Input sample sizes, structured as ISS_SrvAgeComps. NULL sums ObsSrvLenComps. |
SrvAgeComps_LikeType |
required | Character vector [n_srv_fleets]: "none", "Multinomial", "Dirichlet-Multinomial", the three logistic-normal forms or their three -miss0 counterparts, stored as 999 and 0-7. The miss0 forms drop the empty bins and renormalize the expected proportions over the bins that remain, rather than adding addtocomp to the zeros. 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. The 2d form needs a composition joint across sexes. One-step-ahead residuals are not available for any of the three. |
SrvLenComps_LikeType
|
required | As SrvAgeComps_LikeType, for length compositions. |
SrvAgeComps_Type |
required | Character vector of the composition structure per fleet and year range, each "<type>_Year_<start>-<end>_Fleet_<fleet>" with "terminal" allowed as the end year. Types are "agg" (aggregated across regions and sexes, not valid with "2d-Logistic-Normal"), "spltRspltS", "spltRjntS" and "none". Parsed into an [n_years × n_srv_fleets] integer matrix; a cell left NA means an incomplete year range and is an error. |
SrvLenComps_Type
|
required | As SrvAgeComps_Type, for length compositions. |
ObsSrvAgeComps_pop
|
NULL
|
Observed population-specific age composition array [n_pop × n_regions × n_years × n_seas × n_ages × n_sexes × n_srv_fleets]. Required when any UseSrvAgeComps_pop is 1. |
UseSrvAgeComps_pop
|
array(0, dim =
c(input_listn_pop,
input_listn_regions,
length(input_listyears),
input_listn_seas,
input_listn_srv_fleets))
|
Binary array [n_pop × n_regions × n_years × n_seas × n_srv_fleets]. Default all zeros. |
ISS_SrvAgeComps_pop
|
NULL
|
Input sample size array [n_pop × n_regions × n_years × n_seas × n_sexes × n_srv_fleets]. NULL (default) sums ObsSrvAgeComps_pop. |
ObsSrvLenComps_pop
|
NULL
|
Observed population-specific length composition array [n_pop × n_regions × n_years × n_seas × n_lens × n_sexes × n_srv_fleets]. Required when fit_lengths == 1 and any UseSrvLenComps_pop is 1. |
UseSrvLenComps_pop
|
array(0, dim =
c(input_listn_pop,
input_listn_regions,
length(input_listyears),
input_listn_seas,
input_listn_srv_fleets))
|
Binary array [n_pop × n_regions × n_years × n_seas × n_srv_fleets]. Default all zeros. |
ISS_SrvLenComps_pop
|
NULL
|
Input sample size array [n_pop × n_regions × n_years × n_seas × n_sexes × n_srv_fleets]. NULL (default) sums ObsSrvLenComps_pop. |
SrvAgeComps_pop_LikeType |
rep("none", input_list$data$n_srv_fleets) |
Character vectors [n_srv_fleets] for the population-specific compositions, with the same options as SrvAgeComps_LikeType. Default "none". |
SrvLenComps_pop_LikeType |
rep("none", input_list$data$n_srv_fleets) |
Character vectors [n_srv_fleets] for the population-specific compositions, with the same options as SrvAgeComps_LikeType. Default "none". |
SrvAgeComps_pop_Type |
paste("none_Year_1-terminal_Fleet_", 1:input_list$data$n_srv_fleets, sep = "") |
Composition structure for the population-specific compositions, in the same format as SrvAgeComps_Type. Default "none" for every fleet and year. |
SrvLenComps_pop_Type |
paste("none_Year_1-terminal_Fleet_", 1:input_list$data$n_srv_fleets, sep = "") |
Composition structure for the population-specific compositions, in the same format as SrvAgeComps_Type. Default "none" for every fleet and year. |
srv_idx_ages
|
NULL
|
Which ages contribute to each fleet’s index total, either a list with one element per fleet (a vector of ages, or NULL for all) or an [n_ages x n_srv_fleets] array of 0/1 weights. NULL (default) uses every age. Restricting a fleet to one age makes it an index of that age alone, which is how an age-1 acoustic index is specified; the compositions are unaffected, since the restriction applies to the index sum. |
SrvAgeComps_bins
|
NULL
|
Which age bins each fleet’s age composition is fitted over, either a list with one element per fleet (bin indices, or NULL for all) or an [n_obs_ages x n_srv_fleets] array of 0/1 weights. Observed and expected are both restricted to the named bins and renormalized within them, so excluded bins leave the likelihood rather than being forced to be explained. Indices are observed bins, after any ageing error. For sex-joint comps the named bins are dropped from each sex’s block, so the sex ratio becomes the ratio within the fitted bins. Every fleet must keep at least two bins. Default NULL, all bins. |
SrvLenComps_bins
|
NULL
|
Which length bins each fleet’s length composition is fitted over, as SrvAgeComps_bins. Indices are observed length bins, after any LenBinMap. |
Srv_caal_bins
|
NULL
|
Which age bins each fleet’s CAAL data are fitted over, as SrvAgeComps_bins, applied to every length bin’s row of ages alike. |
SrvAgeComps_pop_bins
|
NULL
|
Which bins each fleet’s population-specific age and length compositions are fitted over, as SrvAgeComps_bins. |
SrvLenComps_pop_bins
|
NULL
|
Which bins each fleet’s population-specific age and length compositions are fitted over, as SrvAgeComps_bins. |
SrvIdx_LikeType |
rep("lognormal", input_list$data$n_srv_fleets) |
Character vector [n_srv_fleets] of each index's error structure: "lognormal" (default, standard errors on the log scale), "normal" (arithmetic scale), or "mvn" (multivariate normal on the arithmetic scale with a fixed covariance from SrvIdx_Cov). One-step-ahead residuals are available for lognormal fleets only. A fleet's population-specific index follows the same choice for the first two and stays lognormal under "mvn", whose covariance describes the regional series alone. |
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" (default) fits the observation against the prediction for the season it sits in; "aggSeas" sums the prediction over the year's seasons and fits one observation. Under "aggSeas" the observation stays in the season it was placed in, exactly one season per region and year may be on in the matching Use array, and the likelihood lands in that season. A survey measured at a point in time belongs in its own season with its own timing. |
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" (default) fits the observation against the prediction for the season it sits in; "aggSeas" sums the prediction over the year's seasons and fits one observation. Under "aggSeas" the observation stays in the season it was placed in, exactly one season per region and year may be on in the matching Use array, and the likelihood lands in that season. A survey measured at a point in time belongs in its own season with its own timing. |
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" (default) fits the observation against the prediction for the season it sits in; "aggSeas" sums the prediction over the year's seasons and fits one observation. Under "aggSeas" the observation stays in the season it was placed in, exactly one season per region and year may be on in the matching Use array, and the likelihood lands in that season. A survey measured at a point in time belongs in its own season with its own timing. |
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" (default) fits the observation against the prediction for the season it sits in; "aggSeas" sums the prediction over the year's seasons and fits one observation. Under "aggSeas" the observation stays in the season it was placed in, exactly one season per region and year may be on in the matching Use array, and the likelihood lands in that season. A survey measured at a point in time belongs in its own season with its own timing. |
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" (default) fits the observation against the prediction for the season it sits in; "aggSeas" sums the prediction over the year's seasons and fits one observation. Under "aggSeas" the observation stays in the season it was placed in, exactly one season per region and year may be on in the matching Use array, and the likelihood lands in that season. A survey measured at a point in time belongs in its own season with its own timing. |
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" (default) fits the observation against the prediction for the season it sits in; "aggSeas" sums the prediction over the year's seasons and fits one observation. Under "aggSeas" the observation stays in the season it was placed in, exactly one season per region and year may be on in the matching Use array, and the likelihood lands in that season. A survey measured at a point in time belongs in its own season with its own timing. |
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" (default) fits the observation against the prediction for the season it sits in; "aggSeas" sums the prediction over the year's seasons and fits one observation. Under "aggSeas" the observation stays in the season it was placed in, exactly one season per region and year may be on in the matching Use array, and the likelihood lands in that season. A survey measured at a point in time belongs in its own season with its own timing. |
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" (default) fits the observation against the prediction for the season it sits in; "aggSeas" sums the prediction over the year's seasons and fits one observation. Under "aggSeas" the observation stays in the season it was placed in, exactly one season per region and year may be on in the matching Use array, and the likelihood lands in that season. A survey measured at a point in time belongs in its own season with its own timing. |
SrvLenComps_sel |
rep("age", input_list$data$n_srv_fleets) |
Character vector [n_srv_fleets], whether length-based selectivity applies before or after the fish are spread over lengths. "age" (default) selects the index at age and spreads it afterwards; "length" spreads first and selects 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, and length-based survey selectivity is required. |
srv_waa_selected
|
rep(0,
input_listn_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, _l P(l a) s(l) w(l) / _l P(l a) s(l), rather than the population mean weight. The survey twin of fish_waa_selected, and only read for an index in weight. |
SrvIdx_Cov |
NULL |
List with one element per fleet holding the fixed covariance for "mvn" fleets and NULL otherwise. Each matrix is square with one row per observation the fleet fits, ordered as they appear when scanning that fleet's UseSrvIdx slice in array order. |
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]. An observation is the age composition of the fish aged from one length bin, so the age dim of each length row is what is fit. NULL (default) for no CAAL data. |
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 take a zero and are skipped. |
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. |
Srv_caal_LikeType |
rep("none", input_list$data$n_srv_fleets) |
Character vector [n_srv_fleets]: "none", "Multinomial" or "Dirichlet-Multinomial". The logistic-normal families are not available for CAAL, since a length bin's age sample is small and mostly zeros. |
Srv_caal_Type |
paste("none_Year_1-terminal_Fleet_", 1:input_list$data$n_srv_fleets, sep = "") |
Composition type, in the same "CompType_Year_x-y_Fleet_z" vocabulary as the marginal compositions. |
Setup_Mod_Fishsel_and_Q
53 arguments
| Argument | Default | Description |
|---|---|---|
cont_tv_fish_sel |
paste("none_Fleet_", 1:input_list$data$n_fish_fleets, sep = "") |
Character vector [n_fish_fleets] of continuous time variation per fleet, each "<type>_Fleet_<f>": "none" (default), "iid" or "rw" on the selectivity parameters, or "3dmarg", "3dcond" (3D GMRF on the marginal or conditional variance) and "2dar1" (separable over bin and year). Any fleet other than "none" also needs fishsel_pe_pars_spec and fish_sel_devs_spec. |
fish_sel_blocks |
paste("none_Fleet_", 1:input_list$data$n_fish_fleets, sep = "") |
Character vector of discrete selectivity time blocks per fleet, each "Block_<b>_Year_<s>-<e>_Fleet_<f>" with "terminal" allowed as the end year, or "none_Fleet_<f>" (default) for one constant block. Blocks must not overlap and together must span every model year for that fleet. Mutually exclusive with cont_tv_fish_sel != "none". |
fish_sel_model |
required | Character vector of the selectivity form per fleet, and optionally per block: "<model>_Fleet_<f>" or "<model>_Fleet_<f>_Block_<b>". The forms are "logist1" (a_{50} and slope), "logist2" (a_{50} and a_{95}), "gamma" (dome, a_{max} and \delta), "exponential" (one power), "dbnrml" (double normal, six parameters), "asymplogist1" and "asymplogist2" (the two logistics with an asymptote), the three non-parametric forms and "bicubic". "nonpar" is on the logit scale, mean-standardized jointly over years and bins so the grand mean of the surface is one. "nonparlog" is on the log scale, standardized so each year averages to one over *_sel_norm_bins, leaving only within-year contrasts identified. "nonparfree" is 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, where a free catchability per age and a selectivity estimated at age are one quantity written twice, so no catchability is set. Pin one bin, by leaving it out of the estimated bins, whenever the mean it multiplies is also free. "bicubic" is a spline over a bin-node by year-node grid, written "bicubic_Bin_<n_bin_nodes>_Yr_<n_yr_nodes>_Fleet_x" with an optional _Block_k. One form covers a smooth bin by year surface (n_yr_nodes > 1), a time-invariant bin-only spline (n_yr_nodes == 1), and a bin-only spline re-fit per block. An optional _SelStyr_<year> restricts the fit to SelStyr:block-end, holding earlier years of the block at the SelStyr curve, and an optional _NSelBins_<n> restricts it to the first n bins, holding the rest at the last fitted bin. See Get_Selex and the model equations vignette. |
Use_fish_q_prior
|
0
|
Integer flag, 1 for lognormal priors on catchability. Default 0. |
fish_q_prior
|
NA
|
Data frame with columns region, fleet, block, mu on the natural scale and sd on the log scale, one row per ((), ) prior. Read when Use_fish_q_prior = 1. |
fish_q_blocks |
paste("none_Fleet_", 1:input_list$data$n_fish_fleets, sep = "") |
Catchability time blocks per fleet, in the same format as fish_sel_blocks. Default one constant block. |
fish_q_type |
rep("est", input_list$data$n_fish_fleets) |
Character vector [n_fish_fleets] of how catchability is obtained. "est" (default) estimates ln_fish_q, "arith" concentrates it out 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 the years with observations only and fix that fleet's ln_fish_q whatever fish_q_spec says. The solve runs within each fish_q_blocks block, so a blocked catchability gets one solved value per block. |
fish_q_model |
NULL |
Character vector [n_fish_fleets] of the process error on annual catchability deviations: "none" (default), "iid", "rw", "ar1" or "dsem", which passes the series to Setup_Mod_DSEM. Catchability is then \exp(\ln q_{r,b,f} + \epsilon_{r,y,f}). A fleet with deviations cannot also have fish_q_blocks or an analytically solved fish_q_type. |
sigma_fish_q_spec |
"est_all" |
Sharing string for the deviation standard deviation over region and fleet: "est_all" (default), "est_shared_r", "est_shared_f", "est_shared_r_f" or "fix". |
fish_q_rho_spec |
"est_all" |
Sharing string for the AR1 correlation, with the same options as sigma_fish_q_spec. Default "est_all". Only read under fish_q_model = "ar1". |
fish_q_rw_init_sigma
|
NA
|
Standard deviation of the first estimated year of a random walk. NA (default) starts the walk at zero under its own sigma, which keeps ln_fish_q as the level of the series. |
fish_q_re_years |
NULL |
List [n_fish_fleets], each element the model years (as indices into data$years, not calendar years) that fleet's catchability deviations are estimated over, or NULL for every year. NULL (default) gives every fleet every year. Projection years are always estimated regardless. A year left out of a fleet's vector holds that fleet's deviation fixed at zero, which a random walk or ar1 then steps through like any other fixed cell, except at that fleet's first estimated year: there a random walk gets the diffuse fish_q_rw_init_sigma start and an ar1 its stationary marginal sd, the same treatment year one gets when nothing is fixed ahead of it. Read only for a fleet whose fish_q_model is not "none". |
fishsel_pe_pars_spec
|
NULL
|
Character vector [n_fish_fleets] of the estimation structure for the selectivity process error hyperparameters, required when any fleet varies continuously. See do_sel_pe_pars_mapping. Deviations shared over regions or fleets in fish_sel_devs_spec share these the same way, whatever this says, since one series has one variance. |
fish_fixed_sel_pars_spec |
NULL |
Character vector [n_fish_fleets] of how the fixed-effect selectivity parameters are estimated: "est_all", "est_shared_r", "est_shared_s", "est_shared_r_s", "est_shared_f_x" or "fix". See do_fixed_sel_pars_mapping. |
fish_q_spec |
NULL |
Character vector [n_fish_fleets] of the catchability estimation structure: "est_all", "est_shared_r" or "fix". See do_q_mapping. |
fish_sel_devs_spec
|
NULL
|
Character vector [n_fish_fleets] of the estimation structure for the annual selectivity deviations, required when any fleet varies continuously. See do_sel_devs_mapping. |
corr_opt_semipar |
NULL |
Character vector [n_fish_fleets] of which correlation components to suppress under 3D GMRF or 2D AR1 time variation. NA (default) suppresses none, and the cohort options are invalid for "2dar1". See do_sel_pe_pars_mapping. |
Use_fish_selex_prior
|
0
|
Integer flag, 1 for priors on the selectivity parameters. Default 0. |
fish_selex_prior |
NULL |
Data frame with columns region, fleet, block, sex, par, mu, sd and an optional type. "par" (the default) 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 at one bin, both on the natural scale, where par names the bin and the value is read at the first model year of block; that is the ADMB convention of pinning selectivity at a reference age near one, which no set of independent parameter priors can express. Read when Use_fish_selex_prior = 1. |
Use_fish_selex_penalty
|
0
|
Integer (0/1). Whether a centering penalty is applied to sets of fishery selectivity fixed-effect parameters. Default 0. |
fish_sel_norm_bins |
NULL |
List with one element per fleet naming the bins the mean-one standardization averages over, or NULL for fleets standardizing over every bin. Read under "nonparlog" 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. |
fish_sel_bin_dev_bins
|
NULL
|
List with one element per fleet naming the bins that fleet overrides, or NULL for none, e.g. list(1, NULL). An overridden bin takes a freely estimated annual value (_{y,b}) in place of what the functional form produced, applied after every other transformation including standardization, while the rest of the curve keeps its parametric shape. Default NULL. |
fishsel_pe_wt
|
rep(1,
input_listn_fish_fleets)
|
Numeric vector [n_fish_fleets] multiplying the fishery selectivity process error likelihood. Default 1. 0 skips that fleet’s process error, so the deviations stay estimated but enter the objective only through the data and any smoothness or centering penalties. Values other than 0 or 1 make an estimated process error sigma reinterpretable. Applies to ln_fishsel_devs only; the bin-override deviations have their own process error. |
fishsel_rw_init_sigma |
rep(5, input_list$data$n_fish_fleets) |
Numeric vector [n_fish_fleets] giving the standard deviation of 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, which suits a base curve that already describes the first year well. |
fishsel_dont_est_dev_first
|
rep(0,
input_listn_fish_fleets)
|
Integer vector [n_fish_fleets] of 0/1, default 0. Where 1, that fleet’s deviations start in year two and the fixed parameters hold year one. A non-parametric form has one free base parameter per bin, so year one’s deviation is that same value written twice with only fishsel_rw_init_sigma between them, a prior on a level usually meant to be free. 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. |
cont_tv_fishsel_bin_devs |
rep("none", input_list$data$n_fish_fleets) |
Character vector [n_fish_fleets] of the process error on the bin-override deviations: "none" (default), "iid" or "rw". A walk has its own estimated sigma per bin. |
fish_selex_penalty
|
NULL
|
Data frame of centering penalties with columns region, fleet, block, sex, par and wt, required when Use_fish_selex_penalty = 1. Each row penalizes wt * (log(mean(exp(pars))))^2 over the parameters named in par, a single index or a list column of integer vectors. This pins the scalar of a non-parametric curve that catchability or fishing mortality would otherwise absorb, and is softer than fixing a bin. Meant for parameter sets on the log scale. Default NULL. |
fishsel_devs_shared_bins |
NULL |
List of integer vectors grouping the bins that share one deviation series, e.g. list(1:5, 6:10, 11:30). Only read when fish_sel_devs_spec names an "est_shared_b" variant. |
fish_selex_type |
"age" |
Character scalar, "age" or "length", the bin dim every fishery selectivity function is defined over. |
use_fixed_fish_sel
|
rep(0,
input_listn_fish_fleets)
|
Integer vector [n_fish_fleets], 1 to fix fishery selectivity and 0 to estimate it. |
fish_sel_input
|
NULL
|
Array of fixed fishery selectivity values [n_pop × n_regions × n_years × n_seas × n_bins × n_sexes × n_fish_fleets]. Required when any use_fixed_fish_sel == 1. |
fish_sel_nonpar_est_bins
|
NULL
|
Optional bin groupings for non-parametric fishery selectivity, structured [[fleet]][[block]], each element a list of integer vectors naming the bins that share one estimated parameter. Indices are on the bin dim fish_selex_type names. |
fish_sel_sex_offset |
rep("none", input_list$data$n_fish_fleets) |
Character vector [n_fish_fleets] linking the sexes of a fleet's selectivity when n_sexes > 1. "none" (default) keeps each sex's stored parameters its own. "par" makes every sex beyond the first hold additive offsets on the first sex's stored parameters, so a log-scale parameter's natural value is the first sex's times e^{\delta}; offsets fixed at zero reproduce sex-shared parameters. "scale" keeps each sex's own parameters and adds a constant log-scale offset on the whole realized curve, exp(ln_fishsel_sex_scale), per region, block and sex, which may exceed one and is refused for the non-parametric forms and semi-parametric time variation, whose standardization would cancel it. "apical" has the double normal build its limbs up to exp(ln_*sel_sex_scale) rather than one, so the offset moves the middle of the curve and leaves its ends where that sex's own parameters put them. "par_apical" and "par_scale" combine a par offset with each. |
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 a raw Gaussian instead of anchoring it to p5 at the first bin, column two does the same for the descending limb and p6. |
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. Bins below it take the squared ratio of their bin to it times the selectivity there, which is Stock Synthesis’s convention when the compositions start above the population’s first length bin. |
cont_tv_ret_sel |
paste("none_Fleet_", 1:input_list$data$n_fish_fleets, sep = "") |
Continuous time variation on retention, with the options and requirements of cont_tv_fish_sel. Any fleet other than "none" also needs retsel_pe_pars_spec and ret_sel_devs_spec. |
ret_sel_blocks |
paste("none_Fleet_", 1:input_list$data$n_fish_fleets, sep = "") |
Discrete retention time blocks per fleet, in the format of fish_sel_blocks and mutually exclusive with cont_tv_ret_sel != "none". |
ret_sel_model |
paste("logist1_Fleet_", 1:input_list$data$n_fish_fleets, sep = "") |
Retention selectivity form per fleet and block, with the same syntax and the same set of forms as fish_sel_model. |
retsel_pe_pars_spec
|
NULL
|
Estimation structure for the retention process error hyperparameters, as fishsel_pe_pars_spec. |
ret_fixed_sel_pars_spec |
rep("fix_ret_sel_input", input_list$data$n_fish_fleets) |
How the retention fixed-effect parameters are estimated, with the options of fish_fixed_sel_pars_spec. |
ret_sel_devs_spec
|
NULL
|
Estimation structure for the annual retention deviations, as fish_sel_devs_spec. |
ret_sel_corr_opt_semipar
|
NULL
|
Which correlation components to suppress under semi-parametric retention time variation, as corr_opt_semipar. |
Use_ret_selex_prior
|
0
|
Integer flag, 1 for priors on the retention selectivity parameters. Default 0. |
ret_selex_prior
|
NULL
|
Data frame with the columns and the optional type of fish_selex_prior. |
retsel_devs_shared_bins
|
NULL
|
Bins sharing one retention deviation series, as fishsel_devs_shared_bins. |
retsel_pe_wt
|
rep(1,
input_listn_fish_fleets)
|
Per-fleet multiplier on the retention process error likelihood, as fishsel_pe_wt. Default 1. |
retsel_rw_init_sigma |
rep(5, input_list$data$n_fish_fleets) |
Standard deviation of the first year of an "rw" retention deviation series, as fishsel_rw_init_sigma. Default 5. |
retsel_dont_est_dev_first
|
rep(0,
input_listn_fish_fleets)
|
Whether each fleet’s retention deviations start in year two, as fishsel_dont_est_dev_first. Default 0. |
ret_selex_type |
"age" |
Character scalar, "age" or "length", the bin dim every retention selectivity function is defined over. |
use_fixed_ret_sel
|
rep(1,
input_listn_fish_fleets)
|
Integer vector [n_fish_fleets], 1 to fix retention selectivity and 0 to estimate it. |
ret_sel_input
|
array(1, dim =
c(input_listn_pop,
input_listn_regions,
length(input_listyears),
input_listn_seas,
length(input_listages),
input_listn_sexes,
input_listn_fish_fleets))
|
Array of fixed retention values [n_pop × n_regions × n_years × n_seas × n_bins × n_sexes × n_fish_fleets]. |
ret_sel_nonpar_est_bins
|
NULL
|
Optional bin groupings for non-parametric retention, structured [[fleet]][[block]], each element a list of bin index vectors defining grouped parameters. |
ret_sel_sex_offset |
rep("none", input_list$data$n_fish_fleets) |
Character vector [n_fish_fleets] linking the sexes of a fleet's retention curve, with the options of fish_sel_sex_offset. Default "none". Retention is a fraction, so a scale offset only makes sense where the scaled curve stays at or below one. |
Setup_Mod_Srvsel_and_Q
36 arguments
| Argument | Default | Description |
|---|---|---|
cont_tv_srv_sel |
paste("none_Fleet_", 1:input_list$data$n_srv_fleets, sep = "") |
Character vector of continuous time variation per fleet, each "<type>_Fleet_x": "none" (default), "iid", "rw", "3dmarg", "3dcond" (3D GMRF over age, year and cohort) or "2dar1" (separable over bin and year). Any fleet other than "none" also needs srvsel_pe_pars_spec and srv_sel_devs_spec. |
srv_sel_blocks |
paste("none_Fleet_", 1:input_list$data$n_srv_fleets, sep = "") |
Character vector of discrete selectivity time blocks, each "Block_k_Year_a-b_Fleet_x" with "terminal" allowed as the end year, or "none_Fleet_x" (default) for constant selectivity. Parsed into an [n_regions × n_years × n_srv_fleets] array. Mutually exclusive with continuous time variation for the same fleet. |
srv_sel_model |
required | Character vector of the selectivity form per fleet, and optionally per block: "<model>_Fleet_x" or "<model>_Fleet_x_Block_k", the latter required when a fleet has several blocks. The forms and their syntax, including the "bicubic" suffixes, are those of fish_sel_model in Setup_Mod_Fishsel_and_Q. No default. |
Use_srv_q_prior
|
0
|
Integer (0/1) for lognormal priors on survey catchability. Default 0. |
srv_q_prior
|
NA
|
Data frame with columns region, fleet, block, mu on the natural scale and sd on the log scale, one row per ((), ) prior. Default NA. |
srv_q_blocks |
paste("none_Fleet_", 1:input_list$data$n_srv_fleets, sep = "") |
Character vector of discrete catchability time blocks, in the format of srv_sel_blocks. Parsed into an [n_regions × n_years × n_srv_fleets] array. Default "none_Fleet_x". |
srvsel_pe_pars_spec
|
NULL
|
Character vector [n_srv_fleets] or NULL (default) of the sharing structure for the process error hyperparameters. See do_sel_pe_pars_mapping. Deviations shared over regions or fleets in srv_sel_devs_spec share these the same way, whatever this says. |
srv_fixed_sel_pars_spec
|
required | Character vector [n_srv_fleets] of the sharing structure for the fixed-effect selectivity parameters. No default. See do_fixed_sel_pars_mapping. |
srv_q_spec
|
NULL
|
Character vector [n_srv_fleets] or NULL (default) of the sharing structure for catchability. See do_q_mapping. |
srv_q_type |
rep("est", input_list$data$n_srv_fleets) |
Character vector [n_srv_fleets] of how catchability is obtained. "est" (default) estimates ln_srv_q, "arith" concentrates it out 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 the years with observations only and fix that fleet's ln_srv_q whatever srv_q_spec says. The solve runs within each srv_q_blocks block. |
srv_sel_devs_spec
|
NULL
|
Character vector [n_srv_fleets] or NULL (default) of the sharing structure for the deviation series. See do_sel_devs_mapping. |
corr_opt_semipar
|
NULL
|
Character vector [n_srv_fleets] or NULL (default) of which correlation components to suppress under the 3D GMRF or 2D AR1 forms. See do_sel_pe_pars_mapping. |
srv_q_model |
NULL |
Character vector [n_srv_fleets] of the process error on annual catchability deviations: "none" (default), "iid", "rw", "ar1" or "dsem", which passes the series to Setup_Mod_DSEM. Catchability is then \exp(\ln q_{r,b,f} + \epsilon_{r,y,f}). A fleet with deviations cannot also have srv_q_blocks or an analytically solved srv_q_type. |
sigma_srv_q_spec |
"est_all" |
Sharing string for the deviation standard deviation over region and fleet: "est_all" (default), "est_shared_r", "est_shared_f", "est_shared_r_f" or "fix". |
srv_q_rho_spec |
"est_all" |
Sharing string for the AR1 correlation, with the same options as sigma_srv_q_spec. Default "est_all". Only read under srv_q_model = "ar1". |
srv_q_rw_init_sigma
|
NA
|
Standard deviation of the first estimated year of a random walk. NA (default) starts the walk at zero under its own sigma, which keeps ln_srv_q as the level of the series; a wide value leaves the level free and confounds it with ln_srv_q. |
srv_q_re_years |
NULL |
List [n_srv_fleets], each element the model years (as indices into data$years, not calendar years) that fleet's catchability deviations are estimated over, or NULL for every year. NULL (default) gives every fleet every year. Projection years are always estimated regardless. A year left out of a fleet's vector holds that fleet's deviation fixed at zero, which a random walk or ar1 then steps through like any other fixed cell, except at that fleet's first estimated year: there a random walk gets the diffuse srv_q_rw_init_sigma start and an ar1 its stationary marginal sd, the same treatment year one gets when nothing is fixed ahead of it. Read only for a fleet whose srv_q_model is not "none". |
Use_srv_selex_prior
|
0
|
Integer (0/1) for priors on the survey selectivity parameters. Default 0. |
srv_selex_prior |
NULL |
Data frame with columns region, fleet, block, sex, par, mu, sd and an optional type. "par" (the default) 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 at one bin, both on the natural scale, where par names the bin and the value is read at the first model year of block; that is the ADMB convention of pinning survey selectivity at a reference age near one, which no set of independent parameter priors can express. Default NULL. |
Use_srv_selex_penalty
|
0
|
Integer (0/1). Whether a centering penalty is applied to sets of survey selectivity fixed-effect parameters. Default 0. |
srv_sel_norm_bins |
NULL |
List with one element per fleet naming the bins the mean-one standardization averages over, or NULL for fleets standardizing over every bin. Read under "nonparlog" 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. |
srv_sel_bin_dev_bins
|
NULL
|
List with one element per fleet naming the bins that fleet overrides, or NULL for none, e.g. list(1, NULL). An overridden bin takes a freely estimated annual value (_{y,b}) in place of what the functional form produced, applied after every other transformation including standardization, while the rest of the curve keeps its parametric shape. Default NULL. |
srvsel_pe_wt
|
rep(1,
input_listn_srv_fleets)
|
Numeric vector [n_srv_fleets] multiplying the survey selectivity process error likelihood. Default 1. 0 skips that fleet’s process error, so the deviations stay estimated but enter the objective only through the data and any smoothness or centering penalties. Values other than 0 or 1 make an estimated process error sigma reinterpretable. Applies to ln_srvsel_devs only; the bin-override deviations have their own process error. |
srvsel_rw_init_sigma |
rep(5, input_list$data$n_srv_fleets) |
Numeric vector [n_srv_fleets] giving the standard deviation of 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, which suits a base curve that already describes the first year well. |
cont_tv_srvsel_bin_devs |
rep("none", input_list$data$n_srv_fleets) |
Character vector [n_srv_fleets] of the process error on the bin-override deviations: "none" (default), "iid" or "rw". A walk has its own estimated sigma per bin. |
srv_selex_penalty
|
NULL
|
Data frame of centering penalties with columns region, fleet, block, sex, par and wt, required when Use_srv_selex_penalty = 1. Each row penalizes wt * (log(mean(exp(pars))))^2 over the parameters named in par, a single index or a list column of integer vectors. This pins the scalar of a non-parametric curve that catchability would otherwise absorb, and is softer than fixing a bin. Meant for parameter sets on the log scale. Default NULL. |
t_srv
|
array(1, dim =
c(input_listn_regions,
input_listn_seas,
input_listn_srv_fleets))
|
Survey timing as a fraction of the year (annual models) or the season (seasonal models), array [n_regions × n_seas × n_srv_fleets]. Default 1, the end of the period. |
srvsel_devs_shared_bins |
NULL |
List of integer vectors grouping the bins that share one deviation series, e.g. list(1:5, 6:10, 11:30). Required when srv_sel_devs_spec names an "est_shared_b" variant. Default NULL. |
srv_selex_type |
"age" |
Character scalar, "age" (default) or "length". |
use_fixed_srv_sel
|
rep(0,
input_listn_srv_fleets)
|
Integer vector [n_srv_fleets], 1 to fix survey selectivity and 0 to estimate it. |
srv_sel_input
|
NULL
|
Array of fixed survey selectivity values [n_pop × n_regions × n_years × n_seas × n_bins × n_sexes × n_srv_fleets], required whenever any survey has fixed selectivity. |
srv_sel_nonpar_est_bins
|
NULL
|
Optional bin groupings for non-parametric survey selectivity, structured [[survey]][[block]], each element a list of integer vectors naming the bins that share one estimated parameter. Indices are on the bin dim the survey selectivity type names. |
srvsel_dont_est_dev_first
|
rep(0,
input_listn_srv_fleets)
|
Integer vector [n_srv_fleets] of 0/1, default 0. Where 1, that fleet’s deviations start in year two and the fixed parameters hold year one. A non-parametric form has one free base parameter per bin, so year one’s deviation is that same value written twice with only srvsel_rw_init_sigma between them, a prior on a level usually meant to be free. 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. |
srv_sel_sex_offset |
rep("none", input_list$data$n_srv_fleets) |
Character vector [n_srv_fleets] linking the sexes of a fleet's selectivity when n_sexes > 1: "none" (default), "par", "scale", "par_scale", "apical" or "par_apical". See fish_sel_sex_offset in Setup_Mod_Fishsel_and_Q for what each one does. |
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 a raw Gaussian instead of anchoring it to p5 at the first bin, column two does the same for the descending limb and p6. |
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. |
Setup_Mod_DSEM
11 arguments
| Argument | Default | Description |
|---|---|---|
dsem_arrows
|
required | Arrow lines, one per element of a character vector or one per line of a string. Series are named for their process and every index dim, for example rec, rec_Pop_1_Region_2 or NAA_Pop_1_Region_1_Seas_1_Age_3_Sex_1, with the bare label used when every index dim has one level. Covariates are named by the columns of dsem_data. A name of NA with a value in the fourth field fixes that arrow, an sd on the natural scale; to fix a parameter that several arrows share, write the value on each of them. |
dsem_data
|
required | Data frame with a year column and one column per covariate, NA where a covariate is not observed. NULL for a dsem among deviation series alone. |
dsem_processes |
NULL |
Processes whose series the arrows may name, from dsem_process_table. NULL (default) takes the processes whose module declared "dsem": RecDevs_model in Setup_Mod_Rec; NAA_re, growth_tv_model and growth_semipar in Setup_Mod_Biologicals; move_year_re in Setup_Mod_Movement; fish_q_model in Setup_Mod_Fishsel_and_Q; and srv_q_model in Setup_Mod_Srvsel_and_Q. It is "rec" when none did. A declared process has to have every series with an estimated cell in the arrows, since its own penalty is off. A process linked without a declaration keeps its penalty on the cells left out, but its sigma cannot stay estimated once every cell is linked. A linked series covers every year of its array, so a cell mapped off (NA in the map) inside one is not left out: the dsem reads it at its fixed starting value and still evaluates its innovation. A recruitment series with such a mix is refused; for the other processes the mix is reported. Under CTMC movement the deviations are the year to year part of habitat preference, so a preference_formula term that varies over years is refused once a movement series is linked. |
dsem_family |
NULL |
Named character vector, one entry per covariate, the distribution of its observations given the grid cells. "fixed" (default) takes an observed year as the cell itself, known, and leaves a missing year latent. "normal" leaves every year latent, each observation normal about the cell with sd exp(ln_dsem_obs_sd). "bernoulli" (or "binomial") takes 0/1 observations with the cell the logit of the probability; "poisson" takes counts with the cell the log mean; "gamma" takes positive values with the cell the log mean and exp(ln_dsem_obs_sd) the CV, shape 1/CV^2; "lognormal" takes positive values with the cell the log median and exp(ln_dsem_obs_sd) the log-scale sd; "tweedie" takes non-negative values including zeros with the cell the log mean, exp(ln_dsem_obs_sd) the dispersion and logit_dsem_tweedie_p the power as 1 + \mathrm{plogis}(\cdot), in (1, 2) and starting at 1.5; and "gaussian_fixed_sd" is normal about the cell with a known sd per observed year from dsem_fixed_sd. The name "gaussian" is also accepted for the normal. Under a family whose link is not the identity the arrows, the mean under dsem_mu_spec and the grid are all on the link scale, and every latent cell starts at the series mean. The sd and power parameters are mapped off for the families with none. |
dsem_link |
NULL |
Optional named character vector, one entry per covariate, the link from the cell to the observation's mean: "identity", "log", "logit" or "cloglog". Defaults to each family's own: identity for fixed, normal and the fixed-sd normal, logit for bernoulli, log for the rest. A link applies whatever the family, so a Poisson under the identity can end up with a negative mean. |
dsem_fixed_sd |
NULL |
Data frame with a year column and one column per "gaussian_fixed_sd" covariate, holding that year's known sd. Needed on every observed year of such a covariate. |
dsem_mu_spec |
"zero" |
"zero" (default) holds an identity-link covariate at zero and every other one at its observed mean, "fix" holds them all at their observed means, "est" estimates them all, a character vector estimates only those named, and a named numeric vector fixes those covariates at the values given with the rest at the observed mean. A linked series' mean is always fixed at zero, since its process already sits under a level parameter. The default holds the mean because a covariate seen in few years identifies it mostly through the path coefficient, and the two then trade off, and it holds an identity-link covariate at zero so that a path coefficient reads against a centered covariate, the convention the operating model draws under. Zero is a center only on that link, so a log or logit family keeps its observed mean. An identity-link covariate in its own units should be centered first, or given "fix"; a warning names one whose observed mean sits further from zero than its own spread. |
covs
|
NULL
|
Passed to read_dsem_arrows: series groups whose innovations may covary. |
dsem_delta0_spec |
"none" |
"none" (default), "est", or the names of the series whose first year offset is estimated. |
mod_var_logscale
|
FALSE
|
Passed to read_dsem_arrows: whether a moderated sd is the exponential of its series. |
dsem_variance |
"conditional" |
Passed to read_dsem_arrows as variance. "conditional" (default) reads each sd line as the innovation sd; "diagonal" and "marginal" read it as the series' marginal sd, solving the innovation sd so the series comes out at that spread, and differ only when covariance lines are present. A linked recruitment cell's lognormal correction is half its marginal variance under the arrows, which dsem_margvar_grid reports and the marginal forms hold at the sd line squared; the initial age deviations read its settled value. A random walk cannot be written under them, since its paths alone carry a cell past any fixed spread after year one, and setup checks the starting values and refuses. |
Setup_Mod_Weighting
35 arguments
| Argument | Default | Description | ||
|---|---|---|---|---|
addtocomp
|
0.001
|
Small constant added to the composition proportions to avoid log(0). Default 1e-3. Ignored by the logistic normal, which handles zeros itself. | ||
comp_const_obs
|
1
|
Integer switch for where addtocomp enters the multinomial, not a constant to tune. 1 (default) adds it to the observed proportions that weight the likelihood as well as inside the logarithms, so the likelihood is stationary at pred = obs; 0 weights by the raw observed proportions. With a Dirichlet-multinomial conditional age-at-length fleet, 1 warns, since the constant biases theta upward when most age bins in a length bin are structurally empty. | ||
addtofishidx
|
1e-04
|
Small constants added to the fishery and survey indices. Default 1e-4. | ||
addtosrvidx
|
1e-04
|
Small constants added to the fishery and survey indices. Default 1e-4. | ||
addtotag
|
1e-10
|
Small constant added to the tag recovery observations. Default 1e-10. | ||
Wt_Catch
|
1
|
Weights on the catch and fishery index likelihoods, a scalar or an array [n_regions × n_years × n_seas × n_fish_fleets]. Default 1. | ||
Wt_FishIdx
|
1
|
Weights on the catch and fishery index likelihoods, a scalar or an array [n_regions × n_years × n_seas × n_fish_fleets]. Default 1. | ||
Wt_SrvIdx
|
1
|
Weight on the survey index likelihood, a scalar or an array [n_regions × n_years × n_seas × n_srv_fleets]. Default 1. | ||
Wt_Catch_pop
|
1
|
The population-specific catch and fishery index weights, a scalar or an array [n_pop × n_regions × n_years × n_seas × n_fish_fleets]. Default 1. | ||
Wt_FishIdx_pop
|
1
|
The population-specific catch and fishery index weights, a scalar or an array [n_pop × n_regions × n_years × n_seas × n_fish_fleets]. Default 1. | ||
Wt_SrvIdx_pop
|
1
|
The population-specific survey index weight, a scalar or an array [n_pop × n_regions × n_years × n_seas × n_srv_fleets]. Default 1. | ||
Wt_Rec
|
1
|
Weight on the recruitment deviation penalty, a scalar or an array [n_pop × n_regions × n_est_rec_devs], where the third dim is ln_RecDevs’s own rather than the number of years, since dont_est_recdev_last and n_proj_yrs_devs both move it. Default 1. A zero leaves a deviation estimated but takes it out of the penalty, which is how a stock-recruit relationship is fit over a window of years while recruitment stays free in every year; dont_est_recdev_last instead removes the deviations, so recruitment reverts to the deterministic prediction. | ||
Wt_Init_Rec
|
NULL
|
Weight on the initial age deviation penalty, a scalar or an array [n_pop × n_regions × (n_ages - 1) × n_sexes]. NULL (default) takes Wt_Rec when that is a scalar; supply it explicitly when Wt_Rec is an array, since the two penalties are dimensioned differently. | ||
Wt_F
|
1
|
Scalar weight on the fishing mortality deviation penalty. Default 1. | ||
Wt_Tagging
|
1
|
Scalar weight on the tag recovery likelihood. Default 1. | ||
Wt_FishAgeComps
|
array(1, dim =
c(input_listn_regions,
length(input_listyears),
input_listn_seas,
input_listn_sexes,
input_listn_fish_fleets))
|
Weights on the fishery and discard composition likelihoods, a scalar or an array [n_regions × n_years × n_seas × n_sexes × n_fish_fleets]. Default one everywhere. | ||
Wt_SrvAgeComps
|
array(1, dim =
c(input_listn_regions,
length(input_listyears),
input_listn_seas,
input_listn_sexes,
input_listn_srv_fleets))
|
Weights on the survey composition likelihoods, a scalar or an array [n_regions × n_years × n_seas × n_sexes × n_srv_fleets]. Default one everywhere. | ||
Wt_FishLenComps
|
array(1, dim =
c(input_listn_regions,
length(input_listyears),
input_listn_seas,
input_listn_sexes,
input_listn_fish_fleets))
|
Weights on the fishery and discard composition likelihoods, a scalar or an array [n_regions × n_years × n_seas × n_sexes × n_fish_fleets]. Default one everywhere. | ||
Wt_SrvLenComps
|
array(1, dim =
c(input_listn_regions,
length(input_listyears),
input_listn_seas,
input_listn_sexes,
input_listn_srv_fleets))
|
Weights on the survey composition likelihoods, a scalar or an array [n_regions × n_years × n_seas × n_sexes × n_srv_fleets]. Default one everywhere. | ||
Wt_FishAgeComps_pop
|
array(1, dim =
c(input_listn_pop,
input_listn_regions,
length(input_listyears),
input_listn_seas,
input_listn_sexes,
input_listn_fish_fleets))
|
The population-specific fishery and discard composition weights, a scalar or an array [n_pop × n_regions × n_years × n_seas × n_sexes × n_fish_fleets]. Default one everywhere. | ||
Wt_SrvAgeComps_pop
|
array(1, dim =
c(input_listn_pop,
input_listn_regions,
length(input_listyears),
input_listn_seas,
input_listn_sexes,
input_listn_srv_fleets))
|
The population-specific survey composition weights, a scalar or an array [n_pop × n_regions × n_years × n_seas × n_sexes × n_srv_fleets]. Default one everywhere. | ||
Wt_FishLenComps_pop
|
array(1, dim =
c(input_listn_pop,
input_listn_regions,
length(input_listyears),
input_listn_seas,
input_listn_sexes,
input_listn_fish_fleets))
|
The population-specific fishery and discard composition weights, a scalar or an array [n_pop × n_regions × n_years × n_seas × n_sexes × n_fish_fleets]. Default one everywhere. | ||
Wt_SrvLenComps_pop
|
array(1, dim =
c(input_listn_pop,
input_listn_regions,
length(input_listyears),
input_listn_seas,
input_listn_sexes,
input_listn_srv_fleets))
|
The population-specific survey composition weights, a scalar or an array [n_pop × n_regions × n_years × n_seas × n_sexes × n_srv_fleets]. Default one everywhere. | ||
Wt_Discard
|
1
|
Weight on the aggregated discard amount or fraction likelihood, a scalar or an array [n_regions × n_years × n_seas × n_fish_fleets]. Default 1. | ||
Wt_Discard_pop
|
1
|
The population-specific discard weight, a scalar or an array with a leading n_pop dim. Default 1. | ||
Wt_D
|
1
|
Scalar weight on the discard mortality rate deviation penalty. Default 1. | ||
Wt_FishAgeComps_discard
|
array(1, dim =
c(input_listn_regions,
length(input_listyears),
input_listn_seas,
input_listn_sexes,
input_listn_fish_fleets))
|
Weights on the fishery and discard composition likelihoods, a scalar or an array [n_regions × n_years × n_seas × n_sexes × n_fish_fleets]. Default one everywhere. | ||
Wt_FishLenComps_discard
|
array(1, dim =
c(input_listn_regions,
length(input_listyears),
input_listn_seas,
input_listn_sexes,
input_listn_fish_fleets))
|
Weights on the fishery and discard composition likelihoods, a scalar or an array [n_regions × n_years × n_seas × n_sexes × n_fish_fleets]. Default one everywhere. | ||
Wt_FishAgeComps_discard_pop
|
array(1, dim =
c(input_listn_pop,
input_listn_regions,
length(input_listyears),
input_listn_seas,
input_listn_sexes,
input_listn_fish_fleets))
|
The population-specific fishery and discard composition weights, a scalar or an array [n_pop × n_regions × n_years × n_seas × n_sexes × n_fish_fleets]. Default one everywhere. | ||
Wt_FishLenComps_discard_pop
|
array(1, dim =
c(input_listn_pop,
input_listn_regions,
length(input_listyears),
input_listn_seas,
input_listn_sexes,
input_listn_fish_fleets))
|
The population-specific fishery and discard composition weights, a scalar or an array [n_pop × n_regions × n_years × n_seas × n_sexes × n_fish_fleets]. Default one everywhere. | ||
Wt_Fish_caal
|
array(1, dim =
c(input_listn_regions,
length(input_listyears),
input_listn_seas,
length(caal_row_lens(input_listdatadata$n_fish_fleets))</code></td><td>Weight
on the fishery conditional age-at-length likelihood, multiplying each
length row's input sample size. Array [n_regions x n_years x n_seas x
n_caal_lens x n_sexes x n_fish_fleets], the shape of ISS_Fish_caal.
Default one everywhere.</td></tr>
<tr data-k="wt_srv_caal array(1, dim =
c(input_list$datadatadatadata)),
input_listn_sexes,
input_listn_srv_fleets))
the survey counterpart, with n_srv_fleets last. default one
everywhere.”>
|
|||
fish_sel_pen_wts |
NULL |
NULL (default), or a named numeric vector or list weighting any subset of six selectivity smoothness penalties, which are evaluated on the fleet's realized selectivity by bin and year surface and so apply to any functional form: "smooth_bin_curve" and "smooth_bin_diff" are the second and first difference across bins, "smooth_yr_diff" and "smooth_yr_curve" the same across years, "smooth_dome" penalizes non-monotonicity across bins, and "smooth_mean_center" regularizes each year's mean. See resolve_sel_pen_wts and Get_Selex_Smoothness_Penalty. A name left out is 0. Each weight may instead be a vector with one value per model year, so a penalty can act in some years only or at a different strength in each. The specification may also hold "bin_range", the first and last bin the penalties act over. Pass an unnamed list of per-fleet specifications to give each fleet its own. Call after Setup_Mod_Fishsel_and_Q. | ||
ret_sel_pen_wts
|
NULL
|
As fish_sel_pen_wts, for retained fishery selectivity. | ||
srv_sel_pen_wts
|
NULL
|
As fish_sel_pen_wts, for survey selectivity. Call after Setup_Mod_Srvsel_and_Q. |