converting script to eviews programs to run later

For posts that don't quite fit into any of the other forums, including posts about these forums themselves.

Moderators: EViews Gareth, EViews Moderator

adrangi
Posts: 31
Joined: Sat Dec 05, 2009 5:56 pm

converting script to eviews programs to run later

Postby adrangi » Wed Mar 01, 2017 11:06 am

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

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

Re: converting script to eviews programs to run later

Postby EViews Gareth » Wed Mar 01, 2017 11:25 am

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.
Follow us on Twitter @IHSEViews

adrangi
Posts: 31
Joined: Sat Dec 05, 2009 5:56 pm

Re: converting script to eviews programs to run later

Postby adrangi » Thu Mar 02, 2017 8:39 pm

Thanks much. Will give it a try. Best, BA


Return to “Any Other Business”

Who is online

Users browsing this forum: No registered users and 4 guests