Fitting and forecasting

Once we’ve identified a particular model we need to estimate the parameters and assess how well the model fits. Fitting is usually carried out using maximum liklehood ($\min_{\phi, \theta, \sigma} (-log(f Y_1...Y_2 | \phi, \theta, \sigma)$ through a recursive process known as Kalman filtering. Residuals calculated using one step ahead predictions. These are uncorrelated by construction, and will be iid. normal if $\epsilon ~ NID(0, \sigma^2_\epsilon$ ).

Calculated in R, using z <- arima(y, order=c(p,d,q), seasonal=c(P,D,Q)).

Assessing quality of fit

Usual way of assessing fit is to examine residuals. Obvious what to do in AR (p) model, but for general ARMA (p,q) will have to invert MA characteristic polynomial. However, in practice residuals obtained as byproduct of prediction process. If ARMA model is correct they should be $~NID(0, \sigma^2_\epsilon$ .

Need to check:

Forecasting

Could use one-step ahead prediction, using previous predictions to extend out further, but in practice again come as byproduct of Kalman filtering.

In R: predict(z, n.ahead).