Var command (EV 6)

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt

nadja123
Posts: 72
Joined: Thu Aug 06, 2009 10:43 am

Var command (EV 6)

Postby nadja123 » Thu Apr 22, 2010 8:01 am

Hi there,

I would be grateful for helping with this: I want to run the same set of commands upon multiple workfiles (below I give just a fragment).

Code: Select all

for !j = 1 to 2 open C:\Zeviewsdirectory\country{!j}.wf1 open C:\Zeviewsdirectory\copiescharts.wf1 var var01.ls 1 3 gdp rev xpe freeze(gdp_gdp_grx_{!j}) var01.impulse(20, se=a) gdp @ rev @ gdp rev xpe copy gdp_gdp_grx_{!j} copiescharts:: save C:\Zeviewsdirectory\country{!j}.wf1 close country{!j} next save C:\Zeviewsdirectory\copiescharts.wf close copiescharts
Running the code gets stuck at the fourth line
var var01.ls 1 3 gdp rev xpe
with the error message: GDP is not defined for var var01....

What is strange, if I open the country1.wf1 or country2.wf1 and run the fourth line in interactive mode, it just produces the estimate. I am sorry, maybe I am too overworked. I attach the workfiles. Many thanks for a rescue!!!
Attachments
copiescharts.WF1
(7.28 KiB) Downloaded 357 times
country2.wf1
(9.11 KiB) Downloaded 331 times
country1.wf1
(9.11 KiB) Downloaded 326 times

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13603
Joined: Tue Sep 16, 2008 5:38 pm

Re: Var command (EV 6)

Postby EViews Gareth » Thu Apr 22, 2010 8:05 am

The third line tells EViews to open "copiescharts.wf1". Thus you are no longer working with the country workfile. Thus GDP can't be found.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests