run_adnuts: Run the adnuts MCMC for the model found in the directory...

View source: R/run-adnuts.R

run_adnutsR Documentation

Run the adnuts MCMC for the model found in the directory given

Description

Run the adnuts MCMC for the model found in the directory given

Usage

run_adnuts(
  path,
  num_chains = NULL,
  seed = 42,
  num_samples = 8000,
  num_warmup_samples = 250,
  adapt_delta = 0.95,
  run_extra_mcmc = FALSE,
  hess_step = TRUE,
  fn_exe = ss_executable,
  overwrite = TRUE,
  fn_logfile = model_output_log_fn,
  input_files = ss_input_files
)

Arguments

path

Directory where the model files reside

num_chains

The number of chains to run in parallel. If NULL, 1 less than the number of cores on the machine will be used 1 less than the number of cores on the machine will be used

seed

The random seed used to draw the random seeds for each chain

num_samples

The number of samples to output

num_warmup_samples

The warmup samples (equivalent of burnin)

adapt_delta

The target acceptance rate. See adnuts::sample_admb()

run_extra_mcmc

If TRUE, run SS extra mcmc option which outputs files into the sso subdirectory. If FALSE, those files will not be created and the posteriors.sso and dervied_posteriors.sso files will be in the running directory

hess_step

Logical. If TRUE, use the hess_step algorithm'

fn_exe

The name of the executable which was built using ADMB

overwrite

Logical. If TRUE and in an interactive session, don't ask user if they want to overwrite if the directory already exists, just do it. If non-interactive, the output will be overwritten and this will be ignored

fn_logfile

The filename of the logfile

input_files

The input files for SS

Details

path is the directory in which the MLE will be run, a subdirectory of this called mcmc is where the MCMC will be run using the NUTS algorithm. Inside the mcmc directory, several temporary subdirectories will be created, one for each MCMC chain labeled ⁠chain_*⁠, AkA CPU number used in the parallel execution. These will disappear once the run has completed and the output has been merged.

Value

Nothing


pacific-hake/hake-assessment documentation built on Nov. 8, 2024, 1:16 p.m.