accmeasure {GCEstim}R Documentation

Accuracy measures

Description

Function that allows to calculate different types of errors for point predictions:

  1. MAE - Mean Absolute Error,

  2. MAD - Mean Absolute Deviation,

  3. MSE - Mean Squared Error,

  4. RMSE - Root Mean Squared Error,

  5. MAPE - Mean Absolute Percentage Error,

  6. sMAPE - symmetric Mean Absolute Percentage Error,

  7. MASE - Mean Absolute Scaled Error (Hyndman & Koehler, 2006)

Usage

accmeasure(
  y_pred,
  y_true,
  which = c("RMSE", "MSE", "MAPE", "sMAPE", "MAE", "MAD", "MASE")
)

Arguments

y_pred

fitted values.

y_true

observed values.

which

one of c("RMSE", "MAPE", "sMAPE", "MAE", "MAD", "MASE")

Value

The value of the chosen error is returned.

Author(s)

Jorge Cabral, jorgecabral@ua.pt

References

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

Examples


res_gce_package <-
  lmgce(y ~ .,
        data = dataGCE,
        boot.B = 50,
        seed = 230676)


accmeasure(fitted(res_gce_package), dataGCE$y, which = "MSE")


[Package GCEstim version 0.1.0 Index]