Calculates the mean difference between modelled and observed values, in the variable's native units:
Details
$$\text{Bias} = \frac{1}{n} \sum_{i=1}^n (\text{sim}_i - \text{obs}_i)$$
Positive when the model overestimates on average, negative when it underestimates. Unlike every other function in this file, the raw (signed) value is returned rather than a zero-is-best, non-negative one.
This makes bias() unsafe to drop directly into FUN_list for
calibration: since calib_aeme()/run_and_fit() minimise the
returned value, minimising a signed bias would push the calibration
towards the most negative (maximally under-estimating) solution rather
than towards zero bias. Use pbias (or abs(bias(obs, sim))) as
a calibration objective; use bias() for diagnosing the direction of
a systematic error when inspecting fit after the fact. Like
mae/rmse, it stays in the variable's native
units and so is not directly comparable across variables with different
units or magnitudes.
