g3_jitter: Jitter analysis

View source: R/g3_jitter.R

g3_jitterR Documentation

Jitter analysis

Description

g3_jitter performs a jitter analysis.

Usage

g3_jitter(
  gd,
  outdir = "JITTER",
  model,
  params,
  njits = 10,
  jitter_fraction = 0.1,
  pattern_to_ignore = NULL,
  within_bounds = TRUE,
  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_tmb() or g3_to_r()

params

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

njits

Number of jitters to run, defaults to 10

jitter_fraction

The fraction of jittering for a value

pattern_to_ignore

Regular expression of parameters to avoid jittering

within_bounds

Logical, if TRUE, jittered values that fall outside parameter bounds (params$lower, params$upper) will be adjusted to fall within the bounds

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

A list of optimised parameter data frames (one for each jitter)


gadget-framework/gadgetutils documentation built on Nov. 11, 2024, 6:25 p.m.