One step ahead forecast from an estimated model - error term

11 views (last 30 days)
I have estimated the model for my series and it is arima(1,1,1). Instead of available k-step ahead option, I need to do one-step ahead forecast. The model is:
ARIMA(1,1,1) Model:
--------------------
Conditional Probability Distribution: Gaussian
Standard t
Parameter Value Error Statistic
----------- ----------- ------------ -----------
Constant 8.96034e-05 0.00121444 0.0737815
AR{1} 0.531086 0.0802215 6.62025
MA{1} -0.917878 0.0394706 -23.2548
Variance 0.0378884 0.00419511 9.03158
so, the equation will be
y(k) = .000089 + (0.531086*y(k-1)) + e(k) + (-0.917878*e(k-1))
What will be the value of 'e' term? what should be 'e(k)'? Correct me if I have interpreted anything wrongly.
  3 Comments
Brendan Hamm
Brendan Hamm on 20 Sep 2016
Yes the model w ould be:
y(k) = .000089 + y(k-1) + [0.531086*(y(k-1) - y(k-2))] + e(k) + (-0.917878*e(k-1))
e(k) in this example is simply a Normal random variable with mean zero and variance 0.038 such e(k) is independent of e(k-t)) for all t.
Look at the forecast method, you should provide the pre-sample response 'Y0' and innovations 'E0'.
doc arima\forecast
Forecast provides MLE (i.e. all e sampled will be zero), but you can also use the simulate method to sample from that distribution:
doc arima\simulate
na ja
na ja on 22 Sep 2016
Thanks Brendan! Will do the same. I have one more doubt regarding statistical concept of ARIMA. As I have discussed above, this model is ARIMA(1,1,1). For one step ahead forecast I am using the equation
[y(k) - y(k-1)] = .000089 + [0.531086*(y(k-1) - y(k-2))] + e(k) + (-0.917878*e(k-1))
What will be the value of e(k-1) term to get 1st forecast (i.e. for k =1)? Is it the last value of residual matrix of training data or something else? I am bothered because according to the equation, i am predicting differences, not the actual values. The residual table gives the residuals for (actual values- predicted values).

Sign in to comment.

Accepted Answer

Brendan Hamm
Brendan Hamm on 22 Sep 2016
Edited: Brendan Hamm on 24 Sep 2016
1. The arima\estimate method will return to you the data on the original scale. That is if you do:
Mdl = arima(1,1,1);
Mdl = estimate(Mdl,data);
res = infer(Mdl,data); % Retrieve inferred residuals (innovations)
foreValues = forecast(Mdl,1,'Y0',data','E0',res) % forecast
Your forecasted data will be on the same scale as data and not the differenced data. The difference operator is just applied and you have the model you wrote above, but are simply returned y(k),y(k+1),...
2. The residual e(k-1) is he last value in the variable res above. That is, if you pass 'E0' to the forecast method it will use the residuals which were infered from the model and data.
  5 Comments
Lorenzo
Lorenzo on 21 Jan 2023
Thank you for this answer! Can you then plot the forecasted values combined with the observed values so that we get a graph were we see the continuity between observed and forecasted values?

Sign in to comment.

More Answers (0)

Categories

Find more on Conditional Mean Models in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!