measures {greybox}R Documentation

Error measures for the provided forecasts

Description

Function calculates several error measures using the provided forecasts and the data for the holdout sample.

Usage

measures(holdout, forecast, actual, digits = NULL, benchmark = c("naive",
  "mean"))

Arguments

holdout

The vector of the holdout values.

forecast

The vector of forecasts produced by a model.

actual

The vector of actual in-sample values.

digits

Number of digits of the output. If NULL then no rounding is done.

benchmark

The character variable, defining what to use as benchmark for relative measures. Can be either "naive" or "mean" (arithmetic mean of the whole series. The latter can be useful when dealing with intermittent data.

Value

The functions returns the named vector of errors:

For the details on these errors, see Errors.

Author(s)

Ivan Svetunkov, ivan@svetunkov.ru

References

Examples



y <- rnorm(100,10,2)
ourForecast <- rep(mean(y[1:90]),10)

measures(y[91:100],ourForecast,y[1:90],digits=5)


[Package greybox version 2.0.0 Index]