Exercise 2.1

Use the help function to explore what the series gold, woolyrnq and gas represent. Use autoplot() to plot each of these in separate plots. What is the frequency of each series? Hint: apply the frequency() function. Use which.max() to spot the outlier in the gold series. Which observation was it?

## Time Series:
## Start = 1 
## End = 6 
## Frequency = 1 
## [1] 306.25 299.50 303.45 296.75 304.40 298.35
##      Qtr1 Qtr2 Qtr3 Qtr4
## 1965 6172 6709 6633 6660
## 1966 6786 6800
##       Jan  Feb  Mar  Apr  May  Jun
## 1956 1709 1646 1794 1878 2173 2321
## [1] 1
## [1] 4
## [1] 12
## [1] 770

Exercise 2.2

Download the file tute1.csv from the book website, open it in Excel (or some other spreadsheet application), and review its contents. You should find four columns of information. Columns B through D each contain a quarterly series, labelled Sales, AdBudget and GDP. Sales contains the quarterly sales for a small company over the period 1981-2005. AdBudget is the advertising budget and GDP is the gross domestic product. All series have been adjusted for inflation.

Exercise 2.3

Download some monthly Australian retail data from the book website. These represent retail sales in various categories for different Australian states, and are stored in a MS-Excel file.

There is definitely an increasing trend in the data. There is also a slight seasonal pattern that appears every end/beginning of the quarter (more prevalent in March and December).The slow decrease in the ACF as the lags increase is due to the trend, while the “scalloped” shape is due the seasonality.

Exercise 2.6

Use the following graphics functions: autoplot(), ggseasonplot(), ggsubseriesplot(), gglagplot(), ggAcf() and explore features from the following time series: hsales, usdeaths, bricksq, sunspotarea, gasoline. Can you spot any seasonality, cyclicity and trend? What do you learn about the series?

There is no trend in the data. There is a strong seasonal pattern with highest numbers in March, then decreasing from Apr-Jul, picking up again in Aug-Oct, to finally go down again in the last 2 months of the year .The ACF “scalloped” shape is due the seasonality.

There is no trend in the data. There is a strong seasonal pattern with highest numbers in July with prior months building up to that point, then an alternate decreasing/increasing pattern every month from Sep to Feb .The ACF “scalloped” shape is due the seasonality.

There is an increasing trend in the data. There is a moderate seasonal pattern with highest numbers in Q2 & Q3, going down in Q1 & Q4 (slightly) .The slow decrease in the ACF as the lags increase is due to the trend, while the slight “scalloped” shape is due the seasonality.

There is no trend in the data. Also, data is not seasonal (error/exception thrown when trying ggseasonplot & ggsubseriesplot), The data appears to be cyclic, exhibiting rises and falls that are not of a fixed frequency .The ACF shows a “scalloped” shape which shows the cyclic pattern.