accuracy.gts

0th

Percentile

In-sample or out-of-sample accuracy measures for forecast grouped and hierarchical model

Returns a range of summary measures of the forecast accuracy. The function measures out-of-sample forecast accuracy based on (holdout data - forecasts) and in-sample accuracy when setting keep.fitted = TRUE in the forecast.gts. All measures are defined and discussed in Hyndman and Koehler (2006).

Keywords
error
Usage
accuracy.gts(fcasts, test, levels)
Arguments
fcasts
An object of class gts, containing the forecasted hierarchical or grouped time series. In-sample accuracy at the bottom level returns when test is missing.
test
An object of class gts, containing the holdout hierarchical time series
levels
Return the specified level(s), when carrying out out-of-sample accuracy.
Details

MASE calculation is scaled using MAE of in-sample naive forecasts for non-seasonal time series, and in-sample seasonal naive forecasts for seasonal time series.

Value

  • Matrix giving forecast accuracy measures.
  • MEMean Error
  • RMSERoot Mean Square Error
  • MAEMean Absolute Error
  • MAPEMean Absolute Percentage Error
  • MPEMean Percentage Error
  • MASEMean Absolute Scaled Error

References

R. J. Hyndman and A. Koehler (2006), Another look at measures of forecast accuracy, International Journal of Forecasting, 22, 679-688.

See Also

hts, plot.gts, forecast.gts, accuracy

Aliases
  • accuracy.gts
Examples
data <- window(htseg2, start = 1992, end = 2002)
test <- window(htseg2, start = 2003)
fcasts <- forecast(data, h = 4, method = "bu")
accuracy.gts(fcasts, test)
accuracy.gts(fcasts, test, levels = 1)
Documentation reproduced from package hts, version 4.0, License: GPL (>= 2)

Community examples

Looks like there are no examples yet.