Package: Rceattle 4.6.0

Grant Adams

Rceattle: Fits the Multispecies Assessment Model (CEATTLE) Using TMB

Implements the CEATTLE model using Template Model Builder ('TMB'; Kristensen et al. 2015), which can be installed following <https://github.com/kaskr/adcomp/wiki/Download>. Structured similar to the original manuscript in terms of modularization. Separate functions estimate retrospective temperature- and size-specific predator rations, prey preference, and weight-at-age. These are then used as inputs to the CEATTLE model to evaluate how predation mortality, recruitment, and survival of three target species change under historical climate conditions and harvest rates.

Authors:Grant Adams [aut, cre]

Rceattle_4.6.0.tar.gz
Rceattle_4.6.0.zip(r-4.7)Rceattle_4.6.0.zip(r-4.6)Rceattle_4.6.0.zip(r-4.5)
Rceattle_4.6.0.tgz(r-4.6-x86_64)Rceattle_4.6.0.tgz(r-4.6-arm64)Rceattle_4.6.0.tgz(r-4.5-x86_64)Rceattle_4.6.0.tgz(r-4.5-arm64)
Rceattle_4.6.0.tar.gz(r-4.7-arm64)Rceattle_4.6.0.tar.gz(r-4.7-x86_64)Rceattle_4.6.0.tar.gz(r-4.6-arm64)Rceattle_4.6.0.tar.gz(r-4.6-x86_64)
manual.pdf |manual.html
DESCRIPTION |NEWS
card.svg |card.png
Rceattle/json (API)

