Map fishery composition overdispersion (theta) parameters
do_comp_theta_mapping.RdConstructs factor maps for a composition overdispersion parameter (e.g.
ln_FishAge_theta) and its aggregated counterpart (e.g.
ln_FishAge_theta_agg) based on the composition type and likelihood
specified in the corresponding $data fields. Parameters are mapped
to NA for fleets using multinomial likelihoods (LikeType ==
0), with no observed compositions, or (per-region/per-pop-region) with no
active comps for that cell.
Usage
do_comp_theta_mapping(
input_list,
comp_prefix,
discard = FALSE,
has_pop = FALSE,
fleet_field = "n_fish_fleets"
)Arguments
- input_list
Named list with
$data,$par, and$mapsublists.- comp_prefix
Character, either
"FishAge"or"FishLen".- discard
Logical. If
TRUE, maps the discard variant (..._discard_...fields). DefaultFALSE.- has_pop
Logical. If
TRUE, maps the population-specific variant (..._pop_...fields, with an added population dimension and loop). DefaultFALSE.- fleet_field
Character. Name of the
$datafield giving the number of fleets to loop over. Default"n_fish_fleets"; pass"n_srv_fleets"for survey composition types ("SrvAge","SrvLen"), which have nodiscardvariant.