Description Usage Arguments Value Examples
These functions will create the various likelihood components used by Gadget
in an optimizing run. There is a function for each specific likelihood
component. These then get fed into make_gadget_likelihood
,
which will assemble them altogether into the Gadget likelihood file.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | make_gadget_penalty(...)
make_gadget_understocking(...)
make_gadget_catchdistribution(..., areaagg = NULL, ageagg = NULL,
lenagg = NULL)
make_gadget_catchstatistics(..., areaagg = NULL, lenagg = NULL,
ageaggfile = NULL)
make_gadget_stockdistribution(..., areaagg = NULL, lenagg = NULL,
ageaggfile = NULL)
make_gadget_surveyindices(..., areaagg = NULL, lenagg = NULL,
ageagg = NULL)
make_gadget_surveydistribution(..., areaagg = NULL, lenagg = NULL,
ageagg = NULL)
make_gadget_stomachcontent(..., areaagg = NULL, lenagg = NULL,
preyagg = NULL)
make_gadget_recaptures(..., areaagg = NULL, lenagg = NULL)
make_gadget_recstatistics(..., areaagg = NULL)
make_gadget_migrationpenalty(...)
make_gadget_migrationproportion(..., areaagg = NULL)
make_gadget_catchinkilos(..., areaagg = NULL)
make_si_aggfile(label, min, max)
|
... |
Named elements corresponding to the arguments needed for each respective likelihood component (see Gadget User Guide) |
areaagg |
List with names corresponding to the aggregation and values to the areas to be included in those aggregations |
ageagg |
List with names corresponding to the aggregation and values to the ages to be included in those aggregations |
lenagg |
List with names corresponding to the aggregation and values to the lengths to be included in those aggreations |
preyagg |
List with names corresponding the the aggregated prey names and values to the prey to be included in those aggregations |
label |
Character. The label for each length group |
min |
Numeric. The minimum length or age value for each label |
max |
Numeric. The maximum length or age value for each label |
A list of class gadget_*_likelihood
, with * corresponding to
the approprate likelihood type
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | # read in the data
path <- system.file(gad_mod_dir, package = "gadgetSim")
stock_std <- get_stock_std(path = path)
# sample the data
lengrps <- seq(0.5, 150.5, 1)
suit <- logistic_selectivity(lengrps, alpha = 0.25, l50 = 30)
cod_lengrps <- add_lengthgroups(stock_std$cod, lengrps)
cod_survey <- survey_gadget(cod_lengrps, lengrps, suit, 0)
cod_al_data <- strip_age_length_data(cod_survey, 0.5, 0.5)
spr_ldist <-
subset(cod_al_data$length_data, step == 1)
spr_ldist$age <- "all"
spr_ldist <- subset(spr_ldist,
select = c("year", "step", "area",
"age", "length", "number"))
spr_aldist <-
subset(cod_al_data$age_data, step == 1)
# make the components
spr_ldist_comp <-
make_gadget_catchdistribution(name = "spr.ldist",
data = spr_ldist,
fleetnames = "spr",
stocknames = "cod",
ageagg = list(all = 1:20))
spr_aldist_comp <-
make_gadget_catchdistribution(name = "spr.aldist",
data = spr_aldist,
fleetnames = "spr",
stocknames = "cod")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.