A surplus production model that uses only a time-series of catches and a relative abundance index
and coded in TMB. The base model, SP
, is conditioned on catch and estimates a predicted index.
Continuous surplus production and fishing is modeled with sub-annual time steps which should approximate
the behavior of ASPIC (Prager 1994). The Fox model, SP_Fox
, fixes BMSY/K = 0.37 (1/e).
The state-space version, SP_SS
estimates annual deviates in biomass. An option allows for setting a
prior for the intrinsic rate of increase.
The function for the spict
model (Pedersen and Berg, 2016) is available in DLMextra.
SP(
x = 1,
Data,
AddInd = "B",
rescale = "mean1",
start = NULL,
fix_dep = TRUE,
fix_n = TRUE,
LWT = NULL,
n_seas = 4L,
n_itF = 3L,
use_r_prior = FALSE,
r_reps = 100,
SR_type = c("BH", "Ricker"),
silent = TRUE,
opt_hess = FALSE,
n_restart = ifelse(opt_hess, 0, 1),
control = list(iter.max = 5000, eval.max = 10000),
...
)SP_SS(
x = 1,
Data,
AddInd = "B",
rescale = "mean1",
start = NULL,
fix_dep = TRUE,
fix_n = TRUE,
fix_sigma = TRUE,
fix_tau = TRUE,
LWT = NULL,
early_dev = c("all", "index"),
n_seas = 4L,
n_itF = 3L,
use_r_prior = FALSE,
r_reps = 100,
SR_type = c("BH", "Ricker"),
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(),
...
)
SP_Fox(x = 1, Data, ...)
An index for the objects in Data
when running in runMSE.
Otherwise, equals to 1 When running an assessment interactively.
An object of class Data.
A vector of integers or character strings indicating the indices to be used in the model. Integers assign the index to the corresponding index in Data@AddInd, "B" (or 0) represents total biomass in Data@Ind, "VB" represents vulnerable biomass in Data@VInd, and "SSB" represents spawning stock biomass in Data@SpInd.
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.
Optional list of starting values. Entries can be expressions that are evaluated in the function. See details.
Logical, whether to fix the initial depletion (ratio of biomass to carrying capacity in the
first year of the model). If TRUE
, uses the value in start
, otherwise equal to 1
(unfished conditions).
Logical, whether to fix the exponent of the production function. If TRUE
,
uses the value in start
, otherwise equal to n = 2
, where the biomass at MSY
is half of carrying capacity.
A vector of likelihood weights for each survey.
Integer, the number of seasons in the model for calculating continuous surplus production.
Integer, the number of iterations to solve F conditional on the observed catch given multiple seasons within an annual time step.
Ignored if n_seas
= 1.
Logical, whether a prior for the intrinsic rate of increase will be used in the model. See details.
If use_r_prior = TRUE
, the number of samples of natural mortality and steepness for calculating the
mean and standard deviation of the r prior. To override and directly provide the r-prior mean and standard deviation, use the start list, e.g.
start = list(r_prior = c(0.1, 0.05))
(mean of 0.1 and s.d. of 0.05).
If use_r_prior = TRUE
, the stock-recruit relationship used to calculate unfished recruits per spawner at the origin
of spwaning biomass approaches zero. Used for the r prior.
Logical, passed to MakeADFun
, whether TMB
will print trace information during optimization. Used for dignostics for model convergence.
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
.
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.
A named list of parameters regarding optimization to be passed to
nlminb
.
For SP_Fox
, additional arguments to pass to SP
.
Logical, whether the standard deviation of the index is fixed. If TRUE
,
sigma is fixed to value provided in start
(if provided), otherwise, value based on Data@CV_Ind
.
Logical, the standard deviation of the biomass deviations is fixed. If TRUE
,
tau is fixed to value provided in start
(if provided), otherwise, equal to 0.1.
Character string describing the years for which biomass deviations are estimated in SP_SS
.
By default, deviations are estimated in each year of the model ("all"
), while deviations could also be estimated
once index data are available ("index"
).
Logical, whether the likelihood of the model integrates over the likelihood of the biomass deviations (thus, treating it as a state-space variable).
An object of '>Assessment
containing objects and output from TMB.
SP
: Cat, Ind
SP_SS
: Cat, Ind
SP_SS
: CV_Ind
To provide starting values for the SP
, a named list can be provided for FMSY
,
MSY
, dep
, and n
via the start argument (see example).
For SP_SS
, a start value can also be provided for sigma
and tau
, the standard deviation
of the index and log-biomass deviates, respectively. Default for tau is 0.1. Deviations are estimated beginning in the year when index
data are available.
If use_r_prior = TRUE
, SP
and SP_SS
will use a prior for the intrinsic rate of increase in the objective function.
A vector of length two can be passed in the start
list for the mean and standard deviation of the prior (see example). The normal
distribution is used.
If no values are provided, a prior is created using the Euler-Lotka method (Equation 15a of McAllister et al. 2001).
The Euler-Lotka method is modified to multiply the left-hand side of equation 15a by the alpha parameter of the
stock-recruit relationship (Stanley et al. 2009). Natural mortality and steepness are sampled in order to generate
a prior distribution for r. See vignette("Surplus_production")
for more details.
Fletcher, R. I. 1978. On the restructuring of the Pella-Tomlinson system. Fishery Bulletin 76:515:521.
Fox, W.W. 1970. An exponential surplus-yield model for optimizing exploited fish populations. Transactions of the American Fisheries Society 99:80-88.
McAllister, M.K., Pikitch, E.K., and Babcock, E.A. 2001. Using demographic methods to construct Bayesian priors for the intrinsic rate of increase in the Schaefer model and implications for stock rebuilding. Can. J. Fish. Aquat. Sci. 58: 1871-1890.
Pedersen, M. W. and Berg, C. W. 2017. A stochastic surplus production model in continuous time. Fish and Fisheries. 18:226-243.
Pella, J. J. and Tomlinson, P. K. 1969. A generalized stock production model. Inter-Am. Trop. Tuna Comm., Bull. 13:419-496.
Prager, M. H. 1994. A suite of extensions to a nonequilibrium surplus-production model. Fishery Bulletin 92:374-389.
Stanley, R.D., M. McAllister, P. Starr and N. Olsen. 2009. Stock assessment for bocaccio (Sebastes paucispinis) in British Columbia waters. DFO Can. Sci. Advis. Sec. Res. Doc. 2009/055. xiv + 200 p.
SP_production plot.Assessment summary.Assessment retrospective profile make_MP
# NOT RUN {
data(swordfish)
#### Observation-error surplus production model
res <- SP(Data = swordfish)
# Provide starting values, assume B/K = 0.875 in first year of model
# and symmetrical production curve (n = 2)
start <- list(dep = 0.875, n = 2)
res <- SP(Data = swordfish, start = start)
# }
# NOT RUN {
plot(res)
# }
# NOT RUN {
profile(res, FMSY = seq(0.1, 0.4, 0.01))
retrospective(res)
# }
# NOT RUN {
#### State-space version
res_SS <- SP_SS(Data = swordfish, start = list(dep = 0.875, sigma = 0.1, tau = 0.1))
# }
# NOT RUN {
plot(res_SS)
# }
# NOT RUN {
#### Fox model
res_Fox <- SP(Data = swordfish, start = list(n = 1), fix_n = TRUE)
res_Fox2 <- SP_Fox(Data = swordfish)
#### SP with r_prior
res_prior <- SP(Data = SimulatedData, use_r_prior = TRUE)
#### Pass an r_prior to the model with mean = 0.35, sd = 0.10
res_prior2 <- SP(Data = SimulatedData, use_r_prior = TRUE, start = list(r_prior = c(0.35, 0.10)))
# }
Run the code above in your browser using DataLab