Forecast a Time Series Using an ARIMA Model

DESCRIPTION:

Forecasts a univariate time series using an ARIMA model. Under the assumption that the model is known, predicted values and their standard errors are computed for future values.

USAGE:

arima.forecast(x, model, n, end, sigma2=<<see below>>,  
               future.positions = NULL, ...) 

REQUIRED ARGUMENTS:

x
a univariate time series. This can be either an old-style time series ( ts, rts) or a new-style time series (class "timeSeries"). Missing values (NA) are allowed.
model
a list specifying an ARIMA model as in arima.mle. Note that the coefficients must be provided through the elements ar and ma (otherwise the coefficients are set to zero).

For old-style time series, either end or n must be specified. If both are specified, they must agree.

OPTIONAL ARGUMENTS:

n
the number of time periods to forecast beyond the end of the old-style series (optional if end is provided).
end
the last date for which forecasts should be produced for an old-style series. Forecasts will be produced for every time period between end(x) and end.
sigma2
the estimated innovations variance. If omitted, sigma2 will be the concentrated prediction error variance computed from the model.
future.positions
the positions at which to produce forecasts for a new-style time series.

VALUE:

a list with the following elements:
mean
the estimated mean of the forecasts.
std.err
the approximate forecast error. In a Gaussian series with known ARIMA model structure, then each row of the matrix tsmatrix(mean-1.96*std.err, mean+1.96*std.err) is a 95% (non-simultaneous) confidence interval for the forecast in that time period. Note that std.err does not take into account the variability due to estimation of the ARIMA model.

DETAILS:

The ARIMA model is put into state space form and the Kalman filter is applied to obtain the forecast intervals. This is done using the function arima.filt.

This function is superseded by ARIMA model object method function predict.arima.

REFERENCES:

Harvey, A. C. (1981). Time Series Models. Wiley, New York.

SEE ALSO:

, , .

EXAMPLES:

# Fit an ARIMA model to the ship data and forecast one year beyond the end of 
# the data.  Plot the series along with forecast means +/- two standard errors 
model <- list(list(order=c(0,1,1)),list(order=c(0,1,1),period=12)) 
ship.fit <- arima.mle(ship,model=model) 
ship.fore <- arima.forecast(ship,n=12,model=ship.fit$model) 
tsplot(ship,ship.fore$mean,ship.fore$mean+2*ship.fore$std.err, 
        ship.fore$mean-2*ship.fore$std.err)