Processing math: 100%
Skip to contents

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: MFB=1001NNi=1(PiOi0.5(Pi+Oi))

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) {
validationData[, .(mfb = mfb(obs, mod, use = "complete.obs"))]
}