Skip to contents

Willmott's original index of agreement, d, compares squared error with a potential-error denominator based on the observed mean.

Usage

willmott_d(obs, pred, na.rm = TRUE)

Arguments

obs

Numeric observation vector.

pred

Numeric prediction vector paired with obs.

na.rm

Logical; remove incomplete pairs?

Value

One numeric value.

Details

$$d=1-\frac{\sum_{i=1}^n(obs_i-pred_i)^2} {\sum_{i=1}^n(|pred_i-\bar{obs}|+|obs_i-\bar{obs}|)^2}.$$

For finite inputs, d ranges from zero to one and one is ideal. The index can be strongly influenced by large errors. It returns NA with a warning when its denominator is zero, including identical constant observations and predictions. Missing-value handling follows bias().

References

Willmott et al. (1985). See rrmse().

See also

Other prediction metrics: mape(), mdae(), mpe(), msle(), rae(), rer(), rmsle(), rpd(), rpiq(), rrmse(), sep(), smape()