20 July 2020

Goal

In this small project we develop a shiny app that uses four time series forecasting methods to predict Australian quarterly beer production.

In this shiny app, you can select the forecasting method and accordingly the plot and table of real and predicted values are presented.

Australian quarterly beer production Data

Description

Total quarterly beer production in Australia (in megalitres) from 1956:Q1 to 2010:Q2.

Format

Quarterly time series of class ts.

Source

Australian Bureau of Statistics. Cat. 8301.0.55.001.

Forecasting Methods

Average method: forecasts of future values are just the average of the historical data.

Naïve method: we simply set all forecasts to be the value of the last observation

Seasonal naïve method: A similar method is useful for highly seasonal data. In this case, forecast is set to the last observed value from the same season of the year.

ARIMA models: ARIMA models are advanced models, more details are available HERE

Example

forecasting results from Shiny app using ARIMA Model

pred <- forecast(auto.arima(beer2), h=6)
data <- cbind(as.numeric(real),as.data.frame(pred)[,c(1,4,5)])
colnames(data) <- c("Real Values", "Point Forecast", "Lower 95% CI", "Upper 95% CI" )
kable(data)
Real Values Point Forecast Lower 95% CI Upper 95% CI
2009 Q1 415 419.1510 395.2063 443.0958
2009 Q2 398 384.1549 359.5139 408.7958
2009 Q3 419 401.2526 376.6117 425.8936
2009 Q4 488 480.2469 455.6060 504.8879
2010 Q1 414 419.6507 394.3302 444.9711
2010 Q2 374 382.6632 357.3033 408.0232