Problem Adding Variables to Group

For questions regarding programming in the EViews programming language.

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

RPEDC
Posts: 7
Joined: Wed Aug 28, 2013 11:43 am

Problem Adding Variables to Group

Postby RPEDC » Fri Oct 04, 2013 11:44 am

I'm generating a series that is a combination of other series for a number of variables. However, when I run the program with the code, it only generates the variable for the very last item in the loop command and adds that to the group I'm trying to create. What I have coded is below. What am I doing wrong with the code?

Code: Select all

for %i USA AFG ALB ALG ANG AGL ANT ARG ARM ARU AUST ASTR AZE BAHA BHR 'CREATE DUMP GROUP Group _Tenth '****NED_CAE genr {%i}_NED_CAE = ({%i}_TD)/ ({%i}_EXP + {%i}_SER) group _TENTH.add {%i}_NED_CAE next
For example, what would happen to me here is that I'd open up the group "_Tenth" and only see the variable BHR_NED_CAE in the group.

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

Re: Problem Adding Variables to Group

Postby EViews Gareth » Fri Oct 04, 2013 11:59 am

Create the group outside of the loop.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests