Use predict() on a arima Class Object

DESCRIPTION:

Performs prediction from a fitted ARIMA model fit of "arima" class.

USAGE:

predict.arima(object, newdata=NULL, n.predict=1, sigma2=NULL) 

REQUIRED ARGUMENTS:

object
an object inheriting from class "arima".

OPTIONAL ARGUMENTS:

newdata
a data frame containing the future values of exogenous variables, if any, at which predictions are required.
n.predict
an integer specifying the number of periods to predict ahead.
sigma2
the estimated innovations variance. If omitted, sigma2 will be the concentrated prediction error variance computed from the model.

VALUE:

an object of class "forecast" which contains the following components:
values
a vector, or a matrix that represents the predictions or forecasted values.
std.err
a vector, or a matrix that represents the standard errors of the predictions. It can be NULL if the standard errors were not computed.

DETAILS:

This function is a method for the generic function predict for class "arima". It can be invoked by calling predict for an object of the appropriate class, or directly by calling predict.arima regardless of the class of the object.

It supersedes arima.forecast function.

SEE ALSO:

, , , , .

EXAMPLES:

# Fit a Box-Jenkins (0,1,1)x(0,1,1)12 Airline model to the 
<CODE>ship</CODE> data 
# Use zeros as the starting values for the optimizer 
al.mod <- list(list(order=c(0,1,1)), list(order=c(0,1,1), period=12)) 
fit <- arima.mle(ship, model=al.mod) 
# generate 10-step ahead prediction
predict(fit, n.predict=10)