View source: R/assess_SCA_ext.R
SCA_RWM | R Documentation |
SCA_RWM
is a modification of SCA that incorporates a random walk in M in logit space (constant with age).
Set the variance (start$tau_M
) to a small value (0.001) in order to fix M for all years, which is functionally equivalent to SCA.
SCA_RWM(
x = 1,
Data,
AddInd = "B",
SR = c("BH", "Ricker", "none"),
vulnerability = c("logistic", "dome"),
catch_eq = c("Baranov", "Pope"),
CAA_dist = c("multinomial", "lognormal"),
CAA_multiplier = 50,
rescale = "mean1",
max_age = Data@MaxAge,
start = NULL,
prior = list(),
fix_h = TRUE,
fix_F_equilibrium = TRUE,
fix_omega = TRUE,
fix_tau = TRUE,
LWT = list(),
early_dev = c("comp_onegen", "comp", "all"),
late_dev = "comp50",
refyear = expression(length(Data@Year)),
M_bounds = NULL,
integrate = FALSE,
silent = TRUE,
opt_hess = FALSE,
n_restart = ifelse(opt_hess, 0, 1),
control = list(iter.max = 2e+05, eval.max = 4e+05),
inner.control = list(),
...
)
x |
A position in the Data object (by default, equal to one for assessments). |
Data |
An object of class Data |
AddInd |
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. Vulnerability to the survey is fixed in the model. |
SR |
Stock-recruit function (either |
vulnerability |
Whether estimated vulnerability is |
catch_eq |
Whether to use the Baranov equation or Pope's approximation to calculate the predicted catch at age in the model. |
CAA_dist |
Whether a multinomial or lognormal distribution is used for likelihood of the catch-at-age matrix. See details. |
CAA_multiplier |
Numeric for data weighting of catch-at-age matrix if |
rescale |
A multiplicative factor that rescales the catch in the assessment model, which
can improve convergence. By default, |
max_age |
Integer, the maximum age (plus-group) in the model. |
start |
Optional list of starting values. Entries can be expressions that are evaluated in the function. See details. |
prior |
A named list for the parameters of any priors to be added to the model. See below. |
fix_h |
Logical, whether to fix steepness to value in |
fix_F_equilibrium |
Logical, whether the equilibrium fishing mortality prior to the first year of the model
is estimated. If |
fix_omega |
Logical, whether the standard deviation of the catch is fixed. If |
fix_tau |
Logical, the standard deviation of the recruitment deviations is fixed. If |
LWT |
A named list (Index, CAA, Catch) of likelihood weights for the data components. For the index, a vector of length survey. For CAL and Catch, a single value. |
early_dev |
Numeric or character string describing the years for which recruitment deviations are estimated in |
late_dev |
Typically, a numeric for the number of most recent years in which recruitment deviations will
not be estimated in |
refyear |
An expression for the year for which M is used to report MSY and unfished reference points. By default, terminal year. If multiple years are provided, then the mean M over the specified time period is used. |
M_bounds |
A numeric vector of length 2 to indicate the minimum and maximum M in the random walk as a proportion of the starting M
( |
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. |
silent |
Logical, passed to |
opt_hess |
Logical, whether the hessian function will be passed to |
n_restart |
The number of restarts (calls to |
control |
A named list of arguments for optimization to be passed to
|
inner.control |
A named list of arguments for optimization of the random effects, which
is passed on to |
... |
Other arguments to be passed. |
The model estimates year-specific M (constant with age) as a random walk in logit space, bounded by
a proportion of start$M
(specified in M_bounds
).
The starting value for the first year M (start$M) is Data@Mort[x]
and is fixed, unless a prior is provided (prior$M
).
The fixed SD of the random walk (tau_M
) is 0.05, by default.
Steepness and unfished recruitment in the estimation model, along with unfished reference points, correspond to spawners per recruit using the first year M.
With argument refyear
, new unfished reference points and steepness values are calculated. See examples.
Alternative values can be provided in the start list (see examples):
R0
Unfished recruitment, except when SR = "none"
where it is mean recruitment.
By default, 150% Data@OM$R0[x]
is used as the start value in closed-loop simulation, and 400\
h
Steepness. Otherwise, Data@steep[x]
is used, or 0.9 if empty.
M
Natural mortality in the first year. Otherwise, Data@Mort[x]
is used.
vul_par
Vulnerability parameters, see next paragraph.
F
A vector of length nyears for year-specific fishing mortality.
F_equilibrium
Equilibrium fishing mortality leading into first year of the model (to determine initial depletion). By default, 0.
omega
Lognormal SD of the catch (observation error) when catch_eq = "Baranov"
. By default, Data@CV_Cat[x]
.
tau
Lognormal SD of the recruitment deviations (process error). By default, Data@sigmaR[x]
.
tau_M
The fixed SD of the random walk in M. By default, 0.05.
See SCA for all other information about the structure and setup of the model.
The SCA builds in a stock-recruit relationship into the model. Annual unfished and MSY reference points are calculated and reported in TMB_report of the Assessment object.
An object of class Assessment.
Model description and equations are available on the openMSE website.
Q. Huynh
SCA SCA_DDM
res <- SCA_RWM(Data = MSEtool::SimulatedData, start = list(M_start = 0.4, tau_M = 0.05))
res2 <- SCA(Data = MSEtool::SimulatedData)
res3 <- SCA_RWM(Data = MSEtool::SimulatedData, start = list(M_start = 0.4, tau_M = 0.001))
# Use mean M in most recent 5 years for reporting reference points
res_5r <- SCA_RWM(Data = MSEtool::SimulatedData,
refyear = expression(seq(length(Data@Year) - 4, length(Data@Year))),
start = list(M_start = 0.4, tau_M = 0.001))
res_5r@SSB0 # SSB0 reported (see also res_5r@TMB_report$new_E0)
res_5r@TMB_report$E0 # SSB0 of Year 1 M
compare_models(res, res2, res3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.