Package: ss3sim 1.24.0

Kelli F. Johnson

ss3sim: Fisheries Stock Assessment Simulation Testing with Stock Synthesis

A framework for fisheries stock assessment simulation testing with Stock Synthesis (SS3) as described in Anderson et al. (2014) <doi:10.1371/journal.pone.0092725>.

Authors:Kelli F. Johnson [aut, cre], Sean C. Anderson [aut], Kathryn L. Doering [aut], Cole C. Monnahan [aut], Christine C. Stawitz [aut], Curry Cunningham [ctb], Allan Hicks [ctb], Felipe Hurtado-Ferro [ctb], Peter Kuriyama [ctb], Roberto Licandeo [ctb], Carey McGilliard [ctb], Giancarlo H. Moron Correa [ctb], Melissa Murdian [ctb], Kotaro Ono [ctb], Merrill Rudd [ctb], Cody Szuwalski [ctb], Ian G. Taylor [ctb], Juan Valero [ctb], Athol Whitten [ctb], Kiva L. Oken [ctb]

ss3sim_1.24.0.tar.gz
ss3sim_1.24.0.zip(r-4.7)ss3sim_1.24.0.zip(r-4.6)ss3sim_1.24.0.zip(r-4.5)
ss3sim_1.24.0.tgz(r-4.6-any)ss3sim_1.24.0.tgz(r-4.5-any)
ss3sim_1.24.0.tar.gz(r-4.7-any)ss3sim_1.24.0.tar.gz(r-4.6-any)
ss3sim_1.24.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html
DESCRIPTION |NEWS
card.svg |card.png
ss3sim/json (API)

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

Bug tracker:https://github.com/ss3sim/ss3sim/issues

Datasets:
  • codemctl - Control file for the cod estimation method
  • codomctl - Control file for the cod operating model
  • codomdat - Data for the cod operating model
  • scalar_dat - Example scalar data from the Introduction vignette
  • ts_dat - Example time-series data from the Introduction vignette

On CRAN:

Conda:

fisheriessimulationstock-synthesis

8.76 score 41 stars 139 scripts 650 downloads 1 mentions 53 exports 79 dependencies

Last updated from:4ac162d930. Checks:7 WARNING, 2 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-x86_64WARNING198
source / vignettesOK234
linux-release-x86_64WARNING173
macos-release-arm64WARNING144
macos-oldrel-arm64WARNING145
windows-develWARNING120
windows-releaseWARNING128
windows-oldrelWARNING120
wasm-releaseOK128

Exports:calculate_data_unitscalculate_rechange_dat_binchange_datachange_echange_em_ageerrchange_em_binningchange_fchange_ochange_qchange_rec_devschange_retrochange_tail_compressionchange_tvcheck_datacheck_qconvert_to_widecopy_ss3modelscreate_emfill_acrossfind_positionget_binget_model_folderget_recdevsget_results_allget_results_derivedget_results_iterget_results_modget_results_scalarget_results_scenarioget_results_timeseriesget_scenariosget_sigmarplot_boxplotplot_cummeanplot_linesplot_pointsprofile_fmsyrun_ss3simsample_agecompsample_calcompsample_catchsample_discardsample_indexsample_lcompsample_mlacompsample_wtatagesetup_binssetup_scenariossetup_scenarios_defaultssetup_scenarios_fleetss3sim_baseverify_input

Dependencies:askpassbase64encbslibcachemclicodacodetoolscorpcorcpp11curldigestdplyrevaluatefarverfastmapfontawesomeforcatsforeachfsfurrrfuturegenericsggplot2gitcredsglobalsgluegridExtragtablegtoolshighrhtmltoolshttr2iniisobanditeratorsjquerylibjsonlitekableExtraknitrlabelinglatticelifecyclelistenvmagrittrmemoisemimeopensslparallellypillarpkgconfigpurrrr4ssR6rappdirsRColorBrewerrlangrmarkdownrstudioapiS7sassscalesstringistringrsvglitesyssystemfontstextshapingtibbletidyrtidyselecttinytexutf8vctrsviridisviridisLitewithrxfunxml2yaml

Creating new ss3sim model setups
Overall file structure | Setting up a new operating model | Forecast file modifications | Starter file modifications | Control file modifications | Data file modifications | Setting up a new estimation model | Testing the new estimation model

Last update: 2026-04-13
Started: 2015-01-26

Introduction to ss3sim
Overview | Stock Synthesis | Installation | Installing | Installing Stock Synthesis | Installing dependent R packages | Scenarios | File structure | Input file structure | Simulation file structure | Example simulations | Setting up the example | Fishing mortality | Composition data | Survey index of abundance | Estimating parameters | Visualizing the results | Self test to check for bias | Setup self test | Run self-test | Checking output | Beautiful output | .csv files | Post-processing of results | Calculate the relative error (RE) | Merge scalar and time series | Separate the deterministic from the stochastic runs | Boxplots | Stochasticity | Generating observation error | calculate_data_units() | Distributional assumptions for observation error | Indices of abundance | Effective sample sizes | Age and length compositions | Sampling with overdispersion | Structure of data bins | Mean length at age | Conditional age at length | Generating process error | Reproducibility | Detailed features | Time-varying parameters in the OM | Parallel computing | References

Last update: 2026-04-13
Started: 2015-01-26

