Exercise

Estimate the simple moving average model

Now that you've simulated some MA models and calculated the ACF from these models, your next step is to fit the simple moving average (MA) model to some data using the arima() command. For a given time series x we can fit the simple moving average (MA) model using arima(..., order = c(0, 0, 1)). Note for reference that an MA model is an ARIMA(0, 0, 1) model.

In this exercise, you'll practice using a preloaded time series (x, shown in the plot on the right) as well as the Nile dataset used in earlier chapters.

Instructions

100 XP
  • Use arima() to fit the MA model to the series x.
  • What are the slope (ma1), mean (intercept), and innovation variance (sigma^2) estimates produced by your arima() output? Paste these into your workspace.
  • Use a similar call to arima() to fit the MA model to the Nile data. Save the results as MA and use print() to display the output.
  • Finally, use the pre-written commands to plot the Nile data and your fitted MA values.