Page 1 of 1

Var command (EV 6)

Posted: Thu Apr 22, 2010 8:01 am
by nadja123
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!!!

Re: Var command (EV 6)

Posted: Thu Apr 22, 2010 8:05 am
by EViews Gareth
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.