Modifying the model included with ss3sim
Modifying the OM and EM models included with ss3sim

Last update: 2022-05-26
Started: 2015-01-26

Readme and manuals

Help Manual

Help pageTopics
Create matching column names across a list of data framesadd_colnames
Add short time varying parameter lines. At time of writing, this method will work for MG, selectivity, and catchability time varying, but not for SRadd_tv_parlines
Calculate bias adjustment for recruitment deviationscalculate_bias
Calculate fleets, years, and data types needed given sampling parameterscalculate_data_units
Calculate relative errorcalculate_re
Change catch in the Stock Synthesis data listchange_catch
Change composition data to dummy data for running the operating modelchange_comp
Change the bins for a composition objectchange_dat_bin
Change the data that is available from a list objectchange_data
Methods to alter the parameters estimated in a Stock Synthesis modelchange_e
Change ageing-error matrix in estimation modelchange_em_ageerr
Change population and observed length-composition binschange_em_binning
Specify fishing mortality, F, using the Stock Synthesis control filechange_f
Set the robustification constant for length-composition datachange_lcomp_constant
Methods to include parameters in a Stock Synthesis operating modelchange_o
Set up population length bin structurechange_pop_bin
Adds or removes catchability parameters from a control filechange_q
Replace recruitment deviationschange_rec_devs
Change start year main recruitment deviations in control filechange_recyear
Alter a starter file for a retrospective analysischange_retro
Change start year of the data filechange_startyear
Replace tail compression value for length composition datachange_tail_compression
Methods to include time-varying parameters in a Stock Synthesis operating modelchange_tv
Change the years estimatedchange_year
Check that the Stock Synthesis data file looks correctcheck_data
Check input arguments for datacheck_data_str_range
Check if input arguments have the same lengthcheck_eqlength
Check input forecast file valuescheck_forecast
Check if desired q parameters exist in control file listcheck_q
Given sampling arguments, remove unneeded data from a .dat fileclean_data
Control file for the cod estimation methodcodemctl
Control file for the cod operating modelcodomctl
Data for the cod operating modelcodomdat
Convert long-style ss3sim output to wide formatconvert_to_wide
Copy the OM or EM into a scenario directorycopy_ss3models
Create an EM from an OMcreate_em
Create the ss3sim logocreate_logo
Helper function for building a ggplot facetfacet_form
Fill in matrix across rows of weight-at-age data by interpolationfill_across
Find integer reference to fleet namesfind_position
Get Stock Synthesis binary/executable locationget_bin
Get summaries of fits to composition data from report file listget_compfit
Get the folder location of an included Stock Synthesis model configurationget_model_folder
Get negative log likelihood (NLL) values from a report file listget_nll_components
Return a set of recruitment deviationsget_recdevs
Extract Stock Synthesis simulation outputget_results_all
Extract time series from a model run with the associated standard deviation.get_results_derived
Get results for 1 iterationget_results_iter
Get results for 1 model runget_results_mod
Extract scalar quantities from a model run.get_results_scalar
Extract Stock Synthesis simulation results for one scenarioget_results_scenario
Return the time series information from an iterationget_results_timeseries
Identify scenarios in 'directory'get_scenarios
Get Variability About Recruitment Deviations (sigma_R)get_sigmar
Determine if a Stock Synthesis run was successfulget_success
Make a list of lists with dataframe components into a dataframesmake_df
Plot results of a simulation as boxplotsplot_boxplot
Plot the cumulative mean for a parameterplot_cummean
Plot time-series values as linesplot_lines
Plot results of a simulation as a scatterplotplot_points
Base plot for 'ss3sim' dataplot_ss3sim
Determine Fmsy for a given operating modelprofile_fmsy
Replace a 'NULL' value with 'NA' in a listreplace_x
Master function to run a set of simulations using 'ss3sim'run_ss3sim
Sample age compositions from a Stock Synthesis data filesample_agecomp
Sample conditional age-at-length datasample_calcomp
Sample the catches with observation errorsample_catch
Sample composition data from expected valuessample_comp
Sample the discard with observation errorsample_discard
Sample with a Dirichlet-Multinomial distributionsample_dm
Sample the CPUE/index data with observation errorsample_index
Sample length compositions from a Stock Synthesis data filesample_lcomp
Sample observations using log-normal error corrected for biassample_lognormal
*BETA VERSION* Sample mean length (size-)-at-age data and write to file for use by the EMsample_mlacomp
Sample with a multinomial distributionsample_mn
Sample empirical weight-at-age datasample_wtatage
Example scalar data from the Introduction vignettescalar_dat
Set up bin structure for composition datasetup_bins
Setup parallel processingsetup_parallel
Get scenario information from a data frame of specificationssetup_scenarios
Set up a generic scenariosetup_scenarios_defaults
Set up fleet-specific informationsetup_scenarios_fleet
Create a named vector to look up full names for types of argumentssetup_scenarios_lookup
Create a name for an unnamed scenariosetup_scenarios_name
High-level wrapper to run a simulationss3sim_base
Check and standardize list components of sampling functionsstandardize_sampling_args
Example time-series data from the Introduction vignettets_dat
Verify and standardize Stock Synthesis input filesverify_input
Helper function for ensuring correct input for the plotting functionsverify_plot_arguments