I have an ARIMA(0,2,1) model. How do i estimate the $\hat{e}_t$ component of the model. I have read a whole lot of theories that confuses me the more. Is there any practical way of estimating this $\hat{e}_t$? Does R offer any help to that too?

I know that my ARIMA(0,2,1) model can be written as $Y_{t} = 2Y_{t-1} - Y_{t-2} + e_{t} + \theta e_{t-1}$. I want to forecast 1-time ahead into the future. In that case, my forecast equation is given as $\hat Y_{t}(1) = 2Y_{t} -Y_{t-1} + \theta \hat e_{t}$. I know my value for $ Y_{t} =7.8$ and $ Y_{t-1} =7.8 $. I know my value of \theta as -0.6816, which i obtained from my R output. My problem now is, how do i determine the value for my $\hat e_{t} $ so i could find $ \hat Y_{t}(1)$? I have an R code that gives me all these forecasts though, but i want to know how R generated my first forecast and how it found the estimate for $\hat e_{t} $.

Thanks for looking!

  • $\begingroup$ Well, it was mostly @COOLSerdash but you're welcome! $\endgroup$ – Gala Jul 11 '13 at 13:53
  • $\begingroup$ @GaëlLaurans My edits were minimal at best :) gregoire_dube did most of it (initially). $\endgroup$ – COOLSerdash Jul 11 '13 at 14:03
  • $\begingroup$ thanks you two. I had followed your edits to present make some nice editing of my own. Thanks. $\endgroup$ – b2amen Jul 11 '13 at 14:07

I assume you want to find the fitted residual series $\hat{e}_t$ for $t = 1,2,...,T$.

If you are fitting your ARIMA model in R using the arima() command, then you will find the fitted residuals by:

fitted_model <- arima(x) #x is your time series
fitted_residuals <- fitted_model$residuals #the vector of residuals 

Now generate your predictions $n$ timesteps into the future, say $n=100$:

prediction_vector <- predict(fitted_model,n.ahead=100)
| cite | improve this answer | |
  • $\begingroup$ @gregoire_dude: Thanks for your answer. I have edit my question now. I hope that gives better information of what i really wanted. Could you take a peep at it now? $\endgroup$ – b2amen Jul 11 '13 at 14:02
  • 1
    $\begingroup$ OK. I believe you are asking how the model is 'initiated' because, for example, $\hat{Y}_1$ and similarly $\hat{e}_1$ require values from the past which are not observed. It's a good question. Some assumptions are required to generate estimates for these quantities. See the previous question here. $\endgroup$ – gregory_britten Jul 11 '13 at 15:25
  • $\begingroup$ It is a helpful document though, but it doesn't seem to really give me what i wanted $\endgroup$ – b2amen Jul 11 '13 at 15:38
  • $\begingroup$ I'm not 100% on the exact way ARIMA() does this, but it will surely involve a similar approach to the Box-Jenkins methodology which involves 'backcasting'. The way to do this is 1) assume the unobserved data are equal to $\bar{y}$ and the unestimated error equal to 0; 2) estimate the parameters of the ARIMA model by MLE; 3) backcast to estimate the initial values. $\endgroup$ – gregory_britten Jul 11 '13 at 16:33
  • 1
    $\begingroup$ I've fixed the answer so the code will now work. It is too hard to do it manually without writing a lot of code. Just use what is already provided. $\endgroup$ – Rob Hyndman Jul 15 '13 at 22:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.