Constructs selectivity-at-age by series and year from log-selectivity blocks that begin in configured change years.
Usage
get_selectivity(
n_age,
max_age,
first_yr,
first_yr_catch,
sel_min_age_f,
sel_max_age_f,
sel_end_f,
sel_change_year_fy,
par_log_sel
)Arguments
- n_age
An
integerspecifying the total number of ages in the model.- max_age
An
integerspecifying the maximum model age.- first_yr
An
integerspecifying the model start year.- first_yr_catch
A
vectorof integers specifying the first catch year for each fishery.- sel_min_age_f
A
vectorof integers specifying the minimum age for selectivity estimation for each fishery.- sel_max_age_f
A
vectorof integers specifying the maximum age for selectivity estimation for each fishery.- sel_end_f
A
logicalvector indicating whether to extend the final selectivity value across remaining ages for each fishery.- sel_change_year_fy
A
matrixwith dimensions (fishery, year) indicating change years for selectivity.- par_log_sel
A
listof matrices containing changes in selectivity values in log-space.
Details
Each series must have a change block at its first modeled catch
year and one parameter row for every nonzero element of
sel_change_year_fy. Within each block, selectivity is normalized
to mean one over the estimated age range. When sel_end_f is true,
the final estimated value is extended through the terminal age. This
low-level RTMB helper assumes those configuration contracts were checked
by the data-preparation workflow.
