Description of Model and Data Dimensions
a_model_dimensions.RmdThe following tables describe all elements contained within
input_list$data, which is generated using the
SPoRC::Setup_x functions. Note that they do not detail how
the SPoRC::Setup_x functions should be utilized. Rather,
they detail the components of input_list$data. Thus, for
further details on how arguments for SPoRC::Setup_x
functions should be defined, users should refer to the function
documentation. Furthermore, note that when n_sexes > 1,
the first dimension will always be females and the second dimension will
always be males. Similarly, when n_pop > 1, populations
are indexed in the order they are defined.
Data Inputs for Defining Model Dimensions
| Name | Description |
|---|---|
| years | Vector specifying number of years to model |
| ages | Vector specifying number of ages to model |
| lens | Vector specifying number of lengths to model |
| n_pop | Value specifying number of populations to model |
| n_regions | Value specifying number of regions to model |
| n_sexes | Value specifying number of sexes to model |
| n_fish_fleets | Value specifying number of fishery fleets to model |
| n_srv_fleets | Value specifying number of survey fleets to model |
| n_seas | Value specifying number of seasons to model within a year |
| seasdur | Numeric vector of length n_seas specifying the duration of each season as a fraction of the year (must sum to 1) |
| spawn_seas | Integer specifying which season spawning occurs in |
| natal_region | Integer vector of length n_pop specifying the natal region for each population. Used when n_pop > 1 to define population-specific recruitment and density dependence |
| n_proj_yrs_devs | Number of years to project deviations / random effect parameters forward |
| do_internal_comp_osa | Boolean. Whether or not internal composition OSAs are planned to be used |
| do_internal_conv_tag_osa | Boolean. Whether or not internal tagging OSAs are planned to be used |
Data Inputs for Defining Recruitment Processes
| Name | Description |
|---|---|
| rec_lag | Value specifying the delay between spawning and when recruits enter the population. For example, if recruits enter the population as age 2, rec_lag would be specified as 2, such that the spawning biomass from year – 2 produces these recruits. A special case, rec_lag = 0 (age-0 recruitment), uses the same year’s own spawning biomass instead of a prior year’s; because that year’s SSB isn’t known until the spawning season is reached, recruits may only enter in the spawning season itself or later that same year |
| Use_h_prior | Value specifying whether steepness priors are used. 0: Don’t use priors, 1: Use Priors. Steepness priors are bounded between 0.2 and 1 with a scaled beta penalty |
| h_prior | Data frame specifying prior distributions for steepness parameters. Must include columns: pop (population index), region (region index), mu (mean of the prior in normal space), and sd (standard deviation of the prior in normal space). For each row, a beta distribution is scaled to the interval [0.2, 1], and the corresponding h_trans value is transformed and penalized using the log-density from the scaled beta distribution |
| do_rec_bias_ramp | Value specifying whether or not the Methot and Taylor recruitment bias ramp is conducted. 0: Don’t do bias ramp, 1: Do bias ramp |
| max_bias_ramp_fct | Value specifying the maximum bias correction factor applied to the recruitment bias ramp |
| bias_year | Vector of years specifying when to change the bias ramp. Can be specified with an NA if do_rec_bias_ramp = 0 |
| sigmaR_switch | Value specifying when to transition between using an early period sigma and late period sigma R for penalizing initial age deviations and recruitment deviations. Specify as 0 if sigmaR early is equal to sigmaR late |
| init_age_strc | Value specifying how the population age structure should be initialized. 0: Initialize via iteration to equilibrium, 1: Initialize with geometric series solution |
| equil_init_age_strc | Value specifying how initial age deviations arise. |
0 ("equil") == deterministic equilibrium; 1
("stoch_no_plus") == stochastic for all ages except the
plus group; 2 ("stoch_all") == stochastic for all ages
including the plus group; 3 ("stoch_shared_ages") ==
stochastic with user-defined age sharing via
init_age_devs_shared | | init_F_prop | Array specifying the
proportion of fishing mortality to apply to the initial age deviations
relative to the mean fishing mortality parameter for regions, seasons,
and fishery fleets | | rec_model | Value specifying the recruitment
model. 0 == Mean Recruitment, 1 == Beverton-Holt with steepness
parameterization | | rec_dd | Value specifying the recruitment density
dependence (only used when there is a stock-recruitment relationship). 0
== local density dependence (region-specific SSB drives regional
recruitment), 1 == global density dependence (summed SSB across regions
drives recruitment), 999 == no density-dependent stock-recruitment form
is used | | rec_region_prop_spec | Integer specifying how recruitment
regional apportionment is handled when n_pop > 1. 0 == recruitment
dispersal (recruits can be distributed across regions via estimated
proportions), 1 == strict natal homing (recruits are assigned entirely
to each population’s natal region) | | t_spawn | Fraction of year in
which spawning occurs | | use_fixed_stray_rate | Integer specifying
whether stray rates are supplied as a fixed external array (1) or
estimated as model parameters via stray_rate_pars (0). Default 1. Only
relevant when n_pop > 1 | | fixed_stray_rate | Array dimensioned by
n_pop, n_years specifying fixed stray rate values used when
use_fixed_stray_rate = 1. Values should be in [0, 1]. Ignored when
use_fixed_stray_rate = 0 | | stray_rate_blocks | Array dimensioned by
n_pop, n_years specifying the time block index for stray rate parameters
for each population and year. Unique integer values denote distinct
stray rate parameter blocks | | use_stray_rate_prior | Integer
specifying whether a Beta prior is placed on estimated stray rate
parameters. 0: Don’t use prior, 1: Use prior. Only relevant when
use_fixed_stray_rate = 0 and n_pop > 1. Prior contributions
accumulate into rec_prop_nLL | | stray_rate_prior | Data frame
specifying Beta prior parameters for stray rates. Must include columns:
pop (population index), block (time block index matching
stray_rate_blocks), mu (prior mean in (0,1)), and sd (prior standard
deviation). One row per population × block combination when
stray_rate_spec = “est_all”; one row per block only when stray_rate_spec
= “est_shared_p” | | use_rec_region_prop_prior | Value specifying
whether a Dirichlet prior is placed on recruitment regional
apportionment proportions. 0: Don’t use prior, 1: Use prior | |
rec_region_prop_prior | Data frame specifying Dirichlet prior parameters
for recruitment regional apportionment. Must include columns: pop
(population index) and alpha (list column containing Dirichlet
concentration parameter vectors of length n_regions) | |
use_fixed_rec_seas_prop | Integer specifying whether seasonal
recruitment apportionment proportions are fixed (1) or estimated (0) | |
fixed_rec_seas_prop | Array dimensioned by n_pop, n_seas specifying
fixed seasonal recruitment proportions when use_fixed_rec_seas_prop = 1.
Ignored otherwise | | use_rec_seas_prop_prior | Value specifying whether
a Dirichlet prior is placed on estimated seasonal recruitment
apportionment proportions. 0: Don’t use prior, 1: Use prior. Only
relevant when use_fixed_rec_seas_prop = 0 | | rec_seas_prop_prior | Data
frame specifying Dirichlet prior parameters for seasonal recruitment
apportionment. Must include columns: pop (population index) and alpha
(list column containing Dirichlet concentration parameter vectors of
length n_seas) | | sexratio_blocks | Array specifying sex-ratio blocks
dimensioned by n_pop, n_regions, n_years | | use_rinit | Integer
specifying whether a separate initial recruitment scalar is used to
initialise the population independently of ln_global_R0. 0: Population
initialised using ln_global_R0 (default), 1: Population
initialised using ln_rinit, with ln_global_R0
governing only the recruitment relationship | | init_age_devs_shared |
Integer vector of length n_ages - 1 specifying explicit
age-sharing for ln_InitDevs. Positions with the same value
share a single estimated parameter
(e.g. c(1:42, rep(42, 9)) shares the last 9 ages with age
42, giving 42 free parameters). Required when
equil_init_age_strc = 3; NULL (default) uses
standard behaviour. | | use_r0_prior | Integer specifying whether a
lognormal prior is placed on R0. 0: Don’t use prior (default), 1: Use
prior | | r0_prior | Data frame specifying lognormal prior parameters
for R0. Must include columns: pop (population index), mu (prior mean on
the natural scale), and sd (prior standard deviation on the log scale)
|
Data Inputs for Defining Biological Processes
| Name | Description |
|---|---|
| WAA | Weight-at-age values dimensioned by n_pop, n_regions, n_years, n_seas, n_ages, n_sexes |
| WAA_fish | Fishery weight-at-age values dimensioned by n_pop, n_regions, n_years, n_seas, n_ages, n_sexes, n_fish_fleets |
| WAA_srv | Survey weight-at-age values dimensioned by n_pop, n_regions, n_years, n_seas, n_ages, n_sexes, n_srv_fleets |
| MatAA | Maturity-at-age values dimensioned by n_pop, n_regions, n_years, n_seas, n_ages, n_sexes |
| AgeingError | Ageing error matrix dimensioned by n_years, n_modelled_ages, n_observed_ages, where rows across modelled ages sum to 1 |
| fit_lengths | Value describing whether or not to fit length composition data. 0: Don’t fit lengths, 1: Fit lengths |
| SizeAgeTrans | Size-age transition matrix dimensioned by n_pop, n_regions, n_years, n_seas, n_lens, n_ages, n_sexes. Can be specified as NA if length compositions are not fit |
| addtocomp | Constant to add to all composition data |
| addtofishidx | Constant to add to all fishery index data |
| addtosrvidx | Constant to add to all survey index data |
| addtotag | Constant to add to all tagging data |
| Use_M_prior | Value specifying whether natural mortality priors are used. 0: Don’t use prior, 1: Use prior |
| M_prior | A data frame specifying how natural mortality priors should be applied. Must include columns: popblk (population block index), regionblk (region block index), yearblk (year block index), ageblk (age block index), sexblk (sex block index), mu (prior mean on natural scale), and sd (prior standard deviation on log scale) |
| Fixed_natmort | Natural mortality array dimensioned by n_pop, n_regions, n_years, n_ages, n_sexes |
| M_blocks | Array that specifies the natural mortality blocking structure, dimensioned by n_pop, n_regions, n_years, n_ages, n_sexes. Unique integer values denote distinct natural mortality parameter blocks |
Data Inputs for Defining Spawning and Multi-Population Processes
| Name | Description |
|---|---|
| sgl_seas_spawning_movement | Movement matrix applied during the spawning event when n_seas == 1 and n_pop > 1, representing fish returning to natal areas to spawn. Dimensioned by n_pop, n_regions, n_regions, n_years, n_ages, n_sexes. Ignored when n_seas > 1 or n_pop == 1 |
Data Inputs for Defining Movement Processes
| Name | Description |
|---|---|
| do_recruits_move | Value specifying whether recruits are allowed to move. 0: Recruits don’t move, 1: Recruits move |
| use_fixed_movement | Value specifying whether or not to use a fixed movement matrix. 0: Don’t use fixed movement, 1: Use fixed movement |
| Fixed_Movement | Fixed movement matrix dimensioned by n_pop, n_regions, n_regions, n_years, n_seas, n_ages, n_sexes |
| Use_Movement_Prior | Value specifying whether or not to use movement priors. 0: Don’t use movement prior, 1: Use movement prior |
| Movement_prior | Data frame with columns representing population (pop), origin region (region_from), year (year), season (seas), representative age (age), sex (sex), and a list column (alpha) containing Dirichlet prior parameters. Each element of alpha is a numeric vector of length n_regions, specifying the prior concentration values for movement among destination regions |
| cont_vary_movement | Integer indicating whether movement is continuously varying across regions, years, and ages. 0 = none, 1 = iid deviations |
| map_move_devs | Array dimensioned by n_regions, n_regions - 1, n_years, n_ages, and n_sexes specifying which movement parameters are shared and mapped off |
| move_type | Integer indicating movement model type. 0 = unstructured Markov (multinomial logit), 1 = Continuous Time Markov Chain (CTMC) |
| ctmc_move_dat | Data frame with CTMC covariates (regions, years, ages, sexes, plus formula variables) used to build design matrices for diffusion and preference when move_type == 1. Can include projection years with projected covariate values |
| diffusion_formula | R formula specifying diffusion covariates for CTMC movement (when move_type == 1) |
| preference_formula | R formula specifying preference covariates for CTMC movement (when move_type == 1) |
| adjacency_mat | Square adjacency matrix (n_regions × n_regions) defining allowed transitions between regions for CTMC movement |
| adjacency_collapsed | Collapsed adjacency matrix (n_regions × n_regions - 1) defining allowed transitions between regions for CTMC movement, excluding diagonals |
| area_r | Numeric vector of region areas (length n_regions) used to scale diffusion rates in CTMC movement |
| ctmc_diffusion_bounds | Integer flag (0 or 1) indicating whether diffusion bounds are applied to ensure the generator matrix is Metzler (1 = bounds enforced) |
Data Inputs for Defining Tagging Processes
| Name | Description |
|---|---|
| use_conv_fish_tagging | Integer vector of length n_fish_fleets indicating whether conventional fishery tagging data are used for each fleet. 0: Don’t use tagging data, 1: Use tagging data |
| conv_tag_release_indicator | Matrix dimensioned by n_conv_tag_cohorts, 3. Columns represent the tag release region (column 1), tag release year (column 2), and tag release season (column 3) for each cohort |
| n_conv_tag_cohorts | Value specifying the number of conventional tag cohorts released |
| conv_tag_max_liberty | Value specifying the maximum years at liberty to track tag cohorts |
| conv_tagged_fish | Array specifying the number of tagged fish for a given cohort, dimensioned by n_conv_tag_cohorts, n_pop, n_ages, n_sexes |
| obs_conv_tag_fish_recap | Array of observed conventional tag recaptures dimensioned by conv_tag_max_liberty, n_seas, n_conv_tag_cohorts, n_pop, n_regions, n_ages, n_sexes, n_fish_fleets. If no age or sex information is available, the array can be initialized with 0s and recaptured individuals input into the first age and first sex dimension, coupled with conv_tag_age_pool and conv_tag_sex_pool to sum across those dimensions when computing the likelihood |
| conv_fish_tag_like | Integer specifying the tag likelihood to use. 0: Poisson, 1: Negative Binomial, 2: Multinomial release-conditioned, 3: Multinomial recapture-conditioned, 4: Dirichlet-Multinomial release-conditioned, 5: Dirichlet-Multinomial recapture-conditioned |
| conv_tag_mixing_period | Value specifying the mixing period for tag cohorts in seasonal (or annual if model is annual) time steps. Tag observations within the mixing period are excluded from the likelihood |
| conv_tag_t_tagging | Fraction of the season in which tagging occurs. Specify as 1 if tagging happens at the start of the season such that mortality is not discounted |
| use_conv_tag_fishrep_prior | Value specifying whether or not a tag reporting rate prior should be used. 0: Don’t use prior, 1: Use prior |
| conv_tag_fishrep_prior | Data frame containing prior specifications for conventional fishery tag reporting parameters. Must include columns: region (region index), block (time block index), fleet (fleet index), mu (numeric mean for reporting rate prior in normal space; use NA if symmetric beta is used), sd (prior standard deviation in normal space), and type (0 = symmetric beta, 1 = regular beta) |
| conv_tag_pop_pool | List specifying how tag recaptures along the population axis should be pooled when computing the likelihood. Each element of the list contains the population indices to sum across for a given pooled group |
| conv_tag_age_pool | List specifying how tag recaptures along the age axis should be pooled when computing the likelihood. Each element of the list contains the age indices to sum across for a given pooled group. For example, if no age information is available: list(c(1:n_ages)) sums all ages together |
| conv_tag_sex_pool | List specifying how tag recaptures along the sex axis should be pooled when computing the likelihood. Each element of the list contains the sex indices to sum across for a given pooled group. For example, if no sex information is available: list(c(1:n_sexes)) sums both sexes together |
| conv_tag_fish_reporting_blocks | Array dimensioned by n_regions, n_years, n_fish_fleets indicating the time block index for tag reporting rate parameters in each region and fleet |
| conv_fish_tag_attr | Data object specifying how tagged fish attributes (e.g., age, sex, population) are apportioned at release when full individual-level data are unavailable. Passed to the internal release_conv_tag_attr function |
| conv_tag_release_platform | Matrix dimensioned by n_conv_tag_cohorts specifying the release platform (e.g., population, fishery or survey fleet) used to attribute selectivity and effort to tagged fish at the time of release |
Data Inputs for Defining Catch and Fishing Mortality Processes
| Name | Description |
|---|---|
| ObsCatch | Observed catch data dimensioned by n_regions, n_years, n_seas, n_fish_fleets. Used in region-aggregated catch likelihoods |
| ObsCatch_pop | Population-specific observed catch data dimensioned by n_pop, n_regions, n_years, n_seas, n_fish_fleets. Used in population-specific catch likelihoods |
| catch_units | Array dimensioned by n_fish_fleets describing catch units. 0 == Abundance, 1 == Biomass (default) |
| UseCatch | Array dimensioned by n_regions, n_years, n_seas, n_fish_fleets describing whether to fit to catch data in a given year, season, and fleet. 0: Don’t fit catch, 1: Fit catch |
| UseCatch_pop | Array dimensioned by n_pop, n_regions, n_years, n_seas, n_fish_fleets describing whether to fit to population-specific catch data. 0: Don’t fit catch, 1: Fit catch |
| Use_F_pen | Value specifying whether to use a fishing mortality penalty to regularize fishing mortality deviations. 0: Don’t use regularity penalty, 1: Use regularity penalty |
| ObsDiscard | Observed discard data dimensioned by n_regions, n_years, n_seas, n_fish_fleets. Used in region-aggregated discard likelihoods |
| discard_units | Array dimensioned by n_fish_fleets describing discard units. 0 == Abundance, 1 == Biomass |
| UseDiscard | Array dimensioned by n_regions, n_years, n_seas, n_fish_fleets describing whether to fit to discard data in a given year, season, and fleet. 0: Don’t fit discard, 1: Fit discard |
| UseDiscard_pop | Array dimensioned by n_pop, n_regions, n_years, n_seas, n_fish_fleets describing whether to fit to population-specific discard data. 0: Don’t fit discard, 1: Fit discard |
| Use_dmr_pen | Value specifying whether to use a discard mortality rate penalty. 0: Don’t use penalty, 1: Use penalty |
Data Inputs for Defining Fishery Indices and Compositions
Region-aggregated observations (summed across populations) and population-specific observations are handled separately. Region-aggregated inputs use dimensions beginning with n_regions; population-specific inputs use dimensions beginning with n_pop, n_regions.
| Name | Description |
|---|---|
| ObsFishIdx | Fishery index dimensioned by n_regions, n_years, n_seas, n_fish_fleets |
| ObsFishIdx_SE | Fishery index standard errors dimensioned by n_regions, n_years, n_seas, n_fish_fleets |
| UseFishIdx | Array dimensioned by n_regions, n_years, n_seas, n_fish_fleets describing whether to fit to the fishery index in a given year, season, and fleet. 0: Don’t fit fishery index, 1: Fit fishery index |
| fish_idx_type | Matrix dimensioned by n_fish_fleets specifying the index type for a given fishery fleet. 0: Abundance index, 1: Biomass index (uses WAA_fish for calculations), 999: None Available |
| ObsFishIdx_pop | Population-specific fishery index dimensioned by n_pop, n_regions, n_years, n_seas, n_fish_fleets |
| ObsFishIdx_pop_SE | Population-specific fishery index standard errors dimensioned by n_pop, n_regions, n_years, n_seas, n_fish_fleets |
| UseFishIdx_pop | Array dimensioned by n_pop, n_regions, n_years, n_seas, n_fish_fleets describing whether to fit to population-specific fishery indices. 0: Don’t fit, 1: Fit |
| ObsFishAgeComps | Observed fishery age compositions dimensioned by n_regions, n_years, n_seas, n_ages, n_sexes, n_fish_fleets. Can be input as proportions or numbers, as these are normalized within the model |
| UseFishAgeComps | Array dimensioned by n_regions, n_years, n_seas, n_fish_fleets specifying whether or not to fit to fishery age compositions. 0: Don’t fit, 1: Fit |
| ISS_FishAgeComps | Array dimensioned by n_regions, n_years, n_seas, n_sexes, n_fish_fleets specifying the input sample size for a multinomial or Dirichlet-multinomial likelihood |
| Wt_FishAgeComps | Array dimensioned by n_regions, n_years, n_seas, n_sexes, n_fish_fleets specifying a multinomial weight to apply to fishery age compositions, ideally derived using Francis re-weighting |
| ObsFishAgeComps_pop | Population-specific observed fishery age compositions dimensioned by n_pop, n_regions, n_years, n_seas, n_ages, n_sexes, n_fish_fleets. Can be input as proportions or numbers |
| UseFishAgeComps_pop | Array dimensioned by n_pop, n_regions, n_years, n_seas, n_fish_fleets specifying whether to fit to population-specific fishery age compositions. 0: Don’t fit, 1: Fit |
| ISS_FishAgeComps_pop | Array dimensioned by n_pop, n_regions, n_years, n_seas, n_sexes, n_fish_fleets specifying the input sample size for population-specific fishery age composition likelihoods |
| Wt_FishAgeComps_pop | Array dimensioned by n_pop, n_regions, n_years, n_seas, n_sexes, n_fish_fleets specifying a multinomial weight to apply to population-specific fishery age compositions |
| ObsFishLenComps | Observed fishery length compositions dimensioned by n_regions, n_years, n_seas, n_lens, n_sexes, n_fish_fleets. Can be input as proportions or numbers, as these are normalized within the model |
| UseFishLenComps | Array dimensioned by n_regions, n_years, n_seas, n_fish_fleets specifying whether or not to fit to fishery length compositions. 0: Don’t fit, 1: Fit |
| ISS_FishLenComps | Array dimensioned by n_regions, n_years, n_seas, n_fish_fleets specifying the input sample size for a multinomial or Dirichlet-multinomial likelihood |
| Wt_FishLenComps | Array dimensioned by n_regions, n_years, n_seas, n_sexes, n_fish_fleets specifying a multinomial weight to apply to fishery length compositions, ideally derived using Francis re-weighting |
| ObsFishLenComps_pop | Population-specific observed fishery length compositions dimensioned by n_pop, n_regions, n_years, n_seas, n_lens, n_sexes, n_fish_fleets. Can be input as proportions or numbers |
| UseFishLenComps_pop | Array dimensioned by n_pop, n_regions, n_years, n_seas, n_fish_fleets specifying whether to fit to population-specific fishery length compositions. 0: Don’t fit, 1: Fit |
| ISS_FishLenComps_pop | Array dimensioned by n_pop, n_regions, n_years, n_seas, n_fish_fleets specifying the input sample size for population-specific fishery length composition likelihoods |
| Wt_FishLenComps_pop | Array dimensioned by n_pop, n_regions, n_years, n_seas, n_sexes, n_fish_fleets specifying a multinomial weight to apply to population-specific fishery length compositions |
| FishAgeComps_LikeType | Vector dimensioned by n_fish_fleets specifying the likelihood for region-aggregated fishery age compositions. 0: Multinomial, 1: Dirichlet-multinomial, 2: Logistic-normal with iid covariance, 999: None Available. Further options in Get_Comp_Likelihoods.R |
| FishAgeComps_pop_LikeType | Vector dimensioned by n_fish_fleets specifying the likelihood for population-specific fishery age compositions. Same options as FishAgeComps_LikeType |
| FishLenComps_LikeType | Vector dimensioned by n_fish_fleets specifying the likelihood for region-aggregated fishery length compositions. 0: Multinomial, 1: Dirichlet-multinomial, 2: Logistic-normal with iid covariance, 999: None Available. Further options in Get_Comp_Likelihoods.R |
| FishLenComps_pop_LikeType | Vector dimensioned by n_fish_fleets specifying the likelihood for population-specific fishery length compositions. Same options as FishLenComps_LikeType |
| FishAgeComps_Type | Matrix dimensioned by n_years, n_fish_fleets specifying how region-aggregated age composition data should be structured. 0: Aggregated across sexes and regions, 1: Split by sexes and regions, 2: Joint by sex but split by region, 999: None Available. Further options in Get_Comp_Likelihoods.R |
| FishAgeComps_pop_Type | Matrix dimensioned by n_years, n_fish_fleets specifying how population-specific age composition data should be structured. Same options as FishAgeComps_Type |
| FishLenComps_Type | Matrix dimensioned by n_years, n_fish_fleets specifying how region-aggregated length composition data should be structured. 0: Aggregated across sexes and regions, 1: Split by sexes and regions, 2: Joint by sex but split by region, 999: None Available. Further options in Get_Comp_Likelihoods.R |
| FishLenComps_pop_Type | Matrix dimensioned by n_years, n_fish_fleets specifying how population-specific length composition data should be structured. Same options as FishLenComps_Type |
| ObsFishAgeComps_discard | Observed discard age compositions dimensioned by n_regions, n_years, n_seas, n_ages, n_sexes, n_fish_fleets. Can be input as proportions or numbers, as these are normalized within the model |
| UseFishAgeComps_discard | Array dimensioned by n_regions, n_years, n_seas, n_fish_fleets specifying whether or not to fit to discard age compositions. 0: Don’t fit, 1: Fit |
| ISS_FishAgeComps_discard | Array dimensioned by n_regions, n_years, n_seas, n_sexes, n_fish_fleets specifying the input sample size for a multinomial or Dirichlet-multinomial discard age composition likelihood |
| ObsFishLenComps_discard | Observed discard length compositions dimensioned by n_regions, n_years, n_seas, n_lens, n_sexes, n_fish_fleets. Can be input as proportions or numbers, as these are normalized within the model |
| UseFishLenComps_discard | Array dimensioned by n_regions, n_years, n_seas, n_fish_fleets specifying whether or not to fit to discard length compositions. 0: Don’t fit, 1: Fit |
| ISS_FishLenComps_discard | Array dimensioned by n_regions, n_years, n_seas, n_fish_fleets specifying the input sample size for a multinomial or Dirichlet-multinomial discard length composition likelihood |
| ObsFishAgeComps_discard_pop | Population-specific observed discard age compositions dimensioned by n_pop, n_regions, n_years, n_seas, n_ages, n_sexes, n_fish_fleets. Can be input as proportions or numbers |
| UseFishAgeComps_discard_pop | Array dimensioned by n_pop, n_regions, n_years, n_seas, n_fish_fleets specifying whether to fit to population-specific discard age compositions. 0: Don’t fit, 1: Fit |
| ISS_FishAgeComps_discard_pop | Array dimensioned by n_pop, n_regions, n_years, n_seas, n_sexes, n_fish_fleets specifying the input sample size for population-specific discard age composition likelihoods |
| UseFishLenComps_discard_pop | Array dimensioned by n_pop, n_regions, n_years, n_seas, n_fish_fleets specifying whether to fit to population-specific discard length compositions. 0: Don’t fit, 1: Fit |
| ISS_FishLenComps_discard_pop | Array dimensioned by n_pop, n_regions, n_years, n_seas, n_fish_fleets specifying the input sample size for population-specific discard length composition likelihoods |
| FishAgeComps_discard_LikeType | Vector dimensioned by n_fish_fleets specifying the likelihood for region-aggregated discard age compositions. 0: Multinomial, 1: Dirichlet-multinomial, 2: Logistic-normal with iid covariance, 999: None Available |
| FishLenComps_discard_LikeType | Vector dimensioned by n_fish_fleets specifying the likelihood for region-aggregated discard length compositions. 0: Multinomial, 1: Dirichlet-multinomial, 2: Logistic-normal with iid covariance, 999: None Available |
| FishAgeComps_discard_pop_LikeType | Vector dimensioned by n_fish_fleets specifying the likelihood for population-specific discard age compositions. Same options as FishAgeComps_discard_LikeType |
| FishLenComps_discard_pop_LikeType | Vector dimensioned by n_fish_fleets specifying the likelihood for population-specific discard length compositions. Same options as FishLenComps_discard_LikeType |
| FishAgeComps_discard_Type | Matrix dimensioned by n_years, n_fish_fleets specifying how region-aggregated discard age composition data should be structured. 0: Aggregated across sexes and regions, 1: Split by sexes and regions, 2: Joint by sex but split by region, 999: None Available |
| FishLenComps_discard_Type | Matrix dimensioned by n_years, n_fish_fleets specifying how region-aggregated discard length composition data should be structured. Same options as FishAgeComps_discard_Type |
| FishAgeComps_discard_pop_Type | Matrix dimensioned by n_years, n_fish_fleets specifying how population-specific discard age composition data should be structured. Same options as FishAgeComps_discard_Type |
| FishLenComps_discard_pop_Type | Matrix dimensioned by n_years, n_fish_fleets specifying how population-specific discard length composition data should be structured. Same options as FishAgeComps_discard_Type |
Data Inputs for Defining Survey Indices and Compositions
Region-aggregated observations (summed across populations) and population-specific observations are handled separately. Region-aggregated inputs use dimensions beginning with n_regions; population-specific inputs use dimensions beginning with n_pop, n_regions.
| Name | Description |
|---|---|
| ObsSrvIdx | Survey index dimensioned by n_regions, n_years, n_seas, n_srv_fleets |
| ObsSrvIdx_SE | Survey index standard errors dimensioned by n_regions, n_years, n_seas, n_srv_fleets |
| UseSrvIdx | Array dimensioned by n_regions, n_years, n_seas, n_srv_fleets describing whether to fit to the survey index in a given year, season, and fleet. 0: Don’t fit, 1: Fit |
| srv_idx_type | Matrix dimensioned by n_srv_fleets specifying the index type for a given survey fleet. 0: Abundance index, 1: Biomass index (uses WAA_srv for calculations), 999: None Available |
| ObsSrvIdx_pop | Population-specific survey index dimensioned by n_pop, n_regions, n_years, n_seas, n_srv_fleets |
| ObsSrvIdx_pop_SE | Population-specific survey index standard errors dimensioned by n_pop, n_regions, n_years, n_seas, n_srv_fleets |
| UseSrvIdx_pop | Array dimensioned by n_pop, n_regions, n_years, n_seas, n_srv_fleets describing whether to fit to population-specific survey indices. 0: Don’t fit, 1: Fit |
| ObsSrvAgeComps | Observed survey age compositions dimensioned by n_regions, n_years, n_seas, n_ages, n_sexes, n_srv_fleets. Can be input as proportions or numbers, as these are normalized within the model |
| UseSrvAgeComps | Array dimensioned by n_regions, n_years, n_seas, n_srv_fleets specifying whether or not to fit to survey age compositions. 0: Don’t fit, 1: Fit |
| ISS_SrvAgeComps | Array dimensioned by n_regions, n_years, n_seas, n_sexes, n_srv_fleets specifying the input sample size for a multinomial or Dirichlet-multinomial likelihood |
| Wt_SrvAgeComps | Array dimensioned by n_regions, n_years, n_seas, n_sexes, n_srv_fleets specifying a multinomial weight to apply to survey age compositions, ideally derived using Francis re-weighting |
| ObsSrvAgeComps_pop | Population-specific observed survey age compositions dimensioned by n_pop, n_regions, n_years, n_seas, n_ages, n_sexes, n_srv_fleets. Can be input as proportions or numbers |
| UseSrvAgeComps_pop | Array dimensioned by n_pop, n_regions, n_years, n_seas, n_srv_fleets specifying whether to fit to population-specific survey age compositions. 0: Don’t fit, 1: Fit |
| ISS_SrvAgeComps_pop | Array dimensioned by n_pop, n_regions, n_years, n_seas, n_sexes, n_srv_fleets specifying the input sample size for population-specific survey age composition likelihoods |
| Wt_SrvAgeComps_pop | Array dimensioned by n_pop, n_regions, n_years, n_seas, n_sexes, n_srv_fleets specifying a multinomial weight to apply to population-specific survey age compositions |
| ObsSrvLenComps | Observed survey length compositions dimensioned by n_regions, n_years, n_seas, n_lens, n_sexes, n_srv_fleets. Can be input as proportions or numbers, as these are normalized within the model |
| UseSrvLenComps | Array dimensioned by n_regions, n_years, n_seas, n_srv_fleets specifying whether or not to fit to survey length compositions. 0: Don’t fit, 1: Fit |
| ISS_SrvLenComps | Array dimensioned by n_regions, n_years, n_seas, n_srv_fleets specifying the input sample size for a multinomial or Dirichlet-multinomial likelihood |
| Wt_SrvLenComps | Array dimensioned by n_regions, n_years, n_seas, n_sexes, n_srv_fleets specifying a multinomial weight to apply to survey length compositions, ideally derived using Francis re-weighting |
| ObsSrvLenComps_pop | Population-specific observed survey length compositions dimensioned by n_pop, n_regions, n_years, n_seas, n_lens, n_sexes, n_srv_fleets. Can be input as proportions or numbers |
| UseSrvLenComps_pop | Array dimensioned by n_pop, n_regions, n_years, n_seas, n_srv_fleets specifying whether to fit to population-specific survey length compositions. 0: Don’t fit, 1: Fit |
| ISS_SrvLenComps_pop | Array dimensioned by n_pop, n_regions, n_years, n_seas, n_srv_fleets specifying the input sample size for population-specific survey length composition likelihoods |
| Wt_SrvLenComps_pop | Array dimensioned by n_pop, n_regions, n_years, n_seas, n_sexes, n_srv_fleets specifying a multinomial weight to apply to population-specific survey length compositions |
| SrvAgeComps_LikeType | Vector dimensioned by n_srv_fleets specifying the likelihood for region-aggregated survey age compositions. 0: Multinomial, 1: Dirichlet-multinomial, 2: Logistic-normal with iid covariance, 999: None Available. Further options in Get_Comp_Likelihoods.R |
| SrvAgeComps_pop_LikeType | Vector dimensioned by n_srv_fleets specifying the likelihood for population-specific survey age compositions. Same options as SrvAgeComps_LikeType |
| SrvLenComps_LikeType | Vector dimensioned by n_srv_fleets specifying the likelihood for region-aggregated survey length compositions. 0: Multinomial, 1: Dirichlet-multinomial, 2: Logistic-normal with iid covariance, 999: None Available. Further options in Get_Comp_Likelihoods.R |
| SrvLenComps_pop_LikeType | Vector dimensioned by n_srv_fleets specifying the likelihood for population-specific survey length compositions. Same options as SrvLenComps_LikeType |
| SrvAgeComps_Type | Matrix dimensioned by n_years, n_srv_fleets specifying how region-aggregated age composition data should be structured. 0: Aggregated across sexes and regions, 1: Split by sexes and regions, 2: Joint by sex but split by region, 999: None Available. Further options in Get_Comp_Likelihoods.R |
| SrvAgeComps_pop_Type | Matrix dimensioned by n_years, n_srv_fleets specifying how population-specific survey age composition data should be structured. Same options as SrvAgeComps_Type |
| SrvLenComps_Type | Matrix dimensioned by n_years, n_srv_fleets specifying how region-aggregated length composition data should be structured. 0: Aggregated across sexes and regions, 1: Split by sexes and regions, 2: Joint by sex but split by region, 999: None Available. Further options in Get_Comp_Likelihoods.R |
| SrvLenComps_pop_Type | Matrix dimensioned by n_years, n_srv_fleets specifying how population-specific survey length composition data should be structured. Same options as SrvLenComps_Type |
| t_srv | Array dimensioned by n_regions, n_seas, n_srv_fleets specifying survey timing as a proportion of the season |
| do_srv_q_cov | Numeric value indicating whether a survey catchability covariate is used. 0 == Not used, 1 == Used |
| srv_q_cov | Array dimensioned by n_regions, n_years, n_srv_fleets, n_covariates representing the covariates used to compute survey catchability |
Data Inputs for Defining Fishery Selectivity and Catchability
| Name | Description |
|---|---|
| cont_tv_fish_sel | Matrix dimensioned by n_regions, n_fish_fleets specifying whether and how continuous time-varying selectivity is applied. 0: None, 1: iid deviations, 2: random walk, 3: 3D GMRF with marginal variance (semi-parametric), 4: 3D GMRF with conditional variance (semi-parametric). Further details in Get_PE_loglik.R, Get_3d_precision.R, and Get_Selex.R |
| cont_tv_fish_sel_penalty | Boolean specifying whether penalties are applied to continuous time-varying fishery selectivity deviations |
| fish_sel_blocks | Array dimensioned by n_regions, n_years, n_fish_fleets specifying selectivity time blocks. Unique integers denote distinct selectivity parameter blocks |
| fish_sel_model | Array dimensioned by n_regions, n_years, n_fish_fleets specifying the selectivity functional form. 0: Logistic (a50 and slope), 1: Gamma dome-shaped, 2: Power function, 3: Logistic (a50 and a95), 4: Double Normal (6 parameters). Further details in Get_Selex.R |
| fish_selex_type | Integer specifying whether fishery selectivity is age-based (0) or length-based (1) |
| use_fixed_fish_sel | Integer specifying whether fishery selectivity is fixed externally (1) or estimated (0) |
| fish_q_blocks | Array dimensioned by n_regions, n_years, n_fish_fleets specifying catchability time blocks. Unique integers denote distinct catchability parameter blocks |
| Use_fish_q_prior | Fishery catchability prior indicator. 0 == don’t use, 1 == use |
| fish_q_prior | Data frame containing prior specifications for fishery catchability parameters. Must include columns: region, fleet, block, mu (prior mean on natural scale), and sd (prior standard deviation on log scale). Each row specifies a log-normal prior for one catchability parameter |
| map_ln_fishsel_devs | Array dimensioned by n_regions, n_years, n_ages, n_sexes, n_fish_fleets indicating which continuous time-varying selectivity deviation values are fixed (mapped off) |
| Use_fish_selex_prior | Integer (0 or 1). Flag to enable log-normal priors on fishery selectivity parameters as specified in fish_selex_prior |
| fish_selex_prior | Data frame containing prior specifications for fishery selectivity parameters. Must include columns: region, fleet, block, sex, par (parameter index), mu (prior mean on natural scale), and sd (prior standard deviation on log scale). Each row specifies a log-normal prior for one selectivity parameter |
| fishsel_devs_min_shared_bins | Integer vector specifying the reference (minimum) bin index within each shared deviation group, used to subset the bin dimension when evaluating GMRF or 2D AR(1) likelihoods (PE models 3–5). Defaults to 1:n_ages when no bin sharing is specified |
Data Inputs for Defining Retention Selectivity
| Name | Description |
|---|---|
| cont_tv_ret_sel | Matrix dimensioned by n_regions, n_fish_fleets specifying whether and how continuous time-varying retention selectivity is applied. Same options as cont_tv_fish_sel |
| cont_tv_ret_sel_penalty | Boolean specifying whether penalties are applied to continuous time-varying retention selectivity deviations |
| ret_sel_blocks | Array dimensioned by n_regions, n_years, n_fish_fleets specifying retention selectivity time blocks. Unique integers denote distinct retention selectivity parameter blocks |
| ret_sel_model | Array dimensioned by n_regions, n_years, n_fish_fleets specifying the retention selectivity functional form. Same options as fish_sel_model |
| ret_selex_type | Integer specifying whether retention selectivity is age-based (0) or length-based (1) |
| use_fixed_ret_sel | Integer specifying whether retention selectivity is fixed externally (1) or estimated (0) |
| ret_sel_input | Array specifying fixed retention selectivity values when use_fixed_ret_sel = 1 |
| Use_ret_selex_prior | Integer (0 or 1). Flag to enable log-normal priors on retention selectivity parameters |
| retsel_devs_min_shared_bins | Integer vector specifying the reference (minimum) bin index within each shared deviation group for retention selectivity, used when evaluating GMRF or 2D AR(1) likelihoods. Defaults to 1:n_ages when no bin sharing is specified |
| map_ln_retsel_devs | Array indicating which continuous time-varying retention selectivity deviation values are fixed (mapped off) |
Data Inputs for Defining Survey Selectivity and Catchability
| Name | Description |
|---|---|
| cont_tv_srv_sel | Matrix dimensioned by n_regions, n_srv_fleets specifying whether and how continuous time-varying selectivity is applied. 0: None, 1: iid deviations, 2: random walk, 3: 3D GMRF with marginal variance (semi-parametric), 4: 3D GMRF with conditional variance (semi-parametric). Further details in Get_PE_loglik.R, Get_3d_precision.R, and Get_Selex.R |
| cont_tv_srv_sel_penalty | Boolean specifying whether penalties are applied to continuous time-varying survey selectivity deviations |
| srv_sel_blocks | Array dimensioned by n_regions, n_years, n_srv_fleets specifying selectivity time blocks. Unique integers denote distinct selectivity parameter blocks |
| srv_sel_model | Array dimensioned by n_regions, n_years, n_srv_fleets specifying the selectivity functional form. 0: Logistic (a50 and slope), 1: Gamma dome-shaped, 2: Power function, 3: Logistic (a50 and a95), 4: Double Normal (6 parameters). Further details in Get_Selex.R |
| srv_selex_type | Integer specifying whether survey selectivity is age-based (0) or length-based (1) |
| use_fixed_srv_sel | Integer specifying whether survey selectivity is fixed externally (1) or estimated (0) |
| srv_q_blocks | Array dimensioned by n_regions, n_years, n_srv_fleets specifying catchability time blocks. Unique integers denote distinct catchability parameter blocks |
| Use_srv_q_prior | Survey catchability prior indicator. 0 == don’t use, 1 == use |
| srv_q_prior | Data frame containing prior specifications for survey catchability parameters. Must include columns: region, fleet, block, mu (prior mean on natural scale), and sd (prior standard deviation on log scale). Each row specifies a log-normal prior for one catchability parameter |
| map_ln_srvsel_devs | Array dimensioned by n_regions, n_years, n_ages, n_sexes, n_srv_fleets indicating which continuous time-varying selectivity deviation values are fixed (mapped off) |
| Use_srv_selex_prior | Integer (0 or 1). Flag to enable log-normal priors on survey selectivity parameters as specified in srv_selex_prior |
| srv_selex_prior | Data frame containing prior specifications for survey selectivity parameters. Must include columns: region, fleet, block, sex, par (parameter index), mu (prior mean on natural scale), and sd (prior standard deviation on log scale). Each row specifies a log-normal prior for one selectivity parameter |
| srvsel_devs_min_shared_bins | Integer vector specifying the reference (minimum) bin index within each shared deviation group, used to subset the bin dimension when evaluating GMRF or 2D AR(1) likelihoods (PE models 3–5). Defaults to 1:n_ages when no bin sharing is specified |
Data Inputs for Defining Model Weighting
| Name | Description |
|---|---|
| Wt_Catch | Weight applied to region-aggregated fishery catch likelihoods. Either a numeric scalar or an array dimensioned by n_regions, n_years, n_seas, n_fish_fleets |
| Wt_Catch_pop | Weight applied to population-specific fishery catch likelihoods. Either a numeric scalar or an array dimensioned by n_pop, n_regions, n_years, n_seas, n_fish_fleets |
| Wt_FishIdx | Weight applied to region-aggregated fishery index likelihoods. Either a numeric scalar or an array dimensioned by n_regions, n_years, n_seas, n_fish_fleets |
| Wt_FishIdx_pop | Weight applied to population-specific fishery index likelihoods. Either a numeric scalar or an array dimensioned by n_pop, n_regions, n_years, n_seas, n_fish_fleets |
| Wt_SrvIdx | Weight applied to region-aggregated survey index likelihoods. Either a numeric scalar or an array dimensioned by n_regions, n_years, n_seas, n_srv_fleets |
| Wt_SrvIdx_pop | Weight applied to population-specific survey index likelihoods. Either a numeric scalar or an array dimensioned by n_pop, n_regions, n_years, n_seas, n_srv_fleets |
| Wt_Rec | Weight applied to initial age deviations and recruitment deviations |
| Wt_F | Weight applied to fishing mortality deviations |
| Wt_D | Weight applied to discard mortality rate deviations |
| Wt_Tagging | Weight applied to tagging data likelihoods |
| Wt_Discard | Weight applied to region-aggregated discard likelihoods. Either a numeric scalar or an array dimensioned by n_regions, n_years, n_seas, n_fish_fleets |
| Wt_Discard_pop | Weight applied to population-specific discard likelihoods. Either a numeric scalar or an array dimensioned by n_pop, n_regions, n_years, n_seas, n_fish_fleets |
| Wt_FishAgeComps | Array dimensioned by n_regions, n_years, n_seas, n_sexes, n_fish_fleets specifying a multinomial weight applied to region-aggregated fishery age compositions, ideally derived using Francis re-weighting |
| Wt_FishAgeComps_pop | Array dimensioned by n_pop, n_regions, n_years, n_seas, n_sexes, n_fish_fleets specifying a multinomial weight applied to population-specific fishery age compositions |
| Wt_FishLenComps | Array dimensioned by n_regions, n_years, n_seas, n_sexes, n_fish_fleets specifying a multinomial weight applied to region-aggregated fishery length compositions, ideally derived using Francis re-weighting |
| Wt_FishLenComps_pop | Array dimensioned by n_pop, n_regions, n_years, n_seas, n_sexes, n_fish_fleets specifying a multinomial weight applied to population-specific fishery length compositions |
| Wt_SrvAgeComps | Array dimensioned by n_regions, n_years, n_seas, n_sexes, n_srv_fleets specifying a multinomial weight applied to region-aggregated survey age compositions, ideally derived using Francis re-weighting |
| Wt_SrvAgeComps_pop | Array dimensioned by n_pop, n_regions, n_years, n_seas, n_sexes, n_srv_fleets specifying a multinomial weight applied to population-specific survey age compositions |
| Wt_SrvLenComps | Array dimensioned by n_regions, n_years, n_seas, n_sexes, n_srv_fleets specifying a multinomial weight applied to region-aggregated survey length compositions, ideally derived using Francis re-weighting |
| Wt_SrvLenComps_pop | Array dimensioned by n_pop, n_regions, n_years, n_seas, n_sexes, n_srv_fleets specifying a multinomial weight applied to population-specific survey length compositions |
| Wt_FishAgeComps_discard | Array dimensioned by n_regions, n_years, n_seas, n_sexes, n_fish_fleets specifying a multinomial weight applied to region-aggregated discard age compositions |
| Wt_FishAgeComps_discard_pop | Array dimensioned by n_pop, n_regions, n_years, n_seas, n_sexes, n_fish_fleets specifying a multinomial weight applied to population-specific discard age compositions |
| Wt_FishLenComps_discard | Array dimensioned by n_regions, n_years, n_seas, n_sexes, n_fish_fleets specifying a multinomial weight applied to region-aggregated discard length compositions |
| Wt_FishLenComps_discard_pop | Array dimensioned by n_pop, n_regions, n_years, n_seas, n_sexes, n_fish_fleets specifying a multinomial weight applied to population-specific discard length compositions |