Run per-recruit SPR and YPR calculations
run_spr.RdComputes spawning potential ratio (SPR) and yield per recruit (YPR) across a
range of fishing mortality values for a single stock or multispecies complex
defined by spr_input(). The function returns species-specific and
combined (total) SPR(F) and YPR(F) curves, SPR-based fishing mortality
reference points (e.g., F40, F35), and optional decomposition diagnostics.
Arguments
- x
An object returned by
spr_input()defining ages and species-specific life history schedules.- F_vec
Numeric vector of fishing mortality values (F) to evaluate. Must be finite and >= 0.
- spr_targets
Numeric vector of SPR targets in (0,1), for example
c(0.40, 0.35).- multispecies_constraint
Character string specifying whether to apply a multispecies constraint when selecting combined reference points. Options are:
"none"Unconstrained reference points are based on the combined SPR curve only.
"all_species"Constrained combined reference points, all species must meet the target SPR.
- diagnostics
Logical. If TRUE, returns plus-group diagnostics and age-specific decompositions.
Value
A named list with the following elements:
F_vecFishing mortality grid used for calculations.
spr_targetsSPR targets requested.
multispecies_constraintConstraint setting used.
SPR_totalCombined SPR(F) across species (length =
length(F_vec)).YPR_totalCombined YPR(F) across species (length =
length(F_vec)).SPR_by_speciesNamed list of species-specific SPR(F) vectors.
YPR_by_speciesNamed list of species-specific YPR(F) vectors.
F_spr_totalNamed numeric vector of combined reference points (nearest-grid match), for example
F40_totalandF35_total.F_spr_total_constrainedNamed numeric vector of constrained combined reference points when
multispecies_constraint="all_species"; otherwiseNULL.F_spr_by_speciesNamed list of species-specific reference points for each SPR target.
diagnosticsA list with elements:
Ftarget: the fishing mortality value used for diagnostics (defaults to the first target, and uses constrainedFtargetwhen available),plus_share: plus-group share table (orNULLifdiagnostics=FALSE),decomp: age-specific decomposition data frame (orNULLifdiagnostics=FALSE).
Details
SPR and YPR. For each species, unfished spawning biomass per recruit (\(SBPR_{i,0}\)) and fished \(SBPR_i(F)\) are computed from survivorship-at-age, weight-at-age, and maturity-at-age. SPR for species \(i\) is defined as \(SPR_i(F) = SBPR_i(F) / SBPR_{i,0}\). YPR is computed using the Baranov catch equation in biomass units and age-specific fishery selectivity.
Multispecies complexes. For multispecies inputs, species-specific SBPR and YPR are computed separately using each species' life history schedules. Let \(SBPR_i(F)\) denote spawning biomass per recruit for species \(i\) at fishing mortality \(F\), where \(SBPR_i(F)\) is scaled by its unfished recruitment \(R_{0,i}\) via the initial numbers-at-age. Complex-level spawning biomass per recruit is computed by summation, $$ SBPR_{total}(F) = \sum_i SBPR_i(F), \qquad SBPR_{total,0} = \sum_i SBPR_{i,0}, $$ and the combined SPR curve is obtained by $$ SPR_{total}(F) = SBPR_{total}(F) / SBPR_{total,0}. $$ The combined, or complex-level SBPR is used to calculate the "Unconstrained" multispecies reference points.
SPR reference points. Fishing mortality reference points are reported for:
the combined complex (
F_spr_total), based on matching the combined SPR curve to each value inspr_targetsusing a grid search approach, andeach species individually (
F_spr_by_species).
Multispecies constraint. When multispecies_constraint = "all_species",
the constrained complex-level reference point for target \(x\) is selected as the
largest value of \(F\) on F_vec such that every species meets the SPR target,
$$
SPR_i(F) \ge x \;\; \text{for all } i,
$$
and the combined curve also meets the target. This implementation corresponds to a
limiting-species constraint and is approximately equivalent to
\(\min_i F_{x,i}\) up to the resolution of the F_vec grid.
Diagnostics and decomposition outputs. When diagnostics = TRUE, the output includes:
diagnostics$plus_share: the fraction of total SBPR contributed by the terminal age (often a plus group) at F = 0 and at the diagnostic reference FFtarget, anddiagnostics$decomp: an age-specific df containing survivorship, maturity, selectivity, weight-at-age, M-at-age, SBPR contributions, and SBPR removed (F0 minus Ftarget) for each species at F = 0 and F = Ftarget.
These diagnostics can be visualized with plot_spr_decomp().
Examples
if (FALSE) { # \dontrun{
# Assume inp is a spr_input() object (single species or multispecies).
# Run per-recruit calculations and request decomposition diagnostics.
spr_out <- run_spr(inp, diagnostics = TRUE,
multispecies_constraint = "all_species")
# reference points
spr_out$F_spr_total
spr_out$F_spr_total_constrained
spr_out$F_spr_by_species
# Plot SPR(F) curves, complex-level SPR and species-specific SPRs
# plot_spr_curves(spr_out, which = "total")
# plot_spr_curves(spr_out, which = "species")
# Decomposition diagnostics
plots <- plot_spr_decomp(spr_out, drop_plus_from_plot = TRUE)
plots$contrib
plots$removed
plots$survivorship
# Plus-group diagnostic table (fraction of SBPR in terminal age)
spr_out$diagnostics$plus_share
} # }