Page 1 of 1

converting script to eviews programs to run later

Posted: Wed Mar 01, 2017 11:06 am
by adrangi
Hi. I'm using version 9.5. As a test I've captured my commands using command capture. Saved it as a text file. Trying to see if I can save my script and run it like a program anytime. Two issues:

1. when I pasted it to the command panel and tried to run them, nothing ran. For instance didn't recognize the following at all.

{%equation}.ls log(wage) c educ exper hrswk educ*exper educ^2 exper^2

doesn't like the first term {%equation}

Do I have to clean up the captured commands? I thought this is what quick estimate ran!

2. Assuming this problem gets resolved, how do I convert the text file to a program file so that I can call and run it?

Any help is appreciated. Thanks. Best, BA

Re: converting script to eviews programs to run later

Posted: Wed Mar 01, 2017 11:25 am
by EViews Gareth
The long answer is that when you perform thing interactively (with the menus/dialogs) you often work with unnamed objects. For example when you click on Quick->Estimate Equation, an equation gets estimated, but it is an unnamed equation - one that doesn't exist in the workfile.

When using the programming language you cannot work with unnamed objects. Every thing has to be named. Thus there is no programming language equivalent of Quick-Estimate Equation.

Rather than just outputting nothing, the command capture window outputs what the command would be had you estimated with a named equation rather than unnamed. Where the name of the equation would go, the capture window puts in a {%equation} instead.

To convert the capture script into a program, the easiest thing to do is add this to the top of the program:

Code: Select all

%equation = "eq1"
equation {%equation}


And similar for other object types.

Re: converting script to eviews programs to run later

Posted: Thu Mar 02, 2017 8:39 pm
by adrangi
Thanks much. Will give it a try. Best, BA