Exercise

# Simulate the simple moving average model

The simple moving average (MA) model is a parsimonious time series model used to account for very short-run autocorrelation. It does have a regression like form, but here each observation is regressed on the previous innovation, which is not actually observed. Like the autoregressive (AR) model, the MA model includes the white noise (WN) model as special case.

As with previous models, the MA model can be simulated using the `arima.sim()`

command by setting the `model`

argument to `list(ma = theta)`

, where `theta`

is a slope parameter from the interval (-1, 1). Once again, you also need to specifcy the series length using the `n`

argument.

In this exercise, you'll simulate and plot three MA models with slope parameters 0.5, 0.9, and -0.5, respectively.

Instructions

**100 XP**

- Use
`arima.sim()`

to simulate a MA model with the slope parameter set to 0.5, and series length 100. Save this model to`x`

. - Use another call to
`arima.sim()`

to simulate a MA model with the slope parameter set to 0.9. Save this model to`y`

. - Use a third call to
`arima.sim()`

to simulate a final MA model with the slope paramter set to -0.5. Save this model to`z`

. - Use
`plot.ts()`

to display all three models.