Calculates the age-to-length transition matrix under von Bertalanffy or
Richards growth with a Stock Synthesis plus-group correction; like
growth.hpp, adapted from Giancarlo Correa's growth code in WHAM's growth
branch.
Usage
get_growth_matrix_r(
fracyr,
nsex_sp,
nages_sp,
nlengths_sp,
nyrs,
lengths_sp,
minage_sp,
maxage_sp,
growth_params_sp,
growth_log_sd_sp,
growth_model_sp,
M_plus_sp
)Arguments
- fracyr
Numeric fraction of the year (
0= Jan 1).- nsex_sp
Integer number of sexes for the species.
- nages_sp
Integer number of age classes.
- nlengths_sp
Integer number of length bins.
- nyrs
Integer number of years in the simulation.
- lengths_sp
Numeric vector of the
nlengths_splength-bin lower edges (cm); the first bin is open below and the last open above.- minage_sp
Numeric reference age (
L1) for growth estimation.- maxage_sp
Unused by the body;
helpers-make-msm-data.Rpasses it.- growth_params_sp
Numeric
[sex, yr, 4]array ofK,L1,Linf, and Richardsm.- growth_log_sd_sp
Numeric
[sex, 2]array of log length SD atminageandmaxage.- growth_model_sp
Integer growth code (
1= von Bertalanffy,2= Richards).- M_plus_sp
Numeric natural mortality at the oldest age (scalar or per sex), weighting ages pooled in the plus group by survival to match the TMB growth model.