Create estimation model (EM) files from operating model (OM) files. By making small changes to the OM rather than having two sets of files, less files need to be maintained. Differences between the OM and EM are mainly related to how the OM takes input fishing mortality values rather than absolute catches.
create_em(
dir_in = system.file("extdata", "models", "cod-om", package = "ss3sim"),
dir_out = file.path(getwd(), "new-em")
)
A file path to a directory that contains the following files:
forecast.ss
, starter.ss
, and a control file
(e.g., xxxOM.ctl
). The default is to get the codOM within ss3sim.
A file path to a directory where the new files will be saved.
The default is to save the files in your current working directory in a
folder called new-em
.
Nothing is returned, but three files are saved to the disk in the specified folder that may also be new.
Most changes to the EM control file relate to recruitment and fishing. The phase in which recruitment deviations are estimated is checked to ensure that it is positive. Though, this might be unnecessary because the OM file can have negative or positive phases. Thus, users are encouraged to just set the phase in which recruitment is estimated in the OM at the value that they would like to use in the EM. Additional changes are made to the bias adjustment procedure based on the biology of the stock.
The F_Method
is set to 3 to allow the model to estimate fishing mortality
based on catches in the data file. Users might want to adjust the maximum
fishing mortality based on their scenarios.
No data file is needed for the EM.
The data_expval.ss
file produced when executing the OM contains the
expected values of the OM population dynamics.
ss3sim provides three functions which carry out the random sampling
process and generate .dat
files to be used in the EM.
See the Introduction vignette vignette("introduction", package = "ss3sim")
for more details.
Nothing is changed in the forecast file from the OM.
The names of the data and control files are specified and the maximum phase for estimation is set to 100.