sMdAPE: sMdAPE - Scaled Median Absolute Percentage Error

Description Usage Arguments Value References Examples

View source: R/ErrorMeasures.R

Description

sMdAPE = median(200 (y_t - y_hat_t)/(y_t+y_hat_t))

Usage

1
sMdAPE(y, y_hat)

Arguments

y
  • True values of the time series

y_hat
  • Forecasted values of the time series

Value

sMdAPE value

References

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

Examples

1
2
3
4
5
6
7
y <- AirPassengers
splitting_point <- round(2*length(y)/3)
y_train <- y[1:splitting_point]
h <- 5
y_test <- y[(splitting_point+1):(splitting_point+h)]
y_hat_naive <- rep(tail(y_train,1),h)
result <- sMdAPE(y_test,y_hat_naive)

jdestefani/UEMTS documentation built on Dec. 20, 2021, 10:05 p.m.