Function that takes as input a vector of Rmax values and empirical data of catch or SSB It runs a mizer simulation with the Rmax values,calculate the difference of predicted and observed yield (or biomass) and return the sum of squared errors of the difference.

getError(vary, params, dat, data_type = "catch", tol = 0.1, timetorun = 10)

Arguments

vary

Rmax vector, needs to be the same lenght as the number of species in params

params

mizerParams object containing the species parameters

dat

empirical data of catch or SSB

data_type

type of the data given in dat. Either "catch" or "SSB". Default is "catch"

tol

Default is 0.1

timetorun

lenght of simulation. Default is 10