Learn R Programming

MSEtool (version 1.5.0)

SRA_scope: Stock-reduction analysis (SRA) for conditioning operating models

Description

Intended for conditioning operating models for data-limited stocks. From a historical time series of total catch or effort, and potentially age/length compositions and multiple indices of abundance, the SRA returns a range of values for depletion, selectivity, unfished recruitment (R0), historical fishing effort, and recruitment deviations for the operating model. This is done by sampling life history parameters provided by the user and fitting to the data in a statistical catch-at-age model (with the predicted catch equal to the observed catch). This function is intended to generate a range of potential depletion scenarios that could be supported from sparse data. Either a full catch (conditioned on catch) or effort (conditioned on effort) time series is needed but missing data (as NAs) are allowed for all other data types.

Usage

SRA_scope(
  OM,
  data = list(),
  condition = c("catch", "catch2", "effort"),
  selectivity = "logistic",
  s_selectivity = NULL,
  LWT = list(),
  comp_like = c("multinomial", "lognormal"),
  ESS = c(30, 30),
  max_F = 3,
  cores = 1L,
  integrate = FALSE,
  mean_fit = FALSE,
  drop_nonconv = FALSE,
  drop_highF = FALSE,
  control = list(iter.max = 2e+05, eval.max = 4e+05),
  ...
)

Sub_cpars(OM, sims = 1:OM@nsim)

Arguments

OM

An object of class '>OM that specifies natural mortality (M), growth (Linf, K, t0, a, b), stock-recruitment relationship, steepness, maturity parameters (L50 and L50_95), standard deviation of recruitment variability (Perr), as well as index uncertainty (Iobs).

data

A list of data inputs. See Data section below.

condition

