| Literature DB >> 24699270 |
Sean C Anderson1, Cole C Monnahan2, Kelli F Johnson3, Kotaro Ono3, Juan L Valero4.
Abstract
Simulation testing is an important approach to evaluating fishery stock assessment methods. In the last decade, the fisheries stock assessment modeling framework Stock Synthesis (SS3) has become widely used around the world. However, there lacks a generalized and scriptable framework for SS3 simulation testing. Here, we introduce ss3sim, an R package that facilitates reproducible, flexible, and rapid end-to-end simulation testing with SS3. ss3sim requires an existing SS3 model configuration along with plain-text control files describing alternative population dynamics, fishery properties, sampling scenarios, and assessment approaches. ss3sim then generates an underlying 'truth' from a specified operating model, samples from that truth, modifies and runs an estimation model, and synthesizes the results. The simulations can be run in parallel, reducing runtime, and the source code is free to be modified under an open-source MIT license. ss3sim is designed to explore structural differences between the underlying truth and assumptions of an estimation model, or between multiple estimation model configurations. For example, ss3sim can be used to answer questions about model misspecification, retrospective patterns, and the relative importance of different types of fisheries data. We demonstrate the software with an example, discuss how ss3sim complements other simulation software, and outline specific research questions that ss3sim could address.Entities:
Mesh:
Year: 2014 PMID: 24699270 PMCID: PMC3974719 DOI: 10.1371/journal.pone.0092725
Source DB: PubMed Journal: PLoS One ISSN: 1932-6203 Impact factor: 3.240
Figure 1Flow diagram of the main steps in an ss3sim simulation carried out using run_ss3sim.
Functions that are called internally are shown in a monospaced font.
Main ss3sim functions and a description of their purpose.
| Function name | Description |
| run_ss3sim | Main high-level function to run |
| ss3sim_base | Underlying base simulation function. Can also be called directly. |
| change_rec_devs | Substitutes recruitment deviations. |
| change_f | Adds fishing mortality time series. (Case file and ID |
| change_tv | Adds time-varying features. For example, time-varying natural mortality, growth, or selectivity.(Any case file and ID, e.g. |
| change_index | Controls how the fishery and survey indices are sampled. (Case file index, case ID |
| change_agecomp | Controls how age composition data are sampled. (Case file agecomp, case ID |
| change_lcomp | Controls how length composition data are sampled. (Case file lcomp, case ID |
| change_retro | Controls the number of years to discard for a retrospective analysis. (Case file and ID |
| change_e | Controls which and how parameters are estimated. (Case file and ID |
| run_bias_ss3 | Determines the level of adjustment to ensure mean-unbiased estimates of recruitment and biomass. |
| get_results_scenario | Extracts results for a single scenario. |
| get_results_all | Extracts results for a series of scenarios. |
Simulations can be run through the run_ss3sim function, which then calls the change functions. Users can control what the change functions do through a series of plain-text case files. For example, the case ID d1 corresponds to the case files lcomp1, agecomp1, and index1, as described in the table. Users can also skip setting up case files and specify arguments to ss3sim_base directly, or use the change functions as part of their own simulation structure (see the vignette).
Figure 2Illustration of input and output folder and file structure for an ss3sim simulation.
Folders are shown in blue, input files in orange, and output files in grey. All input and output files are in plain text format. OM refers to operating model and EM to estimation model. Case files (orange files at bottom left) combine cases (e.g. M0 for a given natural mortality trajectory) with species or life-history OMs and EMs (e.g. cod-like or sardine-like). Alternatively, a user can skip setting up case files and specify the simulation cases directly in R code (see the vignette).
Figure 3Example output from an ss3sim simulation.
We ran a crossed simulation in which we considered (1) the effect of fixing natural mortality (M) at its true value (0.2; case E0) or estimating M (case E1) and (2) the effect of high survey effort (; case D0) or low survey effort (; case D1). Upper panels (blue) show time series of relative error in spawning stock biomass (SSB). Lower panels (grey) show the distribution of relative error across four scalar variables: depletion (the ratio of terminal year spawning biomass to unfished spawning biomass), M, SSB at maximum sustainable yield (), and fishing mortality () in the terminal year. We show the values across simulation iterations with dots and the distributions with beanplots (kernel density smoothers).