View source: R/captool_simulation.R
captool | R Documentation |
Provide a data_list of inputs and run the projection from October 1st to April 1st. Should reproduce the old captool (excel-based) software.
captool(
data_list,
nsim = 50000,
cap_cv = 0.2,
cod_cv = 0.3,
plot = TRUE,
consumControl = rep(1, 18)
)
data_list |
list of data input (see details) |
nsim |
number of simulations |
cap_cv |
capelin coefficient of variation (cv) |
cod_cv |
cod coefficient of variation (cv) |
plot |
boolean, should the projection be plotted? |
consumControl |
numeric vector of length 18 of 0s or 1s.See details. |
The 'data_list' should contain year, cap, catches, cod0, cod1, svalbard, stochasticHistory and (optionally) captool. The year is the assessment year (integer), cap is a table containing numbers at age (0-5) and length (32 length groups). Catches is a vector giving the catches in jan, feb and march. The data frames cod0 and cod1 is the cod data for year Y and year Y+1 (projection) from the cod assessment. The data frame 'svalbard' contains the historical svalbard porportions from the different years we are to sample from divided by cod age. The data frame 'stochasticHistory' contains historical samples of parameters we are to sample from, i.e. p1, p2, p3 (p3 = M = natural mortality) and Cmax and Chalf. Lastly, if comparion to captool (the excel-based software) is to be made, one can also provide the projected quantiles from captool as an argument at these will be added to the figure showing the projection. There is also a option to include a vector of new fall mortalities in the data_list called 'NewFallMortality'. If this is present in the list, these will be used. Otherwise, the routine will look for autumn mortalities in the stochastic history part.
The input vector consumControl should be of length 18 containing 0s and 1s to control when the consum should begin or end. The period 1.january to 1.april is divided into 18 parts; 6 per month. E.g. consumControl = c(rep(0,6), rep(1,12)) would make the consum by cod start on Feburary 1st.
In 2022 the Russian part of the survey was not conducted. Hence we included the option to scale up the abundance of capelin in october by some scaling factors based on the historical distribution of capelin in russian economic zone relative to the Norwegian part. The simulation procedure will sample a scaling factor from data_list$scaling.factors with equal probability in each simulation.
In the recent Benchmark, it is stated that; "Predation ability is assumed unchanged during the period January-March – previously M and F were applied monthly to reduce abundance – now mortality and growth are assumed to cancel out." To run the old version include 'data_list$useCodM = TRUE'.
list of output from the projection.
# captool(data_list)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.