RE: COMMAND CAPTURE PROGRAM TO WORK AS MACRO?

For questions regarding programming in the EViews programming language.

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

TrinityDCU
Posts: 1
Joined: Wed Nov 22, 2017 3:51 am

RE: COMMAND CAPTURE PROGRAM TO WORK AS MACRO?

Postby TrinityDCU » Wed Nov 22, 2017 12:09 pm

Hie Guys.

Can you please help me with the below:

I want to run a series of repetitive econometric tests for 300 Variables. hence I want to automate the process by having Eviews replicate the tests I would have done with the corresponding output. The sample code from the Command capture using Eviews 10 (interactive window) is as below
How can I modify this program code so that I will just paste the Program (Derived from Making a Program from the Command Capture window) it for other variables and get all the ouput with names as I want them to as MACROS do.

For now if I do it sometimes I get errors like syntax error and that there is no Workfile. Also when I input the program for other variables it just Runs it but does not Show Results of the Output as I would have done in the First variable. For instance after running an OLS I rename it as Table01 and unit test Table02 etc. I would this to happen when I use the program for other variabes, but its just not working.

Is there a way of "altering" the Saved Program from Command Capture so that it can work just as Macros do as in following all the Steps I would have done?

Error Message Example-No workfile exists - Use NEW or OPEN to create or load a workfile in "LS(COV=HAC) REAL C DIFFERENTIAL".

EXAMPLE CODE TAKEN FROM COMMAND CAPTURE WINDOW AND SAVED AS A PROGRAM

wfcreate a 1870 2013
import(link) "C:\Users\Tatenda\Desktop\HW2 DATA\CODE PRACTISE\CANADA\DIFFERENTIAL.xls" range=Sheet1 colhead=1 na="#N/A" @freq A @id @date(year) @destid @date @smpl @all
import(link) "C:\Users\Tatenda\Desktop\HW2 DATA\CODE PRACTISE\CANADA\REALRATE.xls" range=Sheet1 colhead=1 na="#N/A" @freq A @id @date(year) @destid @date @smpl @all


ls(cov=hac) real c differential
table
rename table01
close TABLE01
close Untitled
ls(cov=hac) real c differential
auto
table
rename table02
close TABLE02
hettest c differential
{table
rename table03
close TABLE03
close Untitled

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

Re: RE: COMMAND CAPTURE PROGRAM TO WORK AS MACRO?

Postby EViews Gareth » Wed Nov 22, 2017 12:42 pm

Perhaps you could describe what you want the program to do?
Follow us on Twitter @IHSEViews


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 25 guests