Package: wham 2.0.0

Tim Miller

wham: Woods Hole Assessment Model (WHAM)

The Woods Hole Assessment Model (WHAM) is a general age-structured stock assessment framework that can be configured to estimate assessment models that range in complexity from statistical catch-at-age (SCAA) model with annual recruitments as fixed effects, to state-space, multi-stock, multi-region, age-structured models where many parameters can be treated as time- and age-varying process errors and/or allowing effects of environmental covariates. WHAM is a generalization of code from Miller et al. (2016), Miller and Hyun (2018), and Miller et al. (2018). WHAM also has many similarities of input data sources with ASAP (Legault and Restrepo 1999) and provides functions to generate a WHAM input file from an ASAP3 dat file, although this is not a requirement. Many of the plotting functions for input data, results, and diagnostics have modified from code written by Chris Legault and Liz Brooks.

Authors:Tim Miller [aut, cre], Brian Stock [aut], Liz Brooks [ctb], Chris Legault [ctb], Jim Thorson [ctb]

wham_2.0.0.tar.gz
wham_2.0.0.zip(r-4.5)wham_2.0.0.zip(r-4.4)wham_2.0.0.zip(r-4.3)
wham_2.0.0.tgz(r-4.5-x86_64)wham_2.0.0.tgz(r-4.5-arm64)wham_2.0.0.tgz(r-4.4-x86_64)wham_2.0.0.tgz(r-4.4-arm64)wham_2.0.0.tgz(r-4.3-x86_64)wham_2.0.0.tgz(r-4.3-arm64)
wham_2.0.0.tar.gz(r-4.5-noble)wham_2.0.0.tar.gz(r-4.4-noble)
wham_2.0.0.tgz(r-4.4-emscripten)wham_2.0.0.tgz(r-4.3-emscripten)
wham.pdf |wham.html
wham/json (API)

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

Bug tracker:https://github.com/timjmiller/wham/issues

Pkgdown site:https://timjmiller.github.io

Uses libs:
  • c++– GNU Standard C++ Library v3

On CRAN:

Conda:

fisheries-stock-assessmentstate-spacecpp

5.49 score 35 stars 34 exports 81 dependencies

Last updated 2 months agofrom:c9983ffaf2. Checks:12 ERROR. Indexed: no.

TargetResultLatest binary
Doc / VignettesFAILMar 20 2025
R-4.5-win-x86_64ERRORMar 20 2025
R-4.5-mac-x86_64ERRORMar 20 2025
R-4.5-mac-aarch64ERRORMar 20 2025
R-4.5-linux-x86_64ERRORMar 20 2025
R-4.4-win-x86_64ERRORMar 20 2025
R-4.4-mac-x86_64ERRORMar 20 2025
R-4.4-mac-aarch64ERRORMar 20 2025
R-4.4-linux-x86_64ERRORMar 20 2025
R-4.3-win-x86_64ERRORMar 20 2025
R-4.3-mac-x86_64ERRORMar 20 2025
R-4.3-mac-aarch64ERRORMar 20 2025

Exports:%>%check_convergencecheck_estimabilitycompare_wham_modelsdo_reference_pointsdo_retro_peelsdo_sdreportfit_peelfit_tmbfit_whamjitter_whammake_osa_residualsmohns_rhoplot_wham_outputprepare_projectionprepare_wham_inputproject_whamread_asap3_datread_asap3_fitread_wham_fitretroself_testset_age_compset_catchset_ecovset_Fset_indicesset_Lset_Mset_moveset_NAAset_osa_obsset_qset_selectivity

Dependencies:backportsbase64encbslibcachemcheckmatecliclustercolorspacecpp11data.tableDerivdigestdplyrellipseevaluatefansifarverfastmapfontawesomeforeignFormulafsgenericsggplot2gluegridExtragtablehighrHmischtmlTablehtmltoolshtmlwidgetsisobandjquerylibjsonlitekableExtraknitrlabelinglatticelifecyclemagrittrMASSMatrixmemoisemgcvmimemnormtmunsellnlmennetpillarpkgconfigpurrrR6rappdirsRColorBrewerRcppRcppEigenrlangrmarkdownrpartrstudioapisassscalesstringistringrsvglitesystemfontstibbletidyrtidyselecttinytexTMButf8vctrsviridisviridisLitewithrxfunxml2yaml

Readme and manuals

Help Manual

Help pageTopics
Pipe function%>%
Check convergence of WHAM modelcheck_convergence
Check for identifiability of fixed effects Originally provided by https://github.com/kaskr/TMB_contrib_R/TMBhelper Internal function called by 'fit_tmb'.check_estimability
Compare multiple WHAM (or ASAP) modelscompare_wham_models
Add reporting of biological reference points to WHAM modeldo_reference_points
Fit retrospective peels and add them to the fitted model objectdo_retro_peels
Add TMB sdreport object to WHAM modeldo_sdreport
Extract fixed effects Originally provided by https://github.com/kaskr/TMB_contrib_R/TMBhelper Internal function called by 'check_estimability'.extract_fixed
Fit model peeling off _i_ years of datafit_peel
Fit TMB model using nlminbfit_tmb
Fit WHAM modelfit_wham
Jitter starting values of a fitted WHAM modeljitter_wham
Calculate one-step-ahead residualsmake_osa_residuals
Calculate Mohn's rho for a WHAM model with peelsmohns_rho
Plot WHAM outputplot_wham_output
Prepare input data and parameters to project an already fit WHAM modelprepare_projection
Prepare input data and parameters for WHAM modelprepare_wham_input
Project a fit WHAM modelproject_wham
Read an ASAP3 .dat file into Rread_asap3_dat
Read ASAP3 fitread_asap3_fit
Read WHAM fitread_wham_fit
Reduce the years of the modelreduce_input
Run retrospective analysisretro
Perform self-test simulation and estimation of a fitted WHAM modelself_test
Specify the age composition models for fleet(s) and indices.set_age_comp
Specify catch selectivity blocks and aggregate and age composition observations for catchset_catch
Specify configuration for environmental covariates, effects on the population, and parameter valuesset_ecov
Specify configuration for fully-selected fishing mortalityset_F
Specify index selectivity blocks and aggregate and age composition observations for indicesset_indices
Specify model and parameter configuration for "extra" mortality not directly attributed to natural mortalityset_L
Specify model and parameter configuration for natural mortalityset_M
Specify model and parameter configuration for movement when input$data$n_regions > 1set_move
Specify model and parameter configuration for numbers at ageset_NAA
Set up observation vector that is used by the model for likelihood calculations and one-step-ahead residuals.set_osa_obs
Specify model and parameter configuration for catchabilityset_q
Specify model and parameter configuration for selectivityset_selectivity
Create HTML file to view output plots in browserwham_html