Hi, Can any one help me?
I am using EViews6. I want to forecast the future observations in the series of data(undated series). I already fitted the VAR model to this. My problem is I am not able to forecast the values of the series. I am using the following commands.
var mvar.ls 1 !i y x
mvar.makemodel(mod1)
smpl 20 50
mod1.solve
When I try this I am getting the error " Range Error in SMPL 20 50"
I want to forecast the future 20 values. Please note that I have created workfile using "workfile spurious u 1000"
Please let me know where I have done mistake.
Range Error while forecasting VAR
Moderators: EViews Gareth, EViews Moderator
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13307
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Range Error while forecasting VAR
There is nothing wrong with the code, as you've posted it. The following is, essentially, what you say you're doing, and it works fine:
Code: Select all
workfile spurious u 1000
series y=nrnd
series x=nrnd
var mvar.ls 1 3 y x
mvar.makemodel(mod1)
smpl 20 50
mod1.solve
Follow us on Twitter @IHSEViews
Re: Range Error while forecasting VAR
Hi Gareth,
Thanks for your reply, I will explain you the error which I am getting a little better.
I have created workfile with 1000 observations.-- workfile spurious u 1000
I have assigned two different series each with 185 observations to "Y and X"
I have written the following code
for !i=2 to 20
var mvar.ls 1 !i y x
if (condition for t-statistic) then
mvar.makemodel(mod1)
smpl 50 70
mod1.solve
exit loop
end if
end if
if I run this i getting error as "Range Error in SMPL 50 70"
If I change the code "smpl 50 70 " to "smpl 20 50" the error I am getting is
"Error in sample:Attempt to set sample outside of workfile range
Structure/Resize (from \WORKFILE\PROC menu) can expand the workfile range. in SMPL 20 50"
Thanks for your reply, I will explain you the error which I am getting a little better.
I have created workfile with 1000 observations.-- workfile spurious u 1000
I have assigned two different series each with 185 observations to "Y and X"
I have written the following code
for !i=2 to 20
var mvar.ls 1 !i y x
if (condition for t-statistic) then
mvar.makemodel(mod1)
smpl 50 70
mod1.solve
exit loop
end if
end if
if I run this i getting error as "Range Error in SMPL 50 70"
If I change the code "smpl 50 70 " to "smpl 20 50" the error I am getting is
"Error in sample:Attempt to set sample outside of workfile range
Structure/Resize (from \WORKFILE\PROC menu) can expand the workfile range. in SMPL 20 50"
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13307
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Range Error while forecasting VAR
As shown in my above code, there is nothing wrong with the way you are setting the sample. Either you do not have the workfile you think you do, or you are doing something else wrong.
Follow us on Twitter @IHSEViews
Re: Range Error while forecasting VAR
Hi Gareth,
I found the mistake which I am doing. After creating undated workfile, I am opening the workfiles using filepath. In that open workfile there is a variable with Date series.
Eviews considering it as dated series and giving range error (mentioned earlier) while forecasting VAR.
I need this date series to furnish start and end date of that workfile in my result table.
I have to forecast the VAR eventhough there is a date series in the workfile. Can you please let me know how to over come this?
Please note that I have ro forecast the series not based on Date, based on sample values using the command "smpl 100 120"
I found the mistake which I am doing. After creating undated workfile, I am opening the workfiles using filepath. In that open workfile there is a variable with Date series.
Eviews considering it as dated series and giving range error (mentioned earlier) while forecasting VAR.
I need this date series to furnish start and end date of that workfile in my result table.
I have to forecast the VAR eventhough there is a date series in the workfile. Can you please let me know how to over come this?
Please note that I have ro forecast the series not based on Date, based on sample values using the command "smpl 100 120"
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13307
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Range Error while forecasting VAR
You can use the pagestruct command to convert your dated workfile into an undated one.
Follow us on Twitter @IHSEViews
Re: Range Error while forecasting VAR
Hi Gareth,
Many thanks for your reply. It is working but I am not able to forecast the out sample. My "sample" and "Range" are becoming equal after fitting the model.
Is it possible to extend the workfile Range in the program before forecasting the out sample values so that Range: will be higher than Sample:?
If so please give the syntax for that.
Many thanks for your reply. It is working but I am not able to forecast the out sample. My "sample" and "Range" are becoming equal after fitting the model.
Is it possible to extend the workfile Range in the program before forecasting the out sample values so that Range: will be higher than Sample:?
If so please give the syntax for that.
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13307
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Range Error while forecasting VAR
You can use pagestruct to do that too.
Follow us on Twitter @IHSEViews
Who is online
Users browsing this forum: No registered users and 13 guests