Description Usage Arguments Details Value Examples
Create list with a TMB framework, including data, gradients and NLL function for a CSA assessment that can be optimised.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
catch_no |
numeric vector of catch numbers over time period of assessment | ||||||
indices_no |
matrix of survey indices (numbers) of dimensions: no. of indices x no.years | ||||||
indices_att |
matrix of survey indices attributes of dimensions: no. of indices x 2. First column defines survey and second column defines survey type (1 = recruit index, 2 post-recruit index, 3 = whole asessed population index). For example the minimum needed to run CSA is one survey split into a recruit index and a post-recruit index, the attribute matrix should look like:
| ||||||
ts |
numeric. Survey timing parameters | ||||||
selrec |
matrix of selection proportions of the recruit indices (in comparison to the post-recruit index) if known. Dimensions: no. of recruit indices x no. years. Defaults to 1 for all years (i.e. no difference between recruit and post-recruit indices of a survey) | ||||||
start_q |
Starting values for survey catchability parameters. Default is 1e-6 | ||||||
start_surveycv |
Starting values for survey cv parameters. Default is 0.1 | ||||||
start_prec0 |
Starting parameter value for post-recruit numbers at first time step. Default is 4*max(catch.no). | ||||||
start_rec |
Starting parameter values for estimated recruit numbers. Default is 2*max(catch.no). | ||||||
start_nmort |
Starting parameter value for natural mortality. Default is 0.2 | ||||||
start_f_calc |
Starting parameter values for estimated fishing mortality. Default is 0.3. | ||||||
start_catchcv |
Starting parameter value for catch cv. Default is 0.1 | ||||||
fix_nmort |
logical. Should natural mortality be fixed in the model | ||||||
fix_prec0 |
logical. Should post-recruit numbers in the first time step be fixed in the model. | ||||||
fix_surveycv |
logical. Should survey CV be fixed in the model. | ||||||
fix_catchcv |
logical. Should catch CV be fixed in the model. |
csa
is simply a wrapper function that gives the output from
MakeADFun
from TMB, i.e. an objective function with
derivatives, hessian etc. Otimisation and extraction of values from the
assessment models has been kept separate to allow flexibility with
optimisation methods as well as easy access to MakeADFun
outputs such as the hessian, gradients etc. See
http://kaskr.github.io/adcomp/_book/Introduction.html and TMB
documentation for details. Users should refer to the sbar
vignette by
running vignette("intro_to_sbar", "sbar")
for details on the
csa
function.
The table below gives the outputs and description of the values that can be
extracted from this assessment model after optimisation and
summary(TMB::sdreport(x))
of the csa
object.
Output | Description |
logitqhat | logit transformed survey catchability |
logphat1 | log transformed post-rec numbers at first time step |
logrhat | log transformed recruitment numbers |
logf_calc | log transformed fishing mortality |
log_surveycv | log transformed survey CV |
log_catchcv | log transformed catch CV |
lognmort | log transformed natural mortality |
phat | post-recruit numbers |
rhat | recruit numbers |
bhat | total numbers |
lnphat | log transformed post-rec numbers |
lnbhat | log transformed total numbers |
lnc | log transformed catch numbers |
c_calc | catch numbers |
logpred_survey | log transformed predicted survey indices |
sdsurv | Survey index standard deviation |
f_calc | fishing mortality |
phat1 | post-rec numbers at first time step |
nmort | natural mortality |
qhat | survey catchability |
List with components for optimiser in R. This output is that of the function MakeADFun from TMB
Access (transformed) starting values of parameters to be estimated with
x$par
(where x is the csa object) to see what parameters are to be estimated.
1 2 3 | ## Not run: obj <- csa(catch_n = catch.no, indices_no = obs,
indices_att = indices_att, ts = #'timing, #'start_nmort = nm)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.