If you insist on percentages, throw in
**********
replace salesgrowth=salesgrowth*100
la var salesgrowth "Sales Growth Year on Year in Percent"
**********
HTH
Martin
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Martin Weiss
Sent: Monday, October 13, 2008 9:24 AM
To: [email protected]
Subject: st: RE: Calculating growth rates in a panel dataset
- bys id: g salesgrowth=(sales[_n]-sales[_n-1])/sales[_n-1]-
HTH
Martin
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Marcus Keupp
Sent: Monday, October 13, 2008 9:17 AM
To: [email protected]
Subject: st: Calculating growth rates in a panel dataset
Dear Statalisters,
please forgive me if the following question seems obvious to you. I have
checked the Statalist
archive and FAQs but answers but found none. My problem is one of data
manipulation in a large
panel dataset. The data ave the following form ("Time of measurement"
refers to the six points in time when the data were collected,
for research design reasons I only use information from periods 3-6)
Panel ID (firm) Time of measurement Sales
103 3 3.3million
103 4 6.0million
103 5 8.2million
103 6 8.9million
104 3 45.2million
104 4 46.5million
104 5 43.2million
104 6 37.2million
and so on for all panel IDs. What I want to do is to calculate the sales
growth rate for each interval, so that
for each panel ID / time of measurement combination, I have a sales growth
figure. So my desired output would look like this:
Panel ID (firm) Time of measurement Sales
Sales growth in percent
103 3 3.3million .
103 4 6.0million
81.81
103 5 8.2million
36.66
103 6 8.9million
8.53
104 3 45.2million
.
104 4 46.5million
2.87
104 5 43.2million
-7.09
104 6 37.2million
-13.88
Unfortunately, I keep running against a wall here. Do you have any
suggestions as to how one could manipulate the data to arrive
at this sales growth variable?
Best regards,
Marcus
___________________________________
Dr. oec. Marcus Matthias Keupp, Dipl.-Kfm.
Head of Research Lab
University of St. Gallen
Institute of Technology Management
Dufourstrasse 40a
CH-9000 St. Gallen / Switzerland
Tel. +41 (0)71 224 7236
Fax +41 (0)71 224 7301
http://www.alexandria.unisg.ch/publications/Marcus_Keupp
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/