Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: st: growth rate in panel data


From   Humaira Asad <[email protected]>
To   STATA HELP <[email protected]>
Subject   RE: st: growth rate in panel data
Date   Thu, 10 Feb 2011 15:21:40 +0000

 
:) Thank you Maarten and all. It worked, I have got the growth rate of the variables.



Humaira Asad
PhD Research Scholar

UoE Business School

University of Exeter, England


----------------------------------------
> Date: Thu, 10 Feb 2011 14:46:16 +0000
> From: [email protected]
> Subject: Re: st: growth rate in panel data
> To: [email protected]
>
> --- On Thu, 10/2/11, Humaira Asad wrote:
> > I have a 5 yearly panel data set covering 107 countries. I
> > have to calculate the growth rate of different variables.
> 
> > I want to calculate the growth rate of log of GINI for
> > 1965, 1970 etc for each country. The years are 1965, 1970
> > ..... to 2010.
>
> You obviously need two consecutive observations to know the
> change, so using your example data, there will only be one
> observation for which you can compute the growth (1975 for
> country A). For all other observations in your dataset we
> just do not know what the growth is, and Stata will corectly
> give them a missing value.
>
> *------------- begin example --------------
> // create the dataset
> clear
> input str1 country year loggini
> A 1965 .
> A 1970 3.68
> A 1975 2.34
> A 1980 .
> B 1965 .
> B 1970 3.24
> end
>
> // country needs to be numeric
> encode country , gen(countrynum)
>
> // declare the data as time series
> // -delta(5)- tells Stata that it
> // is a 5-yearly panel
> tsset countrynum year, delta(5)
>
> // create growth
> gen growth = D.loggini
>
> // look at the results
> list
> *------------ end example ---------------
> (For more on examples I sent to the Statalist see:
> http://www.maartenbuis.nl/example_faq )
>
> Hope this helps,
> Maarten
>
> --------------------------
> Maarten L. Buis
> Institut fuer Soziologie
> Universitaet Tuebingen
> Wilhelmstrasse 36
> 72074 Tuebingen
> Germany
>
> http://www.maartenbuis.nl
> --------------------------
>
>
>
>
> *
> * 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/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index