Skip to contents

Optimizes k, L_inf, d, m, and annuli_min_age using nlminb(). Spawning parameters and annuli_date are treated as data.

Usage

fit_tmb_nll(
  pars,
  surveys,
  Delta_l = 1,
  Delta_t = 0.05,
  lower = c(),
  upper = c()
)

Arguments

pars

List of parameters

surveys

Data frame with columns survey_date (numeric), Length, K, count.

Delta_l

Numeric size step (cm), default 1.

Delta_t

Numeric time step (years), default 0.05.

lower

Named numeric vector of lower bounds.

upper

Named numeric vector of upper bounds.

Value

A list with updated pars, optimizer result, sdreport, obj, and data used.