Question: Type to search ( Enter for navigation ) Forecasting: Principles and Practice Preface 1 Getting started 2 Time series graphics 3 Time series decomposition 4
Type to search Enter for navigation
Forecasting: Principles and Practice
Preface
Getting started
Time series graphics
Time series decomposition
Time series features
The forecasters toolbox
A tidy forecasting workflow
Some simple forecasting methods
Fitted values and residuals
Residual diagnostics
Distributional forecasts and prediction intervals
Forecasting using transformations
Forecasting with decomposition
Evaluating point forecast accuracy
Evaluating distributional forecast accuracy
Time series crossvalidation
Exercises
Further reading
Judgmental forecasts
Time series regression models
Exponential smoothing
ARIMA models
Dynamic regression models
Forecasting hierarchical and grouped time series
Advanced forecasting methods
Some practical forecasting issues
Appendix: Using R
Appendix: For instructors
Appendix: Reviews
Translations
About the authors
Buy a print version
Report an error
Bibliography
Published by OTexts with bookdown
Exercises
Produce forecasts for the following series using whichever of NAIVEy SNAIVEy or RWy ~ drift is more appropriate in each case:
Australian Population globaleconomy
Bricks ausproduction
NSW Lambs auslivestock
Household wealth hhbudget
Australian takeaway food turnover ausretail
Use the Facebook stock price data set gafastock to do the following:
Produce a time plot of the series.
Produce forecasts using the drift method and plot them.
Show that the forecasts are identical to extending the line drawn between the first and last observations.
Try using some of the other benchmark functions to forecast the same data set. Which do you think is best? Why?
Apply a seasonal nave method to the quarterly Australian beer production data from Check if the residuals look like white noise, and plot the forecasts. The following code will help.
# Extract data of interest
recentproduction ausproduction
filteryearQuarter
# Define and estimate a model
fit recentproduction modelSNAIVEBeer
# Look at the residuals
fit ggtsresiduals
# Look a some forecasts
fit forecast autoplotrecentproduction
What do you conclude?
Repeat the previous exercise using the Australian Exports series from globaleconomy and the Bricks series from ausproduction. Use whichever of NAIVE or SNAIVE is more appropriate in each case.
Produce forecasts for the Victorian series in auslivestock using SNAIVE Plot the resulting forecasts including the historical data. Is this a reasonable benchmark for these series?
Are the following statements true or false? Explain your answer.
Good forecast methods should have normally distributed residuals.
A model with small residuals will give good forecasts.
The best measure of forecast accuracy is MAPE.
If your model doesnt forecast well, you should make it more complicated.
Always choose the model with the best forecast accuracy as measured on the test set.
For your retail time series from Exercise in Section :
Create a training dataset consisting of observations before using
myseriestrain myseries
filteryearMonth
Check that your data have been split appropriately by producing the following plot.
autoplotmyseries Turnover
autolayermyseriestrain, Turnover, colour "red"
Fit a seasonal nave model using SNAIVE applied to your training data myseriestrain
fit myseriestrain
modelSNAIVE
Check the residuals.
fit ggtsresiduals
Do the residuals appear to be uncorrelated and normally distributed?
Produce forecasts for the test data
fc fit
forecastnewdata antijoinmyseries myseriestrain
fc autoplotmyseries
Compare the accuracy of your forecasts against the actual values.
fit accuracy
fc accuracymyseries
How sensitive are the accuracy measures to the amount of training data used?
Consider the number of pigs slaughtered in New South Wales data set auslivestock
Produce some plots of the data in order to become familiar with it
Create a training set of observations, withholding a test set of observations years
Try using various benchmark methods to forecast the training set and compare the results on the test set. Which method did best?
Check the residuals of your preferred method. Do they resemble white noise?
Create a training set for household wealth hhbudget by withholding the last four years as a test set.
Fit all the appropriate benchmark methods to the training set and forecast the periods covered by the test set.
Compute the accuracy of your forecasts. Which method does best?
Do the residuals from the best method resemble white noise?
Create a training set for Australian takeaway food turnover ausretail by withholding the last four years as a test set.
Fit all the appropriate benchmark methods to the training set and forecast the periods covered by the test set.
Compute the accuracy of your forecasts. Which method does best?
Do the residuals from the best method resemble white noise?
We will use the Bricks data from ausproduction Australian quarterly clay brick production for this exercise.
Use an STL decomposition to calculate the trendcycle and seasonal indices. Experiment with having fixed or changing seasonality.
Compute and plot the seasonally adjusted data.
Use a nave method to produce forecasts of the seasonally adjusted data.
Use decompositionmodel to reseasonalise the results, giving forecasts for the original data.
Do the residuals look uncorrelated?
Repeat with a robust STL decomposition. Does it make much difference?
Compare forecasts from decompositionmodel with those from SNAIVE using a test set comprising the last years of data. Which is better?
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