# Install 'Rceattle' in R:
install.packages('Rceattle', repos = c('https://noaa-fisheries-integrated-toolbox.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/grantdadams/rceattle/issues

Pkgdown/docs site:https://grantdadams.github.io

Datasets:
  • Atka2022 - Data inputs for Atka mackerel CEATTLE model
  • BS2017MS - Data inputs for multispecies CEATTLE of the Bering Sea from 1979 to 2017
  • BS2017SS - Data inputs for single species CEATTLE of the Bering Sea from 1979 to 2017
  • EBS_ms_run - Fitted multispecies CEATTLE model for the Eastern Bering Sea
  • EBS_ss_M_run - Fitted single-species CEATTLE model with estimated M for the Eastern Bering Sea
  • EBS_ss_run - Fitted single-species CEATTLE model for the Eastern Bering Sea
  • GeorgesBank3spp - Data inputs for a three-species Georges Bank CEATTLE model
  • GOA2018SS - Data inputs for a single-species Gulf of Alaska CEATTLE model
  • GOAatf - Data inputs for Gulf of Alaska arrowtooth flounder CEATTLE model
  • GOAatf2023 - Data inputs for Gulf of Alaska arrowtooth flounder CEATTLE model
  • GOAcod - Data inputs for Gulf of Alaska Pacific cod CEATTLE model
  • GOApollock - Data inputs for Gulf of Alaska walleye pollock CEATTLE model
  • GOAsafe2018 - Gulf of Alaska 2018 SAFE report reference values
  • NorthernRockfish2022 - Data inputs for Northern Rockfish CEATTLE model
  • whamGrowthData - Data inputs for CEATTLE model with WHAM-estimated growth

On CRAN:

Conda:

8.09 score 12 stars 213 scripts 69 exports 56 dependencies

Last updated from:e797a14510. Checks:11 WARNING, 1 OK, 1 FAIL. Indexed: no.

TargetResultTimeFilesSyslog
linux-devel-arm64WARNING386
linux-devel-x86_64WARNING351
source / vignettesOK483
linux-release-arm64WARNING367
linux-release-x86_64WARNING374
macos-release-arm64WARNING212
macos-release-x86_64WARNING503
macos-oldrel-arm64WARNING231
macos-oldrel-x86_64WARNING534
windows-develWARNING385
windows-releaseWARNING387
windows-oldrelWARNING399
wasm-releaseFAIL189

Exports:build_boundsbuild_growthbuild_hcrbuild_hcr_mapbuild_M1build_mapbuild_paramsbuild_srrcheck_mseclean_datacombine_datacompare_simconvergence_diagnosticsfit_controlfit_modjitterlinkage_specload_msemodel_averagemse_summaryosa_diagnosticsosa_residualsplot_b_eatenplot_b_eaten_propplot_biomassplot_catchplot_compplot_dataplot_depletionplot_depletionSSBplot_diet_compplot_exploitable_biomassplot_fplot_formplot_indexplot_indexresidualplot_logindexplot_m_at_ageplot_m2_at_age_propplot_maturityplot_mortalityplot_rationplot_recruitmentplot_selectivityplot_selectivity_vs_maturityplot_ssbplot_ssb_depletionplot_stock_recruitplot_timeseriesprior_betaprior_gammaprior_lognormalprior_normalprocess_residualsread_datarearrange_datrearrange_dataremove_Frename_outputretrospectiverun_msesample_recself_testset_phasessim_modswitch_checkTMBAICTMBphasewrite_data

Dependencies:bitopscaToolscellrangerclicowplotcpp11crayondplyrfarvergenericsggplot2gluegplotsgswgtablegtoolshmsisobandKernSmoothlabelinglatticelifecyclemagrittrMASSMatrixocepillarpkgconfigplyrprettyunitsprogresspurrrR.methodsS3R.ooR.utilsR6RColorBrewerRcppRcppEigenreadxlrematchreshape2rlangS7scalesstringistringrtibbletidyrtidyselectTMButf8vctrsviridisLitewithrwritexl

Model options and functionality
1. Model dimensions and operating mode | msmMode — single-species vs. multi-species | initMode — initial age structure | estimateMode — what does fit_mod() actually do? | Random-effects toggles | 2. Predation: suitMode (per predator) | 3. Selectivity (per fleet) | 4. Catchability (per fleet) | 5. Composition likelihoods | 6. Recruitment / stock-recruit (recFun = build_srr()) | 7. Natural mortality (M1Fun = build_M1()) | M1_model — fixed-effects structure of M1 | M1_re — random-effects structure on M1 | 8. Growth and weight-at-age (growthFun = build_growth()) | growth_model — fixed-effects structure of growth | growth_re — random effects on growth | 9. Harvest control rules (HCR = build_hcr()) | 10. Projection and MSE | 11. Diagnostics and inference | 12. Plotting | References

Last update: 2026-07-04
Started: 2026-05-08

Rceattle: An Introduction
Overview | 1. Installation | 2. Data | 3. Fit models | 4. Compare models | 5. Model plots and diagnostics

Last update: 2026-07-04
Started: 2026-05-08

HCRs and MSEs: an introduction
Fitting OMs | Fitting EMs (Tier 3 HCR) | Running MSEs | Reproducibility | Evaluating MSEs via plots | Summary statistics | Alternative scenarios | Different BRPs | Triannual BTS | 4-year cycle and 50% sampling | Climate MSE | Climate linked OM | Run MSE | Overall summary

Last update: 2026-07-04
Started: 2026-05-08

Model diagnostics
Setup and plotting data | S3 Methods | Convergence diagnostics | Fit plots | Composition data | Survey indices | Catch | One-step-ahead (OSA) residuals | Process residuals | Retrospective analysis | Jitter testing | Self-test (simulation–estimation) | Likelihood profile | Comparing single- and multi-species trajectories | Model average

Last update: 2026-07-04
Started: 2026-05-08

Projections and reference points
Setup | Fixed-F projections | Recruitment in the projection period | Manual recruitment deviations | Stochastic recruitment via sample_rec() | Comparing projection scenarios | Random recruitment effects | Available harvest control rules

Last update: 2026-07-04
Started: 2026-05-08

Single- vs. multi-species models
When to use each mode | Bering Sea example | Gulf of Alaska example | Predator-prey suitability (suitMode) | Comparing outputs

Last update: 2026-07-04
Started: 2026-05-08

Building a data object in R
Required vs. optional fields | Setup | 1. Species / model controls | 2. Fleet control table | 3. Survey index data | 4. Catch data | 5. Composition data (optional) | 6. Conditional age-at-length (CAAL) data (optional) | 7. Biological inputs | Age-to-length transition matrix | Ageing error matrix | Weight-at-age | Maturity-at-age | Sex ratio at age | Fixed selectivity (optional) | Fixed numbers-at-age (optional) | Natural mortality (M1 base) | Environmental covariate data (optional) | 8. Multi-species bioenergetics parameters (optional in single-species mode) | 9. Validate and fit | 10. Export back to Excel (optional)

Last update: 2026-07-04
Started: 2026-05-08

Converting from Stock Synthesis
Model controls | Fleets | Catch data | Survey indices | Composition data | Ageing error | Weight-at-age | Other inputs | Verifying the conversion against SS | See also

Last update: 2026-07-04
Started: 2026-05-08

Model parameterizations
In progress! | Population dynamics | Predation sub-model | Suitability | MSVPA Type 2 based suitability | Predation mortality | Single-species mode | MSVPA Type 2 based predation mortality | MSVPA Type 3 based predation mortality | Consumption | Bioenergetics based ration | Input ration-at-age | Fishery and survey observation model | Selectivity parameterizations | Fixed selectivity | Non-parametric (Type 1) | Logistic | Time-varying logistic | Double logistic | Time-varying double logistic 1 (ascending and descending time-varying parameters) | Time-varying double logistic 2 (random walk ascending-time varying parameters) | Descending logistic | Time-varying descending logistic | Non-parametric (Type 2) | Time-varying non-parametric (Type 2 for hake) | Catchability parameterizations | Linear time-invariant catchability formulations | Time-varying catchability formulations

Last update: 2026-07-04
Started: 2026-05-08

Environmental linkages and priors: a formula-driven API
Overview | A first example: temperature on K | The linkage_spec() API | Priors | Putting a prior on the parameter itself | Growth SD endpoints | Species- and (species, sex)-specific priors | Per-species formulas | Per-sex formulas | Polynomial and basis-expansion formulas | How the pieces fit together | Natural mortality | Recruitment | A multi-process example | Inspecting and debugging | Behind the scenes: automatic base-parameter handling | init and the base parameter | Stratification | Single-sex models and by = ~ ... + sex | On the roadmap | See also

Last update: 2026-07-04
Started: 2026-05-08

Growth estimation with linkages and priors
Overview | Load data and inspect the growth dataset | Build a growth model with linkages | What this linkage does | Fit the model | Inspect the linkage table and prior contributions | Compare with an unlinked baseline model and Richards model | Notes on priors through linkages

Last update: 2026-07-04
Started: 2026-05-08

Readme and manuals

Help Manual

Help pageTopics
Helper to adjust map for shared catchability/selectivity indicesadjust_map_shared_params
Tidy long-format derived quantities from an Rceattle fitas.data.frame.Rceattle
Data inputs for Atka mackerel CEATTLE model (2022)Atka2022
Data inputs for multispecies CEATTLE of the Bering Sea from 1979 to 2017BS2017MS
Data inputs for single species CEATTLE of the Bering Sea from 1979 to 2017BS2017SS
Build parameter boundsbuild_bounds
Specify the growth model for Rceattlebuild_growth
Specify the harvest control rule (HCR) used for Rceattlebuild_hcr
Function to construct the TMB map argument for CEATTLE for projecting under alternative harvest control rulesbuild_hcr_map
Define M1 specificationsbuild_M1
Main function to construct the TMB map argument for CEATTLEbuild_map
Helper to set map for Catchability parametersbuild_map_catchability
Helper to set map for debug modebuild_map_debug
Helper to set map for Fishing Mortality and Data Weightsbuild_map_f_and_data_weights
Helper to set map for Fixed N-at-Age modelsbuild_map_fixed_natage
Helper to set map for growth parametersbuild_map_growth
Helper to set map for Natural Mortality (M1) parametersbuild_map_m1
Helper to set map for Predation Mortality (M2) parametersbuild_map_predation
Helper to set map for Recruitment parametersbuild_map_recruitment
Helper to set map for Selectivity parametersbuild_map_selectivity
Build parameter list from cpp filebuild_params
Specify the stock-recruit relationship (SRR) for Rceattlebuild_srr
Function to load .RDs files from MSE runscheck_mse
Function to clean data prior to Rceattle runsclean_data
Extract estimated parameters from an Rceattle fitcoef.Rceattle
Combine data sets. Will use the env_data data set from data_set1 and diet data will have to be updated.combine_data
Evaluate simulation performancecompare_sim
Convergence diagnostics for a fitted Rceattle modelconvergence_diagnostics
Fitted multispecies CEATTLE model for the Eastern Bering SeaEBS_ms_run
Fitted single-species CEATTLE model with estimated M for the Eastern Bering SeaEBS_ss_M_run
Fitted single-species CEATTLE model for the Eastern Bering SeaEBS_ss_run
Bundle the optimizer / sdreport / phasing controls for 'fit_mod()'fit_control
This function runs CEATTLEfit_mod
Data inputs for a three-species Georges Bank CEATTLE modelGeorgesBank3spp
Generate Length-at-Age Transition Matrixget_growth_matrix_r
Calculate Predicted Weight-at-Ageget_weight_at_age_r
Data inputs for a single-species Gulf of Alaska CEATTLE model (2018)GOA2018SS
Data inputs for Gulf of Alaska arrowtooth flounder CEATTLE modelGOAatf
Data inputs for Gulf of Alaska arrowtooth flounder CEATTLE model (2023)GOAatf2023
Data inputs for Gulf of Alaska Pacific cod CEATTLE modelGOAcod
Data inputs for Gulf of Alaska walleye pollock CEATTLE modelGOApollock
Gulf of Alaska 2018 SAFE report reference valuesGOAsafe2018
Jitter analysisjitter
Capture a linkage specificationlinkage_spec
Function to load .RDs files from MSE runsload_mse
Log-likelihood of an Rceattle fitlogLik.Rceattle
Model average of derived quantitiesmodel_average
Management strategy evaluation performance metric summarymse_summary
Data inputs for Northern Rockfish CEATTLE model (2022)NorthernRockfish2022
Statistical diagnostics for OSA residualsosa_diagnostics
One-step-ahead (OSA) residuals for an Rceattle modelosa_residuals
Plot biomass eatenplot_b_eaten
Plot biomass consumed of each prey species by predatorplot_b_eaten_prop
Plot biomassplot_biomass
Landings fitsplot_catch
Plot composition fits and residualsplot_comp
Timeline of data used in the model likelihoodsplot_data
Plot biomass depletionplot_depletion
Plot SSB depletionplot_depletionSSB
Plot diet composition fitsplot_diet_comp
Plot exploitable biomassplot_exploitable_biomass
plot Fplot_f
Plot functional formplot_form
CPUE fitsplot_index
CPUE residualplot_indexresidual
log(CPUE) fitsplot_logindex
Plot natural mortality by ageplot_m_at_age
Plot predation mortality by age and predatorplot_m2_at_age_prop
Plot maturityplot_maturity
Plot M1 + M2plot_mortality
Plot rationplot_ration
Plot recruitmentplot_recruitment
Plot selectivityplot_selectivity
Plot fishery selectivity and maturityplot_selectivity_vs_maturity
Plot spawning stock biomass (SSB)plot_ssb
Plot SSB depletion (deprecated name)plot_ssb_depletion
Plot stock recruit functionplot_stock_recruit
Plot time-seriesplot_timeseries
Plot method for fitted Rceattle modelsplot.Rceattle
Plot one-step-ahead (OSA) residual diagnosticsplot.rceattle_osa
Print method for fitted Rceattle modelsprint.Rceattle
Beta prior on a linkage coefficientprior_beta
Gamma prior on a linkage coefficientprior_gamma
Lognormal prior on a linkage coefficientprior_lognormal
Normal prior on a linkage coefficientprior_normal
Process residuals for an Rceattle model's random-effect processesprocess_residuals
Likelihood profile across one or more parameter cellsprofile.Rceattle
Read a CEATTLE excel data fileread_data
Rearrange a data_list for TMBrearrange_dat rearrange_data
Rerun with F = 0.remove_F
Function to rename derived quantities from Rceattlerename_output
Residuals from an Rceattle fitresiduals.Rceattle
Retrospective peelsretrospective
Make a vector of colors.rich.colors.short
Run a management strategy evaluationrun_mse
Sample historical recruitment deviates and place in the projectionsample_rec
Self test simulation analysis analysisself_test
Function to set phasing orderset_phases
Simulate Rceattle datasim_mod
Compact summary method for Rceattle fitssummary.Rceattle
Function to check for missing switches for map and parameter functionsswitch_check
#https://www.dataanalytics.org.uk/make-transparent-colors-in-r/t_col
Calculate marginal AIC for a fitted modelTMBAIC
Run TMB using phasesTMBphase
Variance-covariance matrix for an Rceattle fitvcov.Rceattle
Data inputs for CEATTLE model with WHAM-estimated growthwhamGrowthData
Write data filewrite_data