The advanced user interface to the a4a fitting routine.

a4aInternal(
  stock,
  indices,
  fmodel = defaultFmod(stock),
  qmodel = defaultQmod(indices),
  srmodel = defaultSRmod(stock),
  n1model = defaultN1mod(stock),
  vmodel = defaultVmod(stock, indices),
  covar = missing,
  wkdir = missing,
  verbose = FALSE,
  fit = "assessment",
  center = TRUE,
  mcmc = missing
)

Arguments

stock

an FLStock object containing catch and stock information

indices

an FLIndices object containing survey indices

fmodel

a formula object depicting the model for log fishing mortality at age

qmodel

a list of formula objects depicting the models for log survey catchability at age

srmodel

a formula object depicting the model for log recruitment

n1model

a formula object depicting the model for the first year of catch data

vmodel

a list of formula objects depicting the models for log survey and log fishing mortality variance

covar

a list with covariates

wkdir

used to set a working directory for the admb optimiser. If wkdir is set all admb files are saved to this folder otherwise they are deleted.

verbose

if true admb fitting information is printed to the screen

fit

character with type of fit: 'MP' or 'assessment'; the former doesn't require the hessian to be computed, while the latter does.

center

logical specifying whether data is centered before estimating or not

mcmc

SCAMCMC specifying parameters for the ADMB MCMC run, check ADMB manual for detailed description

Value

an a4aFit object if fit is "MP" or an a4aFitSA if fit is "assessment"