String to indicate whether the SRA model is conditioned on "catch" (where F is estimated), "catch2" (where F is solved internally using Newton's method), or "effort".

selectivity

A character vector of length nfleet to indicate "logistic" or "dome" selectivity for each fleet in Chist.

s_selectivity

A vector of length nsurvey to indicate "logistic" or "dome" selectivity for each survey in Index. Use a number for an age-specific index. Only used if any of the corresponding entries of data$I_type = "est" or if a number is specified here.

LWT

A named list of likelihood weights for the SRA model. See details.

comp_like

A string indicating either "multinomial" (default) or "lognormal" distributions for the composition data.

ESS

If comp_like = "multinomial", a numeric vector of length two to cap the maximum effective samples size of the age and length compositions, respectively, for the multinomial likelihood function. The effective sample size of an age or length composition sample is the minimum of ESS or the number of observations (sum across columns). For more flexibility, set ESS to be very large and alter the arrays as needed.

max_F

The maximum F for any fleet in the scoping model (higher F's in the model are penalized in the objective function). See also `drop_highF`.

cores

Integer for the number of CPU cores for the stock reduction analysis.

integrate

Logical, whether to treat recruitment deviations as penalized parameters (FALSE) or random effects (TRUE).

mean_fit

Logical, whether to run an additional with mean values of life history parameters from the OM.

drop_nonconv

Logical, whether to drop non-converged fits of the SRA model.

drop_highF

Logical, whether to drop fits of the SRA model where F hits `max_F`. Only applies if `drop_nonconv` is also `TRUE.`

control

A named list of arguments (e.g, max. iterations, etc.) for optimization, to be passed to nlminb.

...

Other arguments to pass in for starting values of parameters and fixing parameters. See details.

sims

A logical vector of length OM@nsim or a numberic vector indicating which simulations to keep.

Value

An object of class '>SRA, including the updated operating model object.

Data

One of indices, age compositions, or length compositions should be provided in addition to the historical catch or effort. Not all arguments are needed to run the model (some have defaults, while others are ignored if not applicable depending on the data provided).

The data list can include:

  • Chist - A vector of historical catch, should be of length OM@nyears. If there are multiple fleets: a matrix of OM@nyears rows and nfleet columns. Ideally, the first year of the catch series represents unfished conditions (see also C_eq).

  • Ehist - A vector of historical effort, should be of length OM@nyears (see also E_eq).

  • Index - A vector of values of an index (of length OM@nyears). If there are multiple surveys: a matrix of historical indices of abundances, with rows indexing years and columns indexing surveys. Age-specific indices should be numbers-specific while all others are weight-based.

  • I_sd - A vector or matrix of standard deviations (lognormal distribution) for the indices corresponding to the entries in Index. If not provided, this function will use values from OM@Iobs.

  • I_type - A character vector of length nsurvey to indicate the type of biomass for which each index follows. Either "B" for total biomass, or "SSB" for spawning biomass. If not provided, "B" is used. Use numbers if the index corresponds to a fleet in Chist. Use "est" to set survey selectivity to be an independent component of the model, i.e., as an age-specific index or estimated separatel. Note, this generally requires age s_CAA or length s_CALcompositions.

  • CAA - Fishery age composition matrix with nyears rows and OM@maxage columns. If multiple fleets: an array with dimension: nyears, OM@maxage, and nfleets.

  • CAL - Fishery Length composition matrix with nyears rows and columns indexing the length bin. If multiple fleets: an array with dimension: nyears, length bins, and nfleets.

  • ML - A vector of fishery mean length observations (length OM@nyears), or if multiple fleets: matrix of dimension: nyears and nfleets. Generally, should not be used if CAL is also provided, unless mean length and length comps are independently sampled.

  • ML_sd - The standard deviation (normal distribution) of the observed mean lengths. If there are multiple fleets, a vector of length nfleet. If not provided, default value is 0.1 * mean(ML).

  • s_CAA - Survey age composition data, an array of dimension nyears, maxage, nsurvey.

  • s_CAL - Survey length composition data, an array of dimension nyears, length(length_bin), nsurvey.

  • length_bin - A vector for the midpoints of the length bins for CAL and s_CAL. All bin widths should be equal in size.

  • C_eq - A numeric vector of length nfleet for the equilibrium catch for each fleet in Chist prior to the first year of the operating model. Zero (default) implies unfished conditions in year one. Otherwise, this is used to estimate depletion in the first year of the data.

  • E_eq - The equilibrium effort for each fleet in Ehist prior to the first year of the operating model. Zero (default) implies unfished conditions in year one. Otherwise, this is used to estimate depletion in the first year of the data.

  • abs_I - Optional, an integer vector to indicate which indices are in absolute magnitude. Use 1 to set q = 1, otherwise use 0 to estimate q.

  • I_units - Optional, an integer vector to indicate whether indices are biomass based (1) or abundance-based (0). By default, all are biomass-based.

  • age_error - Optional, a square matrix of maxage rows and columns to specify ageing error. The aa-th column assigns a proportion of the true age in the a-th row to observed age. Thus, all rowSums(age_error) should be 1. Default is an identity matrix (no ageing error).

Selectivity is fixed to values sampled from OM if no age or length compositions are provided.

Details

For SRA_scope, additional arguments can be passed to the model via ...:

  • vul_par: A matrix of 3 rows and nfleet columns for starting values for fleet selectivity. The three rows correspond to LFS (length of full selectivity), L5 (length of 5 percent selectivity), and Vmaxlen (selectivity at length Linf). By default, the starting values are values from the OM object.

  • s_vul_par: A matrix of 3 rows and nsurvey columns for starting values for fleet selectivity. Same setup as vul_par. These values are only used if s_selectivity = "est" for the corresponding fleet. Otherwise, placeholders should be used to complete the matrix.

  • map_vul_par: The map argument for vul_par in TMB, see MakeADFun, which indicates whether selectivity parameters are fixed or estimated. A matrix of the same dimension as vul_par. If an entry is NA, the corresponding parameter is fixed in the model to the starting value. Otherwise, an integer for each independent parameter. By default, selectivity is fixed if there are no age or length composition for that fleet or survey, otherwise estimated.

  • map_s_vul_par: The map argument for the survey selectivity parameters (same dimension as s_vul_par). Placeholder parameters should have a map value of NA.

  • map_log_rec_dev: A vector of length OM@nyears that indexes which recruitment deviates are fixed (using NA) or estimated (a separate integer).

  • plusgroup: Logical for whether the maximum age is a plusgroup or not.

Survey selectivity is estimated only if s_CAA or s_CAL is provided. Otherwise, the selectivity should be mirrored to a fleet (vulnerable biomass selectivity) or indexed to total or spawning biomass (see I_type).

LWT is an optional named list containing the likelihood weights (values > 0) with the possible options:

  • Chist: A vector of length nfleet.

  • Index: A vector of length nsurvey.

  • CAA, CAL, ML, C_eq: A vector of length nfleet for each.

  • s_CAA, s_CAL: A vector of length nsurvey for each.

By default, all likelihood weights are equal to one if not specified by the user. Weighting for CAA and CAL can also be adjusted by changing the multinomial sample size. For CAA, CAL, s_CAA, and s_CAL, the arrays should be set up so that the annual number of observations (summed over columns) should be equal to the presumed effective sample size. Argument ESS provides a shortcut to cap the the effective sample size.

Parameters that were used in the fitting model are placed in objects in OM@cpars.

Sub_cpars is a convenient function to subset simulations for the operating model, for example, to remove simulations from unconverged model fits or outlier simulations.

See Also

plot.SRA '>SRA