Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


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

st: calculating percentage changes in an unbalanced panel data set


From   Tzaloupas Dimitrov <tzaloupas1232@yahoo.gr>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   st: calculating percentage changes in an unbalanced panel data set
Date   Tue, 5 Mar 2013 23:27:17 +0000 (GMT)

 



Dear all,

I have some time series observations (inflation) for a set of countries

The panel data set is unbalanced, that is,

egen id = group(country), label
tsset id time
       panel variable:  id (unbalanced)
        time variable:  time, 01oct2008 to 01nov2011, but with gaps
                delta:  1 day

within each country I want to find the percentage change of inflation.

I tried 

bysort country time : gen p2=(inf[2]-inf[1]/inf[1])*100

but I get this message 
(500 missing values generated)

 Am I doing something wrong?



I use Stata 11

Any help/code is greatly appreciated

Thanks in advance            

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index