R/set_catch.R
set_catch.Rd
Specify catch selectivity blocks and aggregate and age composition observations for catch
set_catch(input, catch_info = NULL)
list containing data, parameters, map, and random elements (output from prepare_wham_input
)
(optional) list specifying various aspects about catch by fleet (see details)
catch_info
specifies observations, and various configuration options for fleet-specific catch observations and will overwrite attributes specified in the ASAP data file.
If NULL
, all settings from the ASAP data file or basic_info are used.
catch_info
is a list with any of the following entries:
number of fleets
vector (n_fleets) of regions where each fleet operates.
matrix (n_fleets x n_seasons) of 0/1 values flagging which seasons each fleet operates.
character vector (n_fleets) of names for fleets. Used for naming results in plots and tables.
matrix (n_years_model x n_fleets) of annual aggregate catches by fleet.
matrix (n_years_model x n_fleets) of CVs for annual aggregate catches by fleet.
array (n_fleets x n_years_model x n_ages) of annual catch proportions at age by fleet.
matrix (n_years_model x n_fleets) of 0/1 values flagging whether to use proportions at age observations.
matrix (n_years_model x n_fleets) of effective sample sizes for proportions at age observations.
vector (n_fleets) of itegers indicated waa to use for each fleet.
matrix (n_years_model x n_fleets) of itegers indicated selblocks to use.
vector (n_fleets) of scalar multipliers of annual log-observation standard deviation. Default = 1.
integer vector (n_fleets) specifying which sd scalar parameters to fix. Use NA
to fix a parameter and integers to estimate.
Use the same integer for multiple fleets to estimate a shared scalar parameter.
a named list with same elements as the input provided with catch observations and fleet options modified.
if (FALSE) {
wham.dir <- find.package("wham")
path_to_examples <- system.file("extdata", package="wham")
asap3 <- read_asap3_dat(file.path(path_to_examples,"ex1_SNEMAYT.dat"))
input <- prepare_wham_input(asap3)
input <- set_catch(input, catch_info = list(agg_catch = newcatch)) #constant catch of 500 mt
}