Page 1 of 1
Genr Percentage change
Posted: Sun Sep 06, 2009 2:01 am
by Toolman6712
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!
Re: Genr Percentage change
Posted: Sun Sep 06, 2009 4:12 am
by trubador
Suppose your index series is named as price. Then you can generate annual inflation series as follows:
or alternatively:
Code: Select all
genr inf_a = price/price(-12)*100-100
Re: Genr Percentage change
Posted: Mon Sep 07, 2009 9:56 pm
by Toolman6712
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,
Re: Genr Percentage change
Posted: Mon Sep 07, 2009 11:16 pm
by trubador
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