---
title: 'Lab 4: Smoothing methods'
author: "Introduction to Time Series Analysis"
output:
  pdf_document: default
  word_document: default
  html_document:
    df_print: paged
header-includes:
- \usepackage{amsmath}
---

\newcommand{\ba}{{\mathbf a}}

Name:  
This lab is to be done in class (completed outside of class if need be). You can collaborate with your classmates, but you must identify their names above, and you must submit **your own** lab as an knitted pdf file. To answer the questions, display the results and write your answers if asked.


```{r, include= FALSE}
knitr::opts_chunk$set(cache=TRUE, autodep=TRUE, cache.comments=TRUE)
library(tidyverse)
library(fable)
library(tsibble)
library(feasts)
library(lubridate)
library(tsibbledata)
```


1. For ETS (A, A, N) model: 
 * Write down the state space model.
 * Derive the components form.

2. For ETS (A, Ad, N) model: 
 * Write down the state space model
 * Derive the components form.
 
 3. `fma::eggs` contains the price of a dozen eggs in the United States from 1900–1993

 * Use simple exponential smoothing (SES) and Holt’s method (with and without damping) to forecast “future” data. [Hint: use h=100 so you can clearly see the differences between the options when plotting the forecasts.]
 * Which method gives the best training RMSE?
 * Are these RMSE values comparable?
 * Do the residuals from the best fitting method look like white noise?

4. (graduate student only): Write down the state space model and component form for ETS(A,N,A).

5. Apply Holt-Winters’ multiplicative method to the Gas data from `aus_production`.

 * Why is multiplicative seasonality necessary here?
 * Experiment with making the trend damped.
 * Check that the residuals from the best method look like white noise.

6. Use `ETS()` on some of these series the `tourism`, `gafa_stock`, `pelt`. For `tourism` data, you may explore tourism for the purpose of business, visiting; for `gafa_stock`, you may explore the closing price for the companies you choose. 

 * Does it always give good forecasts?
 * Find an example where it does not work well. Can you figure out why?
  
