---
title: "Beer supply data"
output: html_document
---

## Explorative analysis of beer supply data

Read in the monthly beer supply data from the book website, and save it as a vector
called `beerdata`:
```{r}
www <- "http://asta.math.aau.dk/eng/static/datasets?file=cbe.dat"
CBEdata <- read.table(www, header = TRUE)
beerdata <- CBEdata$beer
```

Now convert it to a time series object (`ts`) with the correct starting date (Jan. 1958)
and frequency and call it `beer`:
```{r}
# Put your commands here
```

Now perform an explorative analysis like in the lecture:

- Plot the data, plot the aggregated yearly data and make a boxplot of the observations
for each of the twelve months. Comment on the figures.

- Use `decompose` to decompose the series into trend, seasonal and random component,
and make relevant figures and comment on them. Try also to use `ts.plot` to plot
the seasonal component on top of the trend (you can set argument `lty = c(1,2)`
to plot with different line styles for the two series).

- Repeat the steps above for a multiplicative model for the decomposition
(use `decompose(beer, "mult")`) and repeat the figures for that (now you should
multiply `trend`, `seasonal` and `random` to recover the original series).
