Exercise

Automatic ARIMA models for seasonal time series

As you learned in the video, the auto.arima() function also works with seasonal data. Note that setting lambda = 0 in the auto.arima() function - applying a log transformation - means that the model will be fitted to the transformed data, and that the forecasts will be back-transformed onto the original scale.

After applying summary() to this kind of fitted model, you may see something like the output below which corresponds with \((p,d,q)(P,D,Q)[m]\):

ARIMA(0,1,4)(0,1,1)[12]

In this exercise, you will use these functions to model and forecast the pre-loaded h02 data, which contains monthly sales of cortecosteroid drugs in Australia.

Instructions

100 XP
  • Using the standard plotting function, plot the logged h02 data to check that it has stable variance.
  • Fit a seasonal ARIMA model to the h02 series with lambda = 0. Save this to fit.
  • Summarize the fitted model using the appropriate method.
  • What levels of differencing were used in the model? Assign the amount of lag-1 differencing to d and seasonal differencing to D.
  • Plot forecasts for the next 2 years by using the fitted model. Set h accordingly.