---
title: "MATH 5075 R Project 5"
author: "Your Name Here"
date: "October 20, 2016"
output:
pdf_document:
keep_tex: TRUE
---
*Remember: I expect to see commentary either in the text, in the code with comments created using `#`, or (preferably) both! **Failing to do so may result in lost points!***
*Because randomization is used in this assignment, I set the seed here, in addition to beginning each code block. **Do not change the seed!***
```{r}
set.seed(10202016)
```
## Problem 1
1. *Consider the data set `gtemp2`, which contains surface temperature deviations. Compute the ACF and PACF of the first difference of the data set, and use the ACF, PACF, and AIC to fit an* $\text{ARIMA}(p,d,q)$ *model to the data set, using `arima()`.*
```{r, error=TRUE, tidy=TRUE}
# Your code here
```
2. *Use the `forecast()` function from the **forecast** package to find and plot a ten-year forecast for series using the computed fit.*
```{r, error=TRUE, tidy=TRUE}
# Your code here
```
## Problem 2
*Fit an* $\text{AR}(2)$ *model to the recruitment series `rec` (**astsa**), using `arima()`. Use block bootstrapping with $N=7$ bins to obtain standard errors for the estimated coefficients. Plot the joint distribution of the bootstrapped coefficients (excluding the intercept), and mark the position of the coefficients estimated from the actual data in the plot. Repeat, but instead of using the block bootstrap, generate new data sets using the estimated residuals, the estimated parameter values, and `filter()`. What do you notice? Which method seems to perform best?*
```{r, error=TRUE, tidy=TRUE}
# Your code here
```