View source: R/accuracy_measures.R
measures | R Documentation |
Given point forecasts and observations, calculate various forecasting accuracy measures.
measures(preds, obs)
preds |
the point predictions for the test data period. |
obs |
the observation series (training data and test data) |
Given one-step-ahead rolling forecasts as well as the whole series of given observations (training together with test data), different forecasting accuracy measures (MAE, RMSE, Pearson's correlation, MASE, RMSSE) are being calculated.
A named vector with the obtained criteria values is returned.
xt <- EXPENDITURES
xt_in <- window(xt, end = c(2017, 4))
yt <- log(xt_in)
est <- s_semiarma(yt, set_options(order_poly = 3), inflation_rate = "optimal")
fc_results <- predict(est, n.ahead = 8, expo = TRUE)
point_fc <- fc_results@pred
measures(point_fc, xt)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.