Set up fishing mortality, discard mortality, and catch observation inputs
Setup_Mod_Catch_and_F.RdPopulates input_list with observed catch, catch usage indicators,
fishing mortality parameters (ln_F_mean, ln_F_devs), and
observation/process error structures (ln_sigmaC, ln_sigmaC_pop,
ln_sigmaF). Also populates discard observations, discard mortality
rate parameters (logit_dmr_mean, logit_dmr_devs), and
discard observation/process error structures (ln_sigmaD,
ln_sigmaD_pop, ln_sigma_dmr).
Must be called after Setup_Mod_Biologicals.
Usage
Setup_Mod_Catch_and_F(
input_list,
ObsCatch,
UseCatch,
catch_units = array("biom", dim = c(input_list$data$n_fish_fleets)),
UseCatch_pop = array(0, dim = c(input_list$data$n_pop, input_list$data$n_regions,
length(input_list$data$years), input_list$data$n_seas,
input_list$data$n_fish_fleets)),
ObsCatch_pop = NULL,
Use_F_pen = 1,
sigmaC_spec = "fix",
sigmaC_pop_spec = "fix",
sigmaF_spec = "fix",
Fdev_model = "iid",
Fdev_rho_spec = "fix",
ObsDiscard = NULL,
UseDiscard = array(0, dim = c(input_list$data$n_regions, length(input_list$data$years),
input_list$data$n_seas, input_list$data$n_fish_fleets)),
discard_units = array("biom_frac", dim = c(input_list$data$n_fish_fleets)),
UseDiscard_pop = array(0, dim = c(input_list$data$n_pop, input_list$data$n_regions,
length(input_list$data$years), input_list$data$n_seas,
input_list$data$n_fish_fleets)),
ObsDiscard_pop = NULL,
Use_dmr_pen = 0,
sigmaD_spec = "fix",
sigmaD_pop_spec = "fix",
sigma_dmr_spec = "fix",
dmr_mean_spec = "fix",
dmr_dev_spec = "fix",
...
)Arguments
- input_list
Named list with
$data,$par,$map, and$verbosesublists, as returned by upstream setup functions.- ObsCatch
Observed aggregated catch array
[n_regions x n_years x n_seas x n_fish_fleets]. Values should be in the units specified bycatch_units. For a cell withUseCatch == 0(and no population-specific catch used), anNAentry here is treated as a genuinely missing observation – fishing is assumed to have continued andFmort/ln_F_devsare estimated normally for that year – whereas a true recorded value (typically0) is treated as a real closure:Fmortis forced to zero and no deviation is estimated. SeeGet_Fdev_PE_loglik.- UseCatch
Binary indicator array
[n_regions x n_years x n_seas x n_fish_fleets]controlling which aggregated catch observations enter the likelihood and whetherln_F_devsare estimated for each cell.1= use;0= exclude, unlessObsCatchisNAat that cell (seeObsCatchabove), in which caseln_F_devsis still estimated as an ordinary active year despite not being fit against an observation.- catch_units
Character array
[n_fish_fleets]specifying catch units per fleet."biom"= biomass (default);"abd"= abundance. Converted internally to0/1integer codes.- UseCatch_pop
Binary indicator array
[n_pop x n_regions x n_years x n_seas x n_fish_fleets]controlling which population-specific catch observations enter the likelihood.1= use;0= exclude.- ObsCatch_pop
Observed population-specific catch array
[n_pop x n_regions x n_years x n_seas x n_fish_fleets]. Values should be in the units specified bycatch_units.- Use_F_pen
Integer flag for applying a fishing mortality penalty to penalise large deviations in
ln_F_devs.1= apply (default);0= do not apply.- sigmaC_spec
Character string specifying the sharing structure for
ln_sigmaC(aggregated catch observation error SD). Default"fix"holdsln_sigmaCat its starting value (log(0.01)unless overridden via...). Sharing options follow the convention"est_shared_<dims>"where<dims>is an underscore-separated list of dimensions to collapse:"r"(regions),"y"(years),"seas"(seasons),"f"(fleets), or any combination (e.g.,"est_shared_r_y","est_shared_r_y_seas_f"). Use"est_all"for a fully independent parameter per cell. A warning is issued if"fix"is selected without providing a starting value in....- sigmaC_pop_spec
Character string specifying the sharing structure for
ln_sigmaC_pop(population-specific catch observation error SD). Default"fix"holdsln_sigmaC_popat its starting value (log(0.01)unless overridden via...). Sharing options follow the same convention assigmaC_specbut with an additional population dimension: e.g.,"est_shared_pop"shares across populations,"est_shared_pop_r"shares across populations and regions, and"est_shared_pop_r_y_seas_f"collapses all dimensions into a single parameter. A warning is issued if"fix"is selected without providing a starting value in....- sigmaF_spec
Character string specifying the sharing structure for
ln_sigmaF(fishing mortality process error SD). Default"fix"holdsln_sigmaFat its starting value (log(1), i.e., \(\sigma_F = 1\), unless overridden via...). A warning is issued if"fix"is selected without providing a starting value in....- Fdev_model
Character string specifying the process error structure for
ln_F_devs. One of"iid"(default; independent deviations),"rw"(random walk; the first catch-active year per region/season/fleet is initialized with a diffuse \(N(0,5)\) prior), or"ar1"(first-order autoregressive; the first catch-active year is drawn from its stationary marginal distribution, andFdev_rho_speccontrols the AR1 correlation parameter). Catch-active years do not need to be contiguous for"rw"or"ar1": the transition between two active years spanning a gap of \(d\) closed years is taken over the elapsed gap directly (the same marginal transition as estimating deviations for the closed years and integrating them out, without actually estimating them) – seeGet_Fdev_PE_loglik. A warning is issued if"rw"or"ar1"is selected butUse_F_pen = 0(the penalty is never evaluated, so the process structure has no effect),sigmaF_spec = "fix"(the process error SD is not estimated), or (for"ar1")Fdev_rho_spec = "fix"(the correlation is not estimated) – any of these may be intentional, but are common oversights when switching away from"iid".- Fdev_rho_spec
Character string specifying the sharing structure for the AR1 correlation parameter
Fdev_rho, following the same convention assigmaF_spec. Only used whenFdev_model = "ar1"; ignored (and mapped entirely toNA) otherwise.- ObsDiscard
Observed aggregated discard array
[n_regions x n_years x n_seas x n_fish_fleets]. Values should be in the units specified bydiscard_units. Default:NULL(no discard observations).- UseDiscard
Binary indicator array
[n_regions x n_years x n_seas x n_fish_fleets]controlling which aggregated discard observations enter the likelihood.1= use;0= exclude. Default: all zeros.- discard_units
Character array
[n_fish_fleets]specifying discard units per fleet."abd"= abundance (0),"biom"= biomass (1),"abd_frac"= abundance fraction (2),"biom_frac"= biomass fraction (3, default). Converted internally to integer codes.- UseDiscard_pop
Binary indicator array
[n_pop x n_regions x n_years x n_seas x n_fish_fleets]controlling which population-specific discard observations enter the likelihood.1= use;0= exclude. Default: all zeros.- ObsDiscard_pop
Observed population-specific discard array
[n_pop x n_regions x n_years x n_seas x n_fish_fleets]. Values should be in the units specified bydiscard_units. Default:NULL(no population-specific discard observations).- Use_dmr_pen
Integer flag for applying a discard mortality rate penalty to penalise large deviations in
logit_dmr_devs.1= apply;0= do not apply (default). Must be1whendmr_dev_spec = "est_all"and0whendmr_dev_spec = "fix".- sigmaD_spec
Character string specifying the sharing structure for
ln_sigmaD(aggregated discard observation error SD). Default"fix"holdsln_sigmaDat its starting value (log(0.01)unless overridden via...). Sharing options follow the same convention assigmaC_spec. A warning is issued if"fix"is selected without providing a starting value in....- sigmaD_pop_spec
Character string specifying the sharing structure for
ln_sigmaD_pop(population-specific discard observation error SD). Default"fix"holdsln_sigmaD_popat its starting value (log(0.01)unless overridden via...). Sharing options follow the same convention assigmaC_pop_spec. A warning is issued if"fix"is selected without providing a starting value in....- sigma_dmr_spec
Character string specifying the sharing structure for
ln_sigma_dmr(discard mortality rate process error SD). Default"fix"holdsln_sigma_dmrat its starting value (log(1)unless overridden via...). Sharing options follow the same convention assigmaF_spec. A warning is issued if"fix"is selected without providing a starting value in....- dmr_mean_spec
Character string specifying the sharing/estimation structure for
logit_dmr_mean(logit-scale mean discard mortality rate). Default"fix"holds at its starting value (0, i.e., DMR = 0.5 on the natural scale, unless overridden via...). Seedo_dmr_mean_mappingfor sharing options.- dmr_dev_spec
Character string specifying the sharing/estimation structure for
logit_dmr_devs(logit-scale annual discard mortality rate deviations). Default"fix"holds deviations at zero (unless overridden via...). Use"est"to estimate deviations; requiresUse_dmr_pen = 1. Seedo_dmr_dev_mappingfor sharing options.- ...
Optional starting value overrides for catch and discard related parameters.
Value
The input input_list with $data, $par, and
$map updated. Key additions:
$dataObsCatch,ObsCatch_pop,UseCatch,UseCatch_pop,Use_F_pen,catch_units,Fdev_model,ObsDiscard,ObsDiscard_pop,UseDiscard,UseDiscard_pop,Use_dmr_pen,discard_units.$parln_sigmaC,ln_sigmaC_pop,ln_sigmaF,Fdev_rho,ln_F_mean,ln_F_devs,ln_sigmaD,ln_sigmaD_pop,ln_sigma_dmr,logit_dmr_mean,logit_dmr_devs.$mapln_sigmaC,ln_sigmaC_pop,ln_sigmaF,Fdev_rho,ln_F_devs,ln_sigmaD,ln_sigmaD_pop,ln_sigma_dmr,logit_dmr_mean,logit_dmr_devs.
See also
Other Model Setup:
Setup_Mod_Biologicals(),
Setup_Mod_Dim(),
Setup_Mod_Discard_Comps(),
Setup_Mod_FishIdx_and_Comps(),
Setup_Mod_Fishsel_and_Q(),
Setup_Mod_Movement(),
Setup_Mod_Rec(),
Setup_Mod_Retsel(),
Setup_Mod_SrvIdx_and_Comps(),
Setup_Mod_Srvsel_and_Q(),
Setup_Mod_Tagging(),
Setup_Mod_Weighting()