# prepare data (from the forecast package)
library(forecast)
horizon <- 10
train <- wineind[-1 * (length(wineind)-horizon+1):length(wineind)]
test <- wineind[(length(wineind)-horizon+1):length(wineind)]
# perform FRBE
f <- frbe(ts(train, frequency=frequency(wineind)), h=horizon)
# evaluate FRBE forecasts
evalfrbe(f, test)
# display forecast results
f$mean
Run the code above in your browser using DataLab