Description Usage Arguments Value
View source: R/prediction_errors.R
Calculates the forecast errors using all methods in error_measures: "MSE", "MAD", "sMAPE", "MASE", and "OWA".
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")
)
|
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 |
names.measures |
Character vector with the names of the error measures used in error_measures. |
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.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.