
x
is provided, the function measures out-of-sample forecast accuracy
based on x-f. If x
is not provided, the function produces in-sample accuracy measures of the one-step forecasts based on f["x"]-fitted(f).
All measures are defined and discussed in Hyndman and Koehler (2006).accuracy(f, x, test=1:length(x),lambda=NULL)
"forecast"
, or a numerical vector containing forecasts.InvBoxCox
.fit1 <- rwf(EuStockMarkets[1:200,1],h=100)
fit2 <- meanf(EuStockMarkets[1:200,1],h=100)
accuracy(fit1)
accuracy(fit2)
accuracy(fit1,EuStockMarkets[201:300,1])
accuracy(fit2,EuStockMarkets[201:300,1])
plot(fit1)
lines(EuStockMarkets[1:300,1])
Run the code above in your browser using DataLab