Dear Statalisters,
I'd like to generate a variable "γ" called the average annual growth rate according to the formula :

Where x is the revenue in year t, n is the number of years, γ is the average annual growth rate.
I hope to have the commands to generate γ.
Thank you in advance!
Best,
Josh
I attached an example of the sample.
-----------------------
------------------
I'd like to generate a variable "γ" called the average annual growth rate according to the formula :
Where x is the revenue in year t, n is the number of years, γ is the average annual growth rate.
I hope to have the commands to generate γ.
Thank you in advance!
Best,
Josh
I attached an example of the sample.
-----------------------
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input float(id year revenue) 1 2001 100 1 2002 20 1 2003 100 1 2004 110 1 2005 125 2 2003 60 2 2004 50 2 2005 90 3 2001 190 3 2002 180 3 2003 100 3 2004 90 end
Comment