predict() on a
arima Class Object
predict.arima(object, newdata=NULL, n.predict=1, sigma2=NULL)
"arima".
sigma2 will be the
concentrated prediction error variance computed from the model.
"forecast" which contains the following components:
NULL if the
standard errors were not computed.
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.
# 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)