Compute the Mean Fractional Bias of observed and predicted data.
Usage
mfb(obs, pred, use = "everything")
Arguments
- obs
A numeric vector, data.frame or data.table.
- pred
A numeric vector, data.frame or data.table.
- use
An optional character string giving a method for computing MFB
in the presence of missing values. This must be either everything or
complete.obs.
Value
The mean fractional bias of input data as a numeric.
Details
The function computes the Mean Fractional Bias (MFB) according to EPA formulation:
$$
\mathrm{MFB} = 100 * \frac{1}{N} \sum_{i=1}^{N} \left( \frac{P_i - O_i}{0.5 * (P_i + O_i)} \right)
$$
The MFB thus normalizes the bias for each model-observed pair by the average
of the model and observation before taking the average.
Examples
if (FALSE) { # \dontrun{
validationData[, .(mfb = mfb(obs, mod, use = "complete.obs"))]
} # }