Value of the Objective Function of a Model
Arguments
- model
A model with an objective function, probably one produced using
mp_tmb_calibrator
.- parameter_updates
Named list of a subset of model variables with the values to use when simulating the trajectory using the
mp_trajectory_par
function. In the future we plan to allow this variable to be a data frame with one row for each scalar value (which would be useful if only certain elements of a vector or matrix are parameters) and a string giving the name of a file containing parameter information. But for now, only a list is allowed.- baseline
Models can contain several alternative sets of parameters, and this
baseline
argument is used to choose which of these should be updated using theparameter_updates
passed tomp_trajectory_par
. The current options are"recommended"
,"optimized"
, and"default"
. The"recommended"
option will be used if neither of the other two options are selected. Ifmodel
is capable of being optimized (e.g., it was created usingmp_tmb_calibrator
) then"recommended"
is equivalent to"optimized"
, which use the best set of parameters found bymp_optimize
. Ifmp_optimize
has not yet been called onmodel
then a warning will be issued. Ifmodel
is not capable of being optimized then"recommended"
is equivalent to"default"
, which uses the original set of parameters available whenmodel
was created.