Hi everyone,
I am trying to perform some rolling forecasts with an equation that include lags of other variables besides the lags of the dependent variable (a multivariate ARMA model I suppose).
I am using the code that first code for roll forecasts that is stored in the sample files of Eviews 8.
Well, those only use one variable. So:
1) I use the import comand to get all the variables I need.
2) I include some more regressors and lags into eq1.
When I run the file, it appears a message saying "unable to compute due to missing data in "Do.eq1forecast(f=na) ..."
What is that?
Everytime I do it without those extra regressors everything goes fine. I am also sure that I have the same number of observations for every variable. Although some of the observ. of the new regressors are "NA"... I find it weird that such could be the problem...
Rolling forecast more than 1 variable
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13583
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Rolling forecast more than 1 variable
The error message says "unable to compute due to missing data in..."
The most likely cause of this is that you have missing data in your regressors...
The most likely cause of this is that you have missing data in your regressors...
Re: Rolling forecast more than 1 variable
Yeah Gareth.
I looked today again at it and I found that in one of the regressors.
Sometimes a good night of sleep changes everything
Thank you
I looked today again at it and I found that in one of the regressors.
Sometimes a good night of sleep changes everything
Thank you
Re: Rolling forecast more than 1 variable
Hi all
I am trying something similar to above. I am running a loop that runs through a number of variables, estimates equations and then produces a forecast for each variable. The trick comes in that the variables update at different times of the year, so at certain times I'll have data for, say 2016m02 for some variables, but 2016m03 for others. The forecast end period remains fixed (e.g. 2016m06) for all variables, so I'm trying to write a piece of code that identifies where the variable's last data point is (2016m01/2016m02/2016m03), run the regression with the sample up to the latest data point, then start the forecast the period following that for each different variable.
In my mind, this seems a straightforward case of identifying each variable @last point in a loop, then estimating the equation and adding "+1" to the sample. Here is the code I have come up with, but eViews has an issue, saying "Illegal date %var.last in smpl 2002m1 "%var.@last". Any advice. Here is a portion of the code:
Once I get over this hurdle, identifying the forecast start should be easy
I am trying something similar to above. I am running a loop that runs through a number of variables, estimates equations and then produces a forecast for each variable. The trick comes in that the variables update at different times of the year, so at certain times I'll have data for, say 2016m02 for some variables, but 2016m03 for others. The forecast end period remains fixed (e.g. 2016m06) for all variables, so I'm trying to write a piece of code that identifies where the variable's last data point is (2016m01/2016m02/2016m03), run the regression with the sample up to the latest data point, then start the forecast the period following that for each different variable.
In my mind, this seems a straightforward case of identifying each variable @last point in a loop, then estimating the equation and adding "+1" to the sample. Here is the code I have come up with, but eViews has an issue, saying "Illegal date %var.last in smpl 2002m1 "%var.@last". Any advice. Here is a portion of the code:
Code: Select all
for !p=1 to gexp_f.count
%var = gexp_f.@seriesname(!p) 'name of var
%rolfore= {%var}.@last
smpl 2002m1 %rolfore-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13583
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Rolling forecast more than 1 variable
Code: Select all
smpl 2002m1 {%rolfore}
Re: Rolling forecast more than 1 variable
Thanks Gareth.
Re: Rolling forecast more than 1 variable
I seem to have gotten myself confused.
So once I have done the sample adjustment, I need to then set the forecast sample equal to the last date point, "{%rolfore}" +1. I have tried setting the sample in the forecast to {%rolfore}, but I keep getting a message that says "Unable to compute due to missing data in "DO_FORE.FORECAST Y1_F".
I know that there is missing data somewhere, but shouldn't it be the case that each variable ran the equation regression up to the last data point, and then the forecast should be following on from that. This is the code I have been using:
Any ideas?
So once I have done the sample adjustment, I need to then set the forecast sample equal to the last date point, "{%rolfore}" +1. I have tried setting the sample in the forecast to {%rolfore}, but I keep getting a message that says "Unable to compute due to missing data in "DO_FORE.FORECAST Y1_F".
I know that there is missing data somewhere, but shouldn't it be the case that each variable ran the equation regression up to the last data point, and then the forecast should be following on from that. This is the code I have been using:
Code: Select all
equation {%eqname}_{%var}.ls dlog({%dep}) {%regs} {%bestlagstr}
smpl {%rolfore} %forend
{%var} = @nan({%var},0)
{%eqname}.forecast {%dep}_f
series rm_{%var} = @rmse({%dep},{%dep}_f)
next
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13583
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Rolling forecast more than 1 variable
Impossible to say without the data/program.
Who is online
Users browsing this forum: No registered users and 2 guests
