Learn R Programming

MSEtool (version 1.3.0)

DD_TMB: Delay - Difference Stock Assessment in TMB

Description

A simple delay-difference assessment model using a time-series of catches and a relative abundance index and coded in TMB. The model is conditioned on effort and estimates predicted catch. In the state-space version, recruitment deviations from the stock-recruit relationship are estimated.

Usage

DD_TMB(x = 1, Data, SR = c("BH", "Ricker"), rescale = "mean1",
  start = NULL, fix_h = TRUE, fix_U_equilibrium = TRUE,
  silent = TRUE, opt_hess = FALSE, n_restart = ifelse(opt_hess, 0,
  1), control = list(iter.max = 5000, eval.max = 10000), ...)

DD_SS(x = 1, Data, SR = c("BH", "Ricker"), rescale = "mean1", start = NULL, fix_h = TRUE, fix_U_equilibrium = TRUE, fix_sigma = FALSE, fix_tau = TRUE, integrate = FALSE, silent = TRUE, opt_hess = FALSE, n_restart = ifelse(opt_hess, 0, 1), control = list(iter.max = 5000, eval.max = 10000), inner.control = list(), ...)

Arguments

x

An index for the objects in Data when running in closed loop simulation. Otherwise, equals to 1 when running an assessment.

Data

An object of class '>Data.

SR

Stock-recruit function (either "BH" for Beverton-Holt or "Ricker").

rescale

A multiplicative factor that rescales the catch in the assessment model, which can improve convergence. By default, "mean1" scales the catch so that time series mean is 1, otherwise a numeric. Output is re-converted back to original units.

start

Optional list of starting values. Entries can be expressions that are evaluated in the function. See details.

fix_h

Logical, whether to fix steepness to value in Data@steep in the assessment model.

fix_U_equilibrium

Logical, whether the equilibrium harvest rate prior to the first year of the model is estimated. If TRUE, U_equilibruim is fixed to value provided in start (if provided), otherwise, equal to zero (assumes virgin conditions).

silent

Logical, passed to MakeADFun, whether TMB will print trace information during optimization. Used for dignostics for model convergence.

opt_hess

Logical, whether the hessian function will be passed to nlminb during optimization (this generally reduces the number of iterations to convergence, but is memory and time intensive and does not guarantee an increase in convergence rate). Ignored if integrate = TRUE.

n_restart

The number of restarts (calls to nlminb) in the optimization procedure, so long as the model hasn't converged. The optimization continues from the parameters from the previous (re)start.

control

A named list of parameters regarding optimization to be passed to nlminb.

...

Additional arguments (not currently used).

fix_sigma

Logical, whether the standard deviation of the catch is fixed. If TRUE, sigma is fixed to value provided in start (if provided), otherwise, value based on Data@CV_Cat.

fix_tau

Logical, the standard deviation of the recruitment deviations is fixed. If TRUE, tau is fixed to value provided in start (if provided), otherwise, equal to 1.

integrate

Logical, whether the likelihood of the model integrates over the likelihood of the recruitment deviations (thus, treating it as a random effects/state-space variable). Otherwise, recruitment deviations are penalized parameters.

inner.control

A named list of arguments for optimization of the random effects, which is passed on to newton via MakeADFun.

Value

An object of '>Assessment containing objects and output from TMB.

Functions

  • DD_TMB: Observation-error only model

  • DD_SS: State-Space version of Delay-Difference model

Required Data

  • DD_TMB: Cat, Ind, Mort, L50, vbK, vbLinf, vbt0, wla, wlb, MaxAge

  • DD_SS: Cat, Ind, Mort, L50, vbK, vbLinf, vbt0, wla, wlb, MaxAge

Optional Data

  • DD_TMB: steep

  • DD_SS: steep, CV_Cat

Details

To provide starting values for DD_TMB, a named list can be provided for R0 (virgin recruitment), h (steepness), and q (catchability coefficient) via the start argument (see example).

For DD_SS, additional start values can be provided for and sigma and tau, the standard deviation of the catch and recruitment variability, respectively.

References

Carruthers, T, Walters, C.J,, and McAllister, M.K. 2012. Evaluating methods that classify fisheries stock status using only fisheries catch data. Fisheries Research 119-120:66-79.

Hilborn, R., and Walters, C., 1992. Quantitative Fisheries Stock Assessment: Choice, Dynamics and Uncertainty. Chapman and Hall, New York.

See Also

plot.Assessment summary.Assessment retrospective profile make_MP

Examples

Run this code
# NOT RUN {
#### Observation-error delay difference model
res <- DD_TMB(Data = DLMtool::Red_snapper)

# Provide starting values
start <- list(R0 = 1, h = 0.95)
res <- DD_TMB(Data = DLMtool::Red_snapper, start = start)

summary(res@SD) # Parameter estimates

### State-space version
### Set recruitment variability SD = 0.3 (since fix_tau = TRUE)
res <- DD_SS(Data = Red_snapper, start = list(tau = 0.3))
# }

Run the code above in your browser using DataLab