Statalist


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

st: calculation of capital stock based on perpetual inventory method


From   "Azman Aziz, Mukhriz" <m.azmanaziz@lancaster.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: calculation of capital stock based on perpetual inventory method
Date   Tue, 1 Jul 2008 14:08:36 +0100

Hi everydbody, 

Can anyone show me how to calculate capital stock using perpetual inventory method? My dataset consist of 167 countries (panel data)
and some values of the capital stcok are missing for some countries. Below is my do file I attempted but unfortunatly the output I got appeared wrong!

encode country, gen(cty)
xtset cty year
by cty, sort: egen myear=min(year) if gfcf~=.
by cty, sort: ipolate gfcf year, gen(gfcf2)
by cty, sort: gen growth=(gfcf2-L.gfcf2)/L.gfcf2
by cty, sort: replace growth=0 if growt<0
by cty, sort: egen agrowth=mean(growth) if year<(myear+10)
by cty, sort: gen capital=gfcf2/(agrowth+0.06)
by cty, sort: replace capital=. if year>myear
by cty, sort: replace capital=((0.94*L.capital)+gfcf2) if year>myear

By the way, I use 6% depreciation rate and average of 10 years of growth for the formula. The missing values were interpolated using ipolate in Stata. 

Thanks
Mukhriz

*
*   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/



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