Page 1 of 1

rename series in the group, or rename variables in eq object

Posted: Thu Mar 09, 2017 8:48 am
by ecofin
Hi everybody,
i have two question:
1/ i have group named g1 with 14 series, (GDP, INF, @month=1, @month=2,....,@month=12) with my equation estmation ls stock c GDP INF @expand(@month), i want to rename the 12 last series (@month=1 will be dum1 and @month=2 will be dum2.....etc ) by this code i get error message "DUM is not defined in "GROUP G DUM" i know that my code is incomplete.

Code: Select all

group g dum for !i=1 to 12 %oldname = g.@seriesname(!i) %newname = dum!i rename {%oldname} {%newname} next
2/ suppose i estimate this model: ls stock c GDP INF @expand(@month), is there an other way to rename the 12 varaibles (@month=1,... @month=12) in equation object by (dum1,..... dum12).

Re: rename series in the group, or rename variables in eq object

Posted: Thu Mar 09, 2017 8:51 am
by EViews Gareth
You can only rename objects that exist inside your workfile. @expand doesn't create series objects, it is just a function that you can use inline.

To actually create dummy variables for the months that exist in your workfile, you'd have to do something like:

Code: Select all

group g for !i=1 to 12 series dum{!i} = @month=!i g.add dum{!i}

Re: rename series in the group, or rename variables in eq object

Posted: Fri Mar 10, 2017 8:12 am
by ecofin
thanks a lot. :D