Skip to contents

Collect recruitment predictions, process residuals, and (when specified) parent SSB/recruitment pairs and the fitted stock-recruit curve. Early fixed boundary recruitment states are excluded from process diagnostics.

Usage

tidy_recruitment(fit, interval = 0.95)

Arguments

fit

A fitted tam_fit object.

interval

Confidence level, default 0.95.

Value

A named list of tables: mean, prediction, residual, innovation, and, for stock-recruit models, pairs, curve, and reference.

Details

Recruitment and curve estimates are medians with log-scale SEs. Residuals are signed log-scale deviations with SEs on their reported scale. RW residuals are increments; AR1 residuals are deviations from the baseline, while innovations remove the preceding residual's predicted contribution. Deterministic recruitment has no residual/innovation tables; stock-recruit pairs retain missing residual values and available derived uncertainty. The curve is evaluated at median historical numeric covariates and reference factor levels. reference identifies those values. Curve intervals use the exact curve derivatives and RTMB's fixed-parameter covariance (the delta method); pair/prediction/residual uncertainty comes from ADREPORT. Missing uncertainty remains NA. Curve intervals do not include new process noise. Recruitment predictions and curves carry abundance unit labels when supplied. Pair/curve parent_unit identifies the SSB scale separately.

Examples

if (FALSE) { # \dontrun{
fit <- fit_tam(cod_obs,
  N_settings = list(process = "off"),
  rec_settings = list(process = "iid", mu_form = ~ bh(ssb))
)
tidy_recruitment(fit)$pairs
} # }