Skip to contents

Recruitment is the number of fish entering the youngest modeled age. Use rec_settings$process for annual fluctuations and rec_settings$mu_form for environmental effects or a relationship with spawning biomass. The default process = "rw", mu_form = NULL retains the original random walk.

Usage

bh(ssb, lag = NULL)

ricker(ssb, lag = NULL)

Arguments

ssb

The literal ssb, referring to modeled spawning stock biomass.

lag

Non-negative integer parent-year lag. NULL uses the youngest modeled age. SSB uses the supplied data$maturity$spawn_time, default zero.

Value

Formula markers; direct calls raise an error.

Details

Choose "iid", "rw", or "ar1" in process; process markers and grouping are not supported in recruitment mean formulas. Off/IID/AR1 require mu_form, with ~ 1 for a constant baseline. Ordinary covariates are read from data$pop_covariates at the youngest modeled age; their values at older ages may be NA. Covariates refer to the recruitment year. Construct lagged or standardized columns explicitly. Covariate coefficients are estimated; offset() terms are not supported. Projections hold their terminal values and announce that assumption.

bh(ssb) rises toward a plateau; ricker(ssb) can decline at high spawning biomass. Either curve supports deterministic recruitment or IID/AR1 residuals. These curves describe median recruitment, not the arithmetic mean, and use the model's existing SSB at data$maturity$spawn_time (start-of-year by default) and supplied weight/maturity units. Spawning timing may vary by year and age, changes both reported and parent SSB, and uses terminal age-specific values in projections. With parent biomass \(S_{t-L}\), their definitions are $$g_{BH}(S)=\alpha S/(1+\beta S),\qquad g_{Ricker}(S)=\alpha S\exp(-\beta S),\quad \alpha,\beta>0.$$ $$\log R_t=\log g(S_{t-L})+X_t\gamma+u_t.$$ The curve supplies its baseline, so the ordinary intercept is omitted. IID residuals have variance \(\sigma_R^2\). AR1 residuals obey \(u_t=\phi u_{t-1}+\epsilon_t\), with innovation variance \(\sigma_R^2\) and stationary first variance \(\sigma_R^2/(1-\phi^2)\). No lognormal mean correction is applied. Alpha has recruitment-number/SSB units; beta has inverse-SSB units. Both are optimized on the log scale, independently of equilibrium assumptions.

Without a curve, IID/AR1 use \(\log R_t=X_t\gamma+u_t\). A RW instead obeys $$\log R_t-\log R_{t-1}=(X_t-X_{t-1})\gamma+\epsilon_t.$$ Constant columns cancel and are removed. sd is estimated unless supplied; estimated AR1 correlation is positive, or a fixed phi in [0, 1) can be supplied. See formula_effects for these process conventions.

With process = "off", an explicit mu_form determines eligible recruitment exactly, without an annual random state, process SD or residual density. For example, ~ 1 gives constant recruitment after the boundary years; ~ bh(ssb) gives a deterministic stock-recruit curve. Supplied sd and phi must be NULL. Parameter uncertainty and stochastic parent SSB can still give uncertain recruitment; no direct recruitment noise is drawn. An annual factor(year) or as.factor(year) effect is fitted only to eligible historical years. Projections reuse its terminal historical coefficient rather than introducing future-year coefficients. Numeric year trends continue to be evaluated at the projected year; other covariates retain their terminal values.

First-year log_r0 and additional recruitment years whose parent SSB precedes the modeled period (log_r_init) have no initial density. With rec_settings$init = "free" (default) they are fixed parameters; "latent" integrates them through the Laplace approximation, independently of the subsequent process, including process = "off". There is no separate initial SD. Process simulations condition on these states; joint uncertainty draws can vary them. Later log_r values are absolute random log states when the process is enabled; residuals are calculated internally, without an additional annual random-effect block. The relationship does not reconstruct pre-model SSB. AR1 starts at the first eligible year with its stationary density. A zero lag is allowed only when recruits contribute no mature biomass. Changing recruitment age changes the default lag and boundary states.

A converged fit does not establish that a curve's shape is well estimated. Limited SSB variation, correlated covariates, and other population processes can obscure the relationship. Inspect check_tam() and recovery simulations.

Examples

list(process = "rw", mu_form = NULL)
#> $process
#> [1] "rw"
#> 
#> $mu_form
#> NULL
#> 
list(process = "off", mu_form = ~1)
#> $process
#> [1] "off"
#> 
#> $mu_form
#> ~1
#> <environment: 0x5edf855db6d8>
#> 
list(process = "off", mu_form = ~ bh(ssb))
#> $process
#> [1] "off"
#> 
#> $mu_form
#> ~bh(ssb)
#> <environment: 0x5edf855db6d8>
#> 
list(process = "iid", mu_form = ~1)
#> $process
#> [1] "iid"
#> 
#> $mu_form
#> ~1
#> <environment: 0x5edf855db6d8>
#> 
list(process = "iid", mu_form = ~ bh(ssb))
#> $process
#> [1] "iid"
#> 
#> $mu_form
#> ~bh(ssb)
#> <environment: 0x5edf855db6d8>
#> 
list(process = "ar1", mu_form = ~ ricker(ssb, lag = 2))
#> $process
#> [1] "ar1"
#> 
#> $mu_form
#> ~ricker(ssb, lag = 2)
#> <environment: 0x5edf855db6d8>
#> 
# Add temperature to data$pop_covariates at the youngest modeled age, then use:
list(process = "iid", mu_form = ~ bh(ssb) + temperature)
#> $process
#> [1] "iid"
#> 
#> $mu_form
#> ~bh(ssb) + temperature
#> <environment: 0x5edf855db6d8>
#> 
# Runnable fitting examples are in inst/examples/example_recruitment.R.