Function for calculating residuals of a dynamic prediction according
to the requirements of modFit
.
get_dyna_residuals(
this_p,
fit_data,
env_conditions,
known_pars,
sec_model_names,
cost = NULL
)
named vector of model parameters
tibble with the data for the fit
tibble with the environmental conditions
named vector of known model parameters
named character vector with names the environmental conditions and values the secondary model (e.g. 'CPM').
an instance of modCost to be combined (to fit multiple models).
An instance of modCost
.