Internal function called by retro for i in 1--n.peels. Fits the model peeling off i years of data (calls fit_tmb).

fit_peel(
  peel,
  input,
  do.sdrep = FALSE,
  n.newton = 3,
  MakeADFun.silent = FALSE,
  retro.silent = FALSE,
  save.input = FALSE
)

Arguments

peel

Integer, number of years of data to remove before model fitting.

input

input with same structure as that provided by prepare_wham_input. May want to use input$par = model$parList to start at MLEs.

do.sdrep

T/F, calculate standard deviations of model parameters? Default = FALSE.

n.newton

integer, number of additional Newton steps after optimizafit_tmbtion for each peel. Default = 3.

MakeADFun.silent

T/F, Passed to silent argument of TMB::MakeADFun. Default = FALSE.

retro.silent

T/F, Passed to argument of internal fit_peel function. Determines whether peel number is printed to screen. Default = FALSE.

save.input

T/F, should modified input list be saved? Necessary to project from a peel but increases model object size. Default = FALSE.

Value

out, output of fit_tmb for peel i

See also