ggAssignment #5 – Forecasting Methods (FIN 335) Spring 2018

Due 03/23/18by Midnight -(95points)

Complete the problems below. Be sure to include all graphics created, all R code used to create them, and obviously answer the questions pertaining to your analysis. When including R code you must use Courier New 9 point font. Your discussion of results should NOT be in this font! I am fond of 10 or 11 point Palatino Linotype, however you may choose to use something else.

On this assignment you will explore the use of linear models for forecasting. The problems are all fairly similar to examples you will find in R Markdown files for Chapter 6. There is an R Markdown file on the course website with some helper code for some of these problems.

  1. Book Problem Chapter 6 – problem #4
    Figures 6.16 and 6.17 shows the result of decomposing the number of persons in the
    civilian labor force in Australia each month from February 1978 to August 1995.

Figure 6.16

Figure 6.17

a)Write about 3–5 sentences describing the results of the seasonal adjustment. Pay particular attention to the scales of the graphs in making your interpretation. (5 pts.)

b)Is the recession of 1991/1992 visible in the estimated components? Explain. (2 pts.)

  1. US Clothing Sales (1992 – present) and (2010 – present)

a)Read in the .csv file US Clothing Sales (millions of dollars – 1992 to present).csv from the course1 website. Construct a properly annotated autoplot of the entire time series. (3 pts.)

b)Using Example 6.1 – Electrical Equipment Manufacturing (Euro Area) in the R Markdown file for Chapter 6 as an example perform an additive seasonal decomposition of this series “by-hand” by lowess to estimate the trend , tslm to estimate the seasonal component and finally obtain the remainder series via subtraction.

Construct a faceted display showing the original series along with the estimated components (. Discuss. (12 pts.)

c)Use checkresiduals to examine the remainder component from part (b). Does it appear to be white noise, if not what violations are evident? (4 pts.)

d)Now use automatic seasonal decomposition methods X-11 or SEATS to decompose the series. For one fit do NOT allow it to transform the response and for the other allow it to choose a transformation automatically. Plot the results of both the untransformed and the transformed decomposition using autoplot with facet = T (see notes). Discuss and choose which you think is best. (4 pts.)

e)Are the residuals from the decomposition you thought was best in part (d) consistent with white noise? Again use checkresiduals for this. (3 pts.)

f)Extract the seasonally adjusted time series from the best decomposition in part (d) and plot it. Discuss. (3 pts.)

g)Use ggsubseriesplot to plot the seasonal component from the best decomposition in part (d). Does this plot how seasonal component varies from year to year? Explain.
(3 pts.)

h)Form a training/test set split of this time series using the last two years (24 months) as the test set. Then use STL forecasting (stlf function) to develop the most accurate model you can for forecasting the test set. Try at least three different models and report the forecast accuracy for each of these models. Finally construct a plot showing the results for the best model you found. (See example 6.2 – Monthly Liquor Sales in the notes). (15 pts.)

  1. This exercise uses the cangas data (monthly Canadian gas production in billions of cubic
    meters, January 1960 – February 2005).

a)Plot the data using autoplot(), ggsubseriesplot()and ggseasonplot()to look at the effect of the changing seasonality over time. What do you think is causing it to change so much? (6 pts.)

b)Do an STL decomposition of the data. You will need to choose s.window to allow for the changing shape of the seasonal component. (6 pts.)

c)Compare the results with those obtained using SEATS and X11. How are they different? Do not use the transform.function=”none”option as we have in class. (6 pts.)

  1. We will use the bricksq data (Australian quarterly clay brick production. 1956–1994) for this exercise.

a)Use an STL decomposition to calculate the trend-cycle and seasonal indices. (Experiment with having fixed or changing seasonality.) (5 pts.)

b)Compute and plot the seasonally adjusted data. (2 pts.)

c)Use a naïve method to produce forecasts of the seasonally adjusted data.(2 pts.)

d)Use stlf() to reseasonalize the results, giving forecasts for the original data.(3 pts.)

e)Do the residuals look uncorrelated? (3 pts.)

f)Repeat with a robust STL decomposition. Does it make much difference? (2 pts.)

g)Compare forecasts from stlf() with those from snaive(), using a test set comprising the last 2 years of data (h = 24). Which is better? (6 pts.)