Q1.

a. (4 points)

Identify the p and q values for the following ARMA models written in the characteristic equation.

  • \((1−\frac{1}{2}B)(1−\frac{1}{3}B)x_t = w_t\)

  • \((1−\frac{1}{2}B)x_t = (1−\frac{1}{3}B)w_t\)

b. (4 points)

Express the following ARMA models with the characteristic equation.

  • \(x_t= \frac{1}{2} x_{t-1} + w_t + \frac{1}{4} w_{t-1}\)

  • \(x_t= w_t - \frac{3}{4} w_{t-1} + \frac{1}{8} w_{t-2}\)

Q2. (10 points)

Include code for this question. Note the simulations should be conducted several times to limit the Monte Carlo variation in your answers.

436 Only

Simulate a MA(1) process with \(\beta = .5\) and estimate the lag 1 and lag 2 correlation (you can use the arima.sim function). That is estimate \(\rho(x_t, x_{t+1})\) and \(\rho(x_t, x_{t+1})\).

How do the results match with your expectations?

536 Only

Simulate a ARMA(1,1) process with \(\alpha = .7\) and \(\beta = .5\) and estimate the lag 1 and lag 2 correlation (you can use the arima.sim function). That is estimate \(\rho(x_t, x_{t+1})\) and \(\rho(x_t, x_{t+1})\).

How do the results match with your expectations?

Q3. (7 points)

Evaluate the code below and describe the results.

library(readr)
library(dplyr)
## 
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
## 
##     filter, lag
## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union
library(forecast)
bakery.sales <- read_csv('http://math.montana.edu/ahoegh/teaching/timeseries/data/BreadBasket.csv')
## Parsed with column specification:
## cols(
##   Date = col_date(format = ""),
##   Time = col_time(format = ""),
##   Transaction = col_integer(),
##   Item = col_character()
## )
pastry.count <- bakery.sales %>% filter(Item %in% c('Pastry','Scandinavian','Medialuna','Muffin','Scone')) %>% group_by(Date) %>% tally() %>% rename(num.pastry = n) %>% select(num.pastry) %>% pull() %>% ts(frequency =7)

436 Only

ggtsdisplay(pastry.count)
auto.arima(pastry.count, max.d = 0, seasonal = F)

536 Only

ggtsdisplay(pastry.count)
auto.arima(pastry.count, max.d = 0, max.D = 0)