Yearly Forecast – Forecast Total for a Year Given Monthly Time Series

aggregationforecastingrtime series

I have a monthly time series (for 2009-2012 non-stationary, with seasonality). I can use ARIMA (or ETS) to obtain point and interval forecasts for each month of 2013, but I am interested in forecasting the total for the whole year, including prediction intervals. Is there an easy way in R to obtain interval forecasts for the total for 2013?

Best Answer

Here is a trick I've used before, although I don't think I've ever published it. If x is your monthly time series, then you can construct annual totals as follows.

y <- filter(x,rep(1,12), sides=1) # Total of previous 12 months

To get the forecasts of the annual totals:

library(forecast)
fit <- auto.arima(y)
forecast(fit,h=12)

The last forecast is for the total of the next year.

An extended version of this answer is at http://robjhyndman.com/hyndsight/forecasting-annual-totals/

Related Question