Get startedGet started for free

Stationary time series: ARMA

1. Stationary time series: ARMA

You are probably wondering why it is valid to use ARMA models for stationary time series data.

2. Wold Decomposition

This question was answered in part by Hermann Wold, who showed that any stationary time series can be written as a linear combination of white noise. We can also show that an any ARMA model is a linear combination of white noise. This means that ARMA models are well suited for describing the dynamics of stationary time series. The moving average model is already in this form. As it turns out, all ARMA models are of this form.

3. Generating ARMA using arima.sim()

R provides an easy way to simulate these models. It is called 'arima-dot-sim'. The basic syntax are to specify the model using a list, and then specify how many observations you want. There are a few ways to specify the model, but the easiest way is to specify the order, p- the AR order, d which we haven't discussed yet, and q- the MA order.

4. Generating and plotting MA(1)

For example, to generate data from an MA(1) with parameter point-9,

5. Generating and plotting MA(1)

specify the model as a list with order equals c(0,0,1) and ma equals point-9. In this case, we'll generate 100 observations.

6. Generating and plotting AR(2)

In this example we'll generate and plot 100 observations from an AR(2)

7. Generating and plotting AR(2)

with parameters 0 and -.9. Note that the data are somewhat cyclic, like the southern oscillation index. Ok, your turn!

8. Let's practice!