Hello, I'm running a regression like this:
equation.ls Y c Y(-1) Y(-2) X X(-1) X(-2) Z Z(-1) Z(-2)
I have projections for X and Z in the future, therefore I can make a forecast. But my intention is to make one-step ahead forecast for Yand incoporate this forecast as if it were real. After that re-estimate my model including this one-step forecast (my sample gets +1 observation) and make a one step forecast again. An so on. The idea is to incorporate each forecast as new real data for future forecasts.
I have something like this, but I would like to make it a loop, so I don't have to manually estimate each time
smpl 2011m01 2015m10
equation m1.ls Y c Y(-1) Y(-2) X X(-1) X(-2) Z Z(-1) Z(-2)
smpl 2015m11 2015m11
forecast(f=actual) Y_F
Y = Y_F
And then I will re-estimate again for, incorporate the data to the original variable, reestimate and forecast for december ,january, and so on...
Any help in how to make this some kind of loop, or a rolling regressión with the fixed start point and moving +1 each time would be of great help
Incorporing new forecasted values to estimations
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
-
AntonioAcha
- Posts: 21
- Joined: Wed Jan 07, 2015 8:49 am
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Incorporing new forecasted values to estimations
You might want to think about the econometrics behind what you're doing. Using forecasted values of Y to re-estimate the equation and generate new forecasts does nothing - you'll get the same forecasts as if you had just used the original data.
Proof:
Proof:
Code: Select all
create m 1990 2020
series x1=nrnd
series x2=nrnd
smpl 1990 2015
series y=nrnd
equation eq1.ls y c x1 x2
smpl 2016 @last
eq1.fit yf
smpl 1990 2016
equation eq2.ls yf c x1 x2
smpl 2017 @last
eq2.fit yf2
show yf yf2
Who is online
Users browsing this forum: No registered users and 2 guests
