1. Learn
  2. /
  3. Courses
  4. /
  5. Forecasting in R

Connected

Exercise

Exploring auto.arima() options

The auto.arima() function needs to estimate a lot of different models, and various short-cuts are used to try to make the function as fast as possible. This can cause a model to be returned which does not actually have the smallest AICc value. To make auto.arima() work harder to find a good model, add the optional argument stepwise = FALSE to look at a much larger collection of models.

Here, you will try finding an ARIMA model for the pre-loaded a10 data, which contains monthly anti-diabetic drug subsidies in Australia from 1991 to 2008 in millions of Australian dollars. Inspect it in the console before beginning this exercise.

Instructions

100 XP
  • Use the default options in auto.arima() to find an ARIMA model for a10 and save this to fit1.
  • Use auto.arima() without a stepwise search to find an ARIMA model for a10 and save this to fit2.
  • Run summary() for both fit1 and fit2 in your console, and use this to determine the better model. To 2 decimal places, what is its AICc value? Assign the number to AICc.
  • Finally, using the better model based on AICc, plot its 2-year forecasts. Set h accordingly.