Learn R Programming

SlotLim (version 0.0.2)

prop_target: prop_target

Description

Calculates the proportion of normalized survivorship \(S(L)\) falling inside harvest slot limits [minLS, maxLS] relative to the exploitable population (>L_c), where \(S(L) = \exp(-M \, t(L))\) and \(t(L)\) is the inverse age-from-length for a chosen growth model.

Usage

prop_target(
  minLS = NULL,
  maxLS = NULL,
  Lc = NULL,
  M = NULL,
  growth_model = c("vb", "gompertz", "schnute"),
  Linf = NULL,
  K = NULL,
  l0 = 0,
  tmax = NULL,
  Gom_Linf = NULL,
  Gom_K = NULL,
  Gom_l0 = NULL,
  g1 = NULL,
  g2 = NULL,
  l2 = NULL,
  Lmin = NULL,
  plot = FALSE,
  length_units = NULL
)

Value

If plot = FALSE (default): numeric scalar (the targeted proportion). If plot = TRUE: list with proportion and plot (a ggplot object).

Arguments

minLS, maxLS

Numeric. Minimum and maximum harvest slot limits (same units as length).

Lc

Numeric. Lower cutoff; individuals below Lc are not exploitable.

M

Numeric or NULL. Natural mortality. If NULL, defaults to \(M = 4.899\,t_{max}^{-0.916}\).

growth_model

Character. One of "vb", "gompertz", "schnute".

Linf, K, l0

VB parameters; l0 is the start length (default 0).

tmax

Numeric. Maximum age used to determine \(l(t_{max})\) and set the upper integration bound.

Gom_Linf, Gom_K, Gom_l0

Gompertz parameters; requires 0 < Gom_l0 < Gom_Linf.

g1, g2, l2

Schnute parameters; l2 = l(t_{max}); requires g1 > 0, l2 > 0, g2 != 0.

Lmin

Optional numeric. Lower bound for the curve grid. If NULL it uses the model’s start length (l0, Gom_l0, or 0).

plot

Logical. If TRUE, return a ggplot2 visual; default FALSE.

length_units

Optional character scalar. Units to display in the x-axis label when plot = TRUE (e.g., "cm" or "mm"). If NULL (default), the label is simply "Length".

Details

Supported growth models (reparameterized to avoid negative length-at-age-0 and to give exact \(t(L_{start})=0\)):

  • von Bertalanffy (VB) with start length \(l_0\): $$t(l) = -\frac{1}{K}\ln\!\left(\frac{L_\infty - l}{L_\infty - l_0}\right), \quad l(t) = L_\infty\!\left(1 - (1-l_0/L_\infty)\,e^{-Kt}\right).$$

  • Gompertz with start length \(l_0\) (requires \(0 < l_0 < L_\infty\)): $$t(l) = -\frac{1}{K}\ln\!\left(\frac{\ln(l/L_\infty)}{\ln(l_0/L_\infty)}\right), \quad l(t) = L_\infty\,(l_0/L_\infty)^{e^{-Kt}}.$$

  • Schnute with \(l(0)=0\) and \(l(t_{max})=l_2\): $$t(l) = -\frac{1}{g_1}\ln\!\left(1 - \frac{l^{g_2}}{l_2^{g_2}}\,(1-e^{-g_1 t_{max}})\right), \quad l(t) = \left(\frac{l_2^{g_2}}{1-e^{-g_1 t_{max}}}\,(1-e^{-g_1 t})\right)^{1/g_2}.$$

Survivorship is normalized at the model start so that \(S(L_{start})=1\): l0 for vB, Gom_l0 for Gompertz (requires 0 < Gom_l0 < Gom_Linf), and \(0\) for Schnute.

Targeted proportion: $$\frac{\int_{\max(minLS,L_c)}^{\min(maxLS,\,l(t_{max}))} S(L)\,dL}{ \int_{\max(L_c,\,L_{start})}^{l(t_{max})} S(L)\,dL}.$$ We clamp only near the upper limit to avoid log(0) and never shift the start, preserving \(t(L_{start})=0\).

Examples

Run this code
# Numeric only
prop_target(minLS=120, maxLS=240, Lc=80,
  growth_model="vb", Linf=405, K=0.118, l0=0, tmax=34, plot=FALSE)

# \donttest{
# With plot (requires ggplot2)
out <- prop_target(minLS=120, maxLS=240, Lc=80,
  growth_model="schnute", g1=0.2, g2=0.2, l2=405, tmax=34, plot=TRUE, length_units = "mm")
out$plot
# }

Run the code above in your browser using DataLab