Please use D2L to turn in both the PDF/ Word output and your R Markdown file.

For this exercise, we will continue working with the bakery dataset.

Q1. ARMA Simulation (50 pts)

Simulate data from AR(1), MA(1), and ARMA(1,1) models and create acf and pacf plots. Note that ggtsdisplay, ggAcf, and ggPacf in the forecast package can be used.

Comment on the differences in the figures.

Q2. Taxi (50 pts)

The code below creates a series of the weekly differences in taxi trips in NYC for yellow taxis. Examine the series and discuss what you see. Then fit and explain an ARMA model.

taxi.rides <- read_csv('http://math.montana.edu/ahoegh/teaching/timeseries/data/taxi.csv')
## Parsed with column specification:
## cols(
##   month = col_integer(),
##   day = col_integer(),
##   year = col_integer(),
##   n = col_integer()
## )
taxirides.diff <- taxi.rides %>% arrange(year, month, day) %>% slice(-c(1:4)) %>% mutate(week.numb = rep(1:234, each = 7)) %>% group_by(week.numb) %>% summarize(total.rides = sum(n)) %>% select(total.rides) %>% pull() %>% diff()