```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```




## Random Walk  ARIMA(0,d=1,0)

Note the simulated time series below with differencing  $d=1$: 

- model equation is $y_t=y_{t-1}+\epsilon_{t}$
- note the time plot displays a trend.
- note the ACF coefficients remain very high.
- the PACF(1) is the only non zero coefficient on the PACF plot indicating $y_{t-1}$ is the only explanatory variable needed for explaining this time series. 

See Random Walk model https://otexts.com/fpp2/stationarity.html#random-walk-model 


```{r,warning=FALSE, message=FALSE}
require(fma)
tsdisplay(arima.sim(list(order = c(0,1,0)), n = 10000))
```


### Comparison differencing ARIMA(0,d=1,0) with AutoRegressive model ARIMA(p=1,0,0)

Note the simulated AR(1) time series by comparison : 

-  model equation is $y_t=\phi_1\ y_{t-1}+\epsilon_{t}$ with $|\phi_1|<1$
- the time plot does not display trend
- the ACF plot shows an exponential decrease
-  the PACF(1) is the only non zero coefficient on the PACF plot indicating $y_{t-1}$ is the only explanatory variable needed for explaining this time series.   



```{r,warning=FALSE, message=FALSE}
require(fma)
tsdisplay(arima.sim(list(order = c(1,0,0), ar = 0.7), n = 10000))
```



## Higher order differencing   


### Example ARIMA(0,d=2,0)


```{r,warning=FALSE, message=FALSE}
require(fma)
tsdisplay(arima.sim(list(order = c(0,2,0)), n = 10000))
```


### Example ARIMA(0,d=3,0)


```{r,warning=FALSE, message=FALSE}
require(fma)
tsdisplay(arima.sim(list(order = c(0,3,0)), n = 10000))
```



## Remark: White noise ARIMA(0,0,0) 

See White noise
https://otexts.com/fpp2/wn.html

```{r,warning=FALSE, message=FALSE}
require(fma)
tsdisplay(arima.sim(list(order = c(0,0,0)), n = 10000))
```
