We tted a harmonic regression model to part of the gasoline series in Exercise 6 in Section 5.10. We will now revisit this model, and extend it to include more data and ARMA errors.
a. Using tslm() , t a harmonic regression with a piecewise linear time trend to the full gasoline series. Select the position of the knots in the trend and the appropriate number of Fourier terms to include by minimising the AICc or CV value.
b. Now ret the model using auto.arima() to allow for correlated errors, keeping the same predictor variables as you used with tslm() .
c. Check the residuals of the nal model using the checkresiduals() function. Do they look suciently like white noise to continue? If not, try modifying your model, or removing the rst few years of data.
d. Once you have a model with white noise residuals, produce forecasts for the next year.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here