Exercise

Automatic forecasting with exponential smoothing

The namesake function for finding errors, trend, and seasonality (ETS) provides a completely automatic way of producing forecasts for a wide range of time series.

You will now test it on two series, austa and hyndsight, that you have previously looked at in this chapter. Both have been pre-loaded into your workspace.

Instructions

100 XP
  • Using ets(), fit an ETS model to austa and save this to fitaus.
  • Using the appropriate function, check the residuals from this model.
  • Plot forecasts from this model by using forecast() and autoplot() together.
  • Repeat these three steps for the hyndsight data and save this model to fiths.
  • Which model(s) fails the Ljung-Box test? Assign fitausfail and fithsfail to either TRUE (if the test fails) or FALSE (if the test passes).