Skip to content
Grant Adams edited this page Dec 18, 2025 · 12 revisions

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 in data(BS2017SS). The write_data function 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 control and fleet_control data.frame of the for the observation model and as arguments to the fit_mod function for the population model. You can do ?fit_mod in 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.

Clone this wiki locally