calculateMASE: MASE accuracy tables and plots

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/calculateMASE.R

Description

Generates MASE accuracy tables and plots.

Usage

1
calculateMASE(ts, af, sort = FALSE, digits = 3)

Arguments

ts

dataframe containing time series actuals needed to calculate the benchmark MAE for each time series, this dataframe needs to be formatted using the Time Series Table Schema (TSTS), use showTSTS() to display schema specification details.

af

dataframe containing forecast data formatted using the Actual and Forecast Table Schema (AFTS), use showAFTS() to display schema specification details.

sort

if TRUE, sorts accuracy results according to the average MASE rank across all available horizons.

digits

number of digits after the dot used to output MASE; if digits=NA, MASEs and ranks are not rounded.

Details

Calculates MASEs for each horizon and each method contained in af. Outputs accuracy tables and plots.

The input dataframe af can be created using createAFTS().

Value

a list with the following variables:

accuracy:

dataframe with accuracy table for MASE

rank:

dataframe with MASE ranks

plot:

ggplot2 object showing accuracy vs horizon for MASE

Author(s)

Cuong Sai, Andrey Davydenko, and Maxim Shcherbakov.

References

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

See Also

calculateAvgRelMAE, calculateSMAPE, calculateMAPE

Examples

1
2
3
4
5
6
ts <- example1_ts
af <- createAFTS(example1_ts, example1_fc)
acc <- calculateMASE(ts, af)
acc$accuracy
acc$rank
acc$plot

forvis/forvision documentation built on April 30, 2020, 3:28 a.m.