g3_retro: Analytical retrospective

View source: R/g3_retro.R

g3_retroR Documentation

Analytical retrospective

Description

g3_retro runs an analytical retrospective model fitting run.

Usage

g3_retro(
  gd,
  outdir = "RETRO",
  model,
  params,
  nyears = 5,
  use_parscale = TRUE,
  method = "BFGS",
  control = list(),
  serial_compile = FALSE,
  mc.cores = parallel::detectCores()
)

Arguments

gd

Directory to store output

outdir

Directory name within gd to store run outputs

model

A G3 model, produced by g3_to_r() or g3_tmb_adfun()

params

Initial parameters to use with the model, this should be a TMB parameter template i.e. attr(tmb_model, 'parameter_template')

nyears

How many years back to go

use_parscale

Logical indicating whether optim(control$parscale) should be used

method

The optimisation method, see optim

control

List of control options for optim, see optim

serial_compile

g3_tmb_adfun will be run in serial mode (i.e., not in parallel), potentially helping with memory issues

mc.cores

The number of cores to use, defaults to the number available

Value

List optimised TMB parameter data.frames, the name of each list element corresponds to the number of years peeled in the retrospective analysis.


gadget-framework/gadgetutils documentation built on Aug. 16, 2024, 8:45 a.m.