[R] How to find residual in predict ARIMA

Xiyan Lon xiyanlon at gmail.com
Sat Aug 21 18:29:36 CEST 2010


Dear All,

I have a model to predict time series data for example:

data(LakeHuron)
Lake.fit <- arima(LakeHuron,order=c(1,0,1))

then the function predict() can be used for predicting future data
with the model:

LakeH.pred <- predict(Lake.fit,n.ahead=5)

I can see the result LakeH.pred$pred and LakeH.pred$se but I did not
see residual in predict function.
If I have a model:

[\
Z_t = Z_{t-1} + A + e_t + B*e_{t-1}
\]

How could I find $e_t$ dan $e_{t-1}$ ?

Best, XY



More information about the R-help mailing list