measures: Error measures for the provided forecasts

Description Usage Arguments Value Author(s) References Examples

View source: R/error-measures.R

Description

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

Usage

1
2
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, [email protected]

References

Examples

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

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

greybox documentation built on March 26, 2020, 7:32 p.m.