-
Notifications
You must be signed in to change notification settings - Fork 3
Home
Welcome to the Rceattle wiki!
This page describes the general model workflow and steps required for updating the model/codebase.
Workflow
The package relies on list of data.frames and vectors describing the data and observation model parameterization. The fit_mod function is used to fit the model, with the list of data and population model specifications (i.e. switches) are inputs/arguments of the function.
-
Data can be created as a list from scratch, from an excel file read in using
read_data, or from modified data-sets included in the package. Examples include the single species Bering model that has the data for Cod, Pollock, and Arrowtooth together indata(BS2017SS). Thewrite_datafunction will write those data to an excel file with associated meta data. If using excel, the first sheet (meta_data) in the excel file should have up to date documentation of the switches. -
Parameterization of the population and observation model in terms of predation (on/off/functional form), selectivity, catchability, etc are specified by switches in the
controlandfleet_controldata.frame of the for the observation model and as arguments to thefit_modfunction for the population model. You can do?fit_modin R and it will give you a description of the switches/function.
The fit_mod function reads in the data and model switches and automatically builds the parameter and map object for TMB assuming default initial values (parameter and map objects can also be read in as arguments fit_mod). The model is optimized and outputs include the data, initial parameters, estimated parameters, TMB map, derived quantities, and standard errors. See ?fit_mod for more details of the various options.