forecasterrors {forecast}R Documentation

Forecast errors

Description

Returns range of summary measures of the error x-f.

Usage

forecasterrors(f, x, test=1:length(x))

Arguments

f Vector of univariate forecasts or object of class code{"forecast"}.
x Vector of actual values of the same length as f.
test Indicator of which elements of x and f to test.

Value

Vector giving forecast error measures.

Author(s)

Rob J Hyndman

Examples

fit1 <- rwf(EuStockMarkets[1:200,1],h=100)
fit2 <- meanf(EuStockMarkets[1:200,1],h=100)
forecasterrors(fit1,EuStockMarkets[201:300,1])
forecasterrors(fit2,EuStockMarkets[201:300,1])
plot(fit1)
lines(EuStockMarkets[1:300,1])

[Package forecast version 1.04 Index]