Skip to contents

Median absolute error (MdAE) is the median absolute prediction error.

Usage

mdae(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

$$\mathrm{MdAE} = \mathrm{median}_{i=1,\ldots,n}(|obs_i-pred_i|).$$

MdAE has response units, is non-negative, and zero is ideal. It describes a typical error while being less sensitive to extreme errors than mae() or rmse(). Missing-value handling follows bias().

References

Hyndman, R. J. and Koehler, A. B. (2006). Another look at measures of forecast accuracy. International Journal of Forecasting, 22, 679-688. doi:10.1016/j.ijforecast.2006.03.001

See also