Setup biological inputs for estimation model
Setup_Mod_Biologicals.Rd
Setup biological inputs for estimation model
Usage
Setup_Mod_Biologicals(
input_list,
WAA,
WAA_fish = NULL,
WAA_srv = NULL,
MatAA,
addtocomp = 0.001,
AgeingError = NULL,
Use_M_prior = 0,
M_prior = NA,
fit_lengths = 0,
SizeAgeTrans = NA,
Selex_Type = "age",
M_spec = NULL,
Fixed_natmort = NULL,
...
)
Arguments
- input_list
List containing data, parameter, and map lists for the model.
- WAA
Numeric array of weight-at-age (spawning), dimensioned
[n_regions, n_years, n_ages, n_sexes]
.- WAA_fish
Numeric array of weight-at-age (fishery), dimensioned
[n_regions, n_years, n_ages, n_sexes, n_fish_fleets]
.- WAA_srv
Numeric array of weight-at-age (survey), dimensioned
[n_regions, n_years, n_ages, n_sexes, n_srv_fleets]
.- MatAA
Numeric array of maturity-at-age, dimensioned
[n_regions, n_years, n_ages, n_sexes]
.- addtocomp
Numeric value for a constant to add to composition data. Default is 1e-3.
- AgeingError
Numeric matrix or array representing the ageing error transition matrix. If a matrix (2D), dimensions should be
[number of modeled ages, number of observed composition ages]
and the ageing error is assumed to be constant over time. If an array (3D), dimensions should be[number of years, number of modeled ages, number of observed composition ages]
allowing ageing error to vary by year. Defaults to an identity matrix (no ageing error) if not specified, assuming observed age bins exactly match modeled age bins.**Note:** If the observed age composition bins differ from the modeled age bins (e.g., observed ages 2–10 while modeled ages are 1–10), the default identity matrix will cause a dimensional mismatch and misalignment. In such cases, users should provide a custom ageing error matrix mapping modeled to observed ages. For example, to drop the first modeled age bin, supply a matrix like
diag(1, 10)[, 2:10]
. This ensures proper alignment of age bins for likelihood calculations.- Use_M_prior
Integer flag indicating whether to apply a natural mortality prior (
0
= no,1
= yes).- M_prior
Numeric vector of length two giving the mean (in normal space) and standard deviation of the natural mortality prior.
- fit_lengths
Integer flag indicating whether to fit length data (
0
= no,1
= yes).- SizeAgeTrans
Numeric array of size-at-age transition probabilities, dimensioned
[n_regions, n_years, n_lens, n_ages, n_sexes]
.- Selex_Type
Character string specifying whether selectivity is age or length-based. Default is age-based
"length"
: Length-based selectivity."age"
: Age-based selectivity
- M_spec
Character string specifying natural mortality estimation approach. Defaults to
NULL
, which estimates mortality for each sex independently. Other options:"est_ln_M_only"
: Estimate a single natural mortality rate shared across sexes (ifn_sexes == 2
)."fix"
: Fix all natural mortality parameters using the provided array.
- Fixed_natmort
Numeric array of fixed natural mortality values, dimensioned
[n_regions, n_years, n_ages, n_sexes]
. Required ifM_spec = "fix"
.- ...
Additional arguments for starting values such as
ln_M
andM_offset.
These are ignored ifM_spec = fix
.