[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

From |
"Carlo Lazzaro" <carlo.lazzaro@tin.it> |

To |
<statalist@hsphsun2.harvard.edu> |

Subject |
st: R: average rate of growth - help |

Date |
Sun, 11 Nov 2007 12:10:36 +0100 |

Daniele wrote: Dear all, I need to compute the "average rate of growth of variable -y-, over the previous three years". Could somebody help me with the command? Thanks in advance. Daniele Dear Daniele: - I suppose that your question refers to the Compound Average Growth Rate (CAGR). Considering a variable Y (which is assumed to take on the following values: 1 in the first year; 2 in the second as well as inn the third year) followed-up for a three-year span of time, the CAGR formula is. [(Y Value year 3 / Y Value year 1)^(1/3) -1]. - translated into Stata command, it might sound like the following example (please, see below): --------------------------------begin example------------------------------- set obs 3 obs was 0, now 3 gen Year=_n gen Y= 1 replace Y=2 in 2/3 (2 real changes made) gen CAGR=(Y[3]/Y[1])^(1/3)-1 in 3 ------------------------------- end example--------------------------------- HTH and Kind Regards, Carlo * * For searches and help try: * http://www.stata.com/support/faqs/res/findit.html * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/ * * For searches and help try: * http://www.stata.com/support/faqs/res/findit.html * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/

**References**:**st: average rate of growth - help***From:*west--@libero.it

- Prev by Date:
**st: average rate of growth - help** - Next by Date:
**Re: st: re: SUR and unbalanced panel data** - Previous by thread:
**st: average rate of growth - help** - Index(es):

© Copyright 1996–2015 StataCorp LP | Terms of use | Privacy | Contact us | What's new | Site index |