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]

st: calculating percentage changes in an unbalanced panel data set


From   Tzaloupas Dimitrov <[email protected]>
To   "[email protected]" <[email protected]>
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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index