A function that uses the file location of a fitted SS3 model including input files to population the various slots of an operating model with MLE parameter estimates. The function mainly populates the Stock and Fleet portions of the operating model; the user still needs to parameterize most of the observation and implementation portions of the operating model.
SS2OM(
SSdir,
nsim = 48,
proyears = 50,
reps = 1,
maxF = 3,
seed = 1,
interval = 1,
Obs = DLMtool::Generic_Obs,
Imp = DLMtool::Perfect_Imp,
import_mov = TRUE,
gender = 1:2,
age_rec = 1,
silent = FALSE,
Name = "OM generated by SS2OM function",
Source = "No source provided",
Author = "No author provided",
report = FALSE,
filename = "SS2OM",
dir = tempdir(),
open_file = TRUE,
...
)
A folder with Stock Synthesis input and output files in it.
The number of simulations to take for parameters with uncertainty (for OM@cpars custom parameters).
The number of projection years for MSE
The number of stochastic replicates within each simulation in the operating model.
The maximum allowable F in the operating model.
The random seed for the operating model.
The interval at which management procedures will update the management advice in runMSE, e.g., 1 = annual updates.
The observation model (class Obs). This function only updates the catch and index observation error.
The implementation model (class Imp). This function does not update implementation parameters.
Logical, whether to import movement matrix from the assessment.
An integer that indexes the sex for importing life history parameters (1 = usually female, 2 = usually male, 1:2 = mean across both sexes).
Integer for the age of recruitment. The default is 1 for DLMtool operating models. Generally, should not be changed.
Whether to silence messages to the console.
The name of the operating model
Reference to assessment documentation e.g. a url
Who did the assessment
Logical, if TRUE, the function will run runMSE to generate historical data from the operating model to compare against SS output. A markdown report will be generated.
If report = TRUE
, character string for the name of the markdown and HTML files.
If report = TRUE
, the directory in which the markdown and HTML files will be saved.
If report = TRUE
, whether the HTML document is opened after it is rendered.
Arguments to pass to SS_output.
An object of class OM.
The function generally uses values from the terminal year of the assessment for most life history parameters (maturity, M, etc). This function does detect time-varying growth in the assessment and uses annual length/weight-at-age for historical years. Selectivity is derived from the F-at-age matrix.