error {ftsa}R Documentation

Forecast error measure

Description

Computes the forecast error measure.

Usage

error(forecast, forecastbench, true, method = c("me", "mae", "mse", 
 "sse", "rmse", "mdae", "mdse", "mape", "mdape", "smape", 
  "smdape", "rmspe", "rmdspe", "mrae", "mdrae", "gmrae", 
   "relmae", "relmse", "mase", "mdase", "rmsse"))

Arguments

forecast Forecasted values.
forecastbench Forecasted values using a benchmark method, such as random walk.
true Observed values.
method Method of forecast error measure.

Details

Bias measure:

If method = "me", the forecast error measure is mean error.

Forecast accuracy error measure:

If method = "mae", the forecast error measure is mean absolute error.

If method = "mse", the forecast error measure is mean square error.

If method = "sse", the forecast error measure is sum square error.

If method = "rmse", the forecast error measure is root mean square error.

If method = "mdae", the forecast error measure is median absolute error.

If method = "mape", the forecast error measure is mean absolute percentage error.

If method = "mdape", the forecast error measure is median absolute percentage error.

If method = "rmspe", the forecast error measure is root mean square percentage error.

If method = "rmdspe", the forecast error measure is root median square percentage error.

Forecast accuracy symmetric error measure:

If method = "smape", the forecast error measure is symmetric mean absolute percentage error.

If method = "smdape", the forecast error measure is symmetric median absolute percentage error.

Forecast accuracy relative error measure:

If method = "mrae", the forecast error measure is mean relative absolute error.

If method = "mdrae", the forecast error measure is median relative absolute error.

If method = "gmrae", the forecast error measure is geometric mean relative absolute error.

If method = "relmae", the forecast error measure is relative mean absolute error.

If method = "relmse", the forecast error measure is relative mean square error.

Forecast accuracy scaled error measure:

If method = "mase", the forecast error measure is mean absolute scaled error.

If method = "mdase", the forecast error measure is median absolute scaled error.

If method = "rmsse", the forecast error measure is root mean square scaled error.

Value

A numeric value.

Author(s)

Han Lin Shang

References

P. A. Thompson (1990) "An MSE statistic for comparing forecast accuracy across series", International Journal of Forecasting, 6(2), 219-227.

C. Chatfield (1992) "A commentary on error measures", International Journal of Forecasting, 8(1), 100-102.

S. Makridakis (1993) "Accuracy measures: theoretical and practical concerns", International Journal of Forecasting, 9(4), 527-529.

R. J. Hyndman and A. Koehler (2006) "Another look at measures of forecast accuracy", International Journal of Forecasting, 22(3), 443-473.

Examples

error(forecast = 1:2, true = 3:4, method = "mae")
error(forecast = 1:2, true = 3:4, method = "mse")
error(forecast = 1:5, forecastbench = 6:10, true = 11:15, method = "mrae")
error(forecast = 1:5, forecastbench = 6:10, true = 11:15, method = "mdrae")

[Package ftsa version 1.3 Index]