prediction_errors: Returns the Forecast Errors for the GEARS Method.

Description Usage Arguments Value

View source: R/prediction_errors.R

Description

Calculates the forecast errors using all methods in error_measures: "MSE", "MAD", "sMAPE", "MASE", and "OWA".

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
prediction_errors(
  DATA,
  forecast.horizon,
  Y.name,
  total.equations,
  number.rs,
  DF.Fit.Predict,
  forecasts.gears,
  names.measures = c("mse", "mad", "smape", "mase", "owa")
)

Arguments

DATA

A data frame or a univariate time series.

forecast.horizon

Numeric value giving the number of periods for forecasting.

Y.name

Character string with the name of the Y (left-hand side) variable.

total.equations

A numeric value giving the number of equations to be estimated (i.e., the number of equations from the output of all_models_rhs)

number.rs

A numeric value giving the number of rolling samples.

DF.Fit.Predict

A data frame with the training data and testing data. It is the output of create_DF_Fit_Predict.

forecasts.gears

A vector containing the forecasted values using the GEARS method. It is the output of prediction.gears inside gears.

names.measures

Character vector with the names of the error measures used in error_measures.

Value

Returns a list. First level of this list represents the different forecast leads. The table inside each level returns the equation/model's number (row) and the error measure (column), and the values inside the cells are the forecast errors.


gu-stat/gears documentation built on Oct. 20, 2021, 2:53 a.m.