Specify the growth model for Rceattle
Arguments
- fun
Growth function. Either a string (GROWTH_FUNS:
"empirical"(default),"vonBertalanffy","Richards") or the equivalent integer code (0,1,2). The canonical string form is stored on the returned object.- growth_age_L1
Von Bertalanffy / Richards anchor age (the age at which mean length equals
L1). Matches SS3'sGrowth_Age_for_L1control input. Scalar (recycled across species) or a length-nsppvector for per-species values. DefaultNAinheritsdata_list$growth_age_L1if supplied (e.g. from the SS3 converter), otherwise falls back tomax(0.5, minage[sp])sominage >= 1models stay backwards-compatible andminage = 0models pick up an SS3-consistent half-year anchor.- linkages
Optional named list of
linkage_spec()objects keyed by parameter name (must be one of GROWTH_LINKAGE_PARAMS). The mean-growth keys (K,L1,Linf,m) accept arbitrary one-sided formulas and produce year-varying offsets applied insidegrowth.hpp. The SD-endpoint keys (sd_L1,sd_Linf) only honor intercept-bearing formulas (typically~ 1) – they threadinit,bounds, andpriorsonto the underlyinggrowth_log_sdparameter, giving the SDs the same prior/fix/initial-value contract as the mean parameters. Slope rows on SD specs raise a warning and have no effect; slope-only formulas (~ 0 + temp) error. Materialization into the global linkage table happens insidefit_mod()oncedata_list$env_datais in scope.
Examples
if (FALSE) { # \dontrun{
# Sex-specific von Bertalanffy with temperature on K, by species + sex
build_growth(
fun = "vonBertalanffy", # or fun = 1
linkages = list(
K = linkage_spec(
formula = ~ temp,
by = ~ species + sex,
priors = list(temp = normal(0, 1))
)
)
)
} # }