run_retrospectives: Runs retrospectives for the given model and for the vector of...

View source: R/run-retrospectives.R

run_retrospectivesR Documentation

Runs retrospectives for the given model and for the vector of years given

Description

Runs retrospectives for the given model and for the vector of years given

Usage

run_retrospectives(
  model = NULL,
  model_path = NULL,
  retro_yrs = retrospective_yrs,
  num_chains = 1,
  retro_mcmc = TRUE,
  ss_exe = NULL,
  ...
)

Arguments

model

The SS model output as loaded by create_rds_file()

model_path

The path of the model run

retro_yrs

A vector of number of years value prior to current end year in the model to run retrospectives for. Example if this is c(1, 5) then two retrospectives will be run, one with 1 year of data removed and one with 5 years of data removed

retro_mcmc

If TRUE, run the ADNUTS MCMC in the mcmc subdirectory for each retrospective in addition to the MLE run

ss_exe

The name of executable to use or NULL to use the package data variable ss_executable

...

Arguments passed to load_ss_files() and run_adnuts()

Details

This will:

  1. Create a directory with the name found in the package data variable retrospectives_path directory in the same directory that the model resides in

  2. Create subdirectories for each retrospective year

  3. Copy all SS3 model input files into each directory

  4. Run a retrospective for each year found in retro_yrs

Value

base::invisible()


pacific-hake/hake-assessment documentation built on Jan. 14, 2025, 9:12 p.m.