Exercise

# Simple forecasts from an estimated MA model

Now that you've estimated a MA model with your `Nile`

data, the next step is to do some simple forecasting with your model. As with other types of models, you can use the `predict()`

function to make simple forecasts from your estimated MA model. Recall that the `$pred`

value is the forecast, while the `$se`

value is a standard error for that forecast, each of which is based on the fitted MA model.

Once again, to make predictions for several periods beyond the last observation you can use the `n.ahead = h`

argument in your call to `predict()`

. The forecasts are made recursively from 1 to h-steps ahead from the end of the observed time series. However, note that except for the 1-step forecast, all forecasts from the MA model are equal to the estimated mean (`intercept`

).

In this exercise, you'll use the `MA`

model derived from your `Nile`

data to make simple forecasts about future River Nile flow levels. Your `MA`

model from the previous exercise is available in your environment.

Instructions

**100 XP**

- Use
`predict()`

to make a forecast for River Nile flow level in 1971. Store the forecast in`predict_MA`

. - Use
`predict_MA`

along with`$pred[1]`

to obtain the 1-step forecast. - Use another call to
`predict()`

to make a forecast from 1971 through 1980. To do so, set the`n.ahead`

argument equal to`10`

. - Run the pre-written code to plot the
`Nile`

time series plus the forecast and 95% prediction intervals.