Genr Percentage change

For questions regarding the import, export and manipulation of data in EViews, including graphing and basic statistics.

Moderators: EViews Gareth, EViews Steve, EViews Moderator, EViews Jason

Toolman6712
Posts: 2
Joined: Sun Sep 06, 2009 1:39 am

Genr Percentage change

Postby Toolman6712 » Sun Sep 06, 2009 2:01 am

I am a new eviews user and am somewhat confused on how to use the genr command line. I am doing regression for inflation rates and trying to get the percentage change from a 12 month period. My question is this: If the consumer price index for the following years looks like this, how can I calculate the percentage change using the genr command? The data is as follows:

1960 Month 1: 30.5
1960 Month 2: 30.6
1960 Month 3: 30.6
1960 Month 4: 30.6
1960 Month 5: 30.6
1960 Month 6: 30.7
1960 Month 7: 30.6
1960 Month 8: 30.6
1960 Month 9: 30.6
1960 Month 10: 30.8
1960 Month 11: 30.8
1960 Month 12: 30.7

Thanks in advance for anyone that can help me with this!

trubador
Did you use forum search?
Posts: 1520
Joined: Thu Nov 20, 2008 12:04 pm

Re: Genr Percentage change

Postby trubador » Sun Sep 06, 2009 4:12 am

Suppose your index series is named as price. Then you can generate annual inflation series as follows:

Code: Select all

genr inf_a = @pcy(price)
or alternatively:

Code: Select all

genr inf_a = price/price(-12)*100-100

Toolman6712
Posts: 2
Joined: Sun Sep 06, 2009 1:39 am

Re: Genr Percentage change

Postby Toolman6712 » Mon Sep 07, 2009 9:56 pm

Trubador,

I tried using the equation that you suggested but it did not work. Maybe I am doing something wrong within the program. By looking at the data I've included, can you please give me an example on how that would calculate the percentage change for a 12 month period? Under the genr tab, our class was instructed by our professor to use the following formula: ((CPIX-CPIX(-12))/CPIX(-12)*100 CPIX=name of workfile that spreadsheet data is located.

Thank you again,

trubador
Did you use forum search?
Posts: 1520
Joined: Thu Nov 20, 2008 12:04 pm

Re: Genr Percentage change

Postby trubador » Mon Sep 07, 2009 11:16 pm

There has been problem uploading the data into the forum, I guess. Please note that formula should be applied to the series stored in that workfile, not directly to a workfile. In my example, for instance, I assumed that the index series of consumer prices are stored in your workfile under the name of "price". Inflation series can then be generated either via entering those codes directly into the command line or using the "Quick/Generate Series" dialog. You should also supply the name of the new series to be generated to the left hand side of your formula.

Please refer to following link for more detailed explanations and useful illustrations: http://www.eviews.com/illustrated/Illustrated.html


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 2 guests