# st: How to generate a cumulative sum (capital stock)

 From [email protected] To "statalist" <[email protected]> Subject st: How to generate a cumulative sum (capital stock) Date Thu, 25 Oct 2007 18:36:55 +0200

```Dear all,

I need some help to compute a capital stock series from a gross investment series. My primary problem is that I have to estimate the initial capital stock (K_0 ) for each firm. As a general rule, it is used the book value of fixed capital (K) in the first year of data (e.g. 1996) for each firm. How can I command Stata to consider this first observation (firm by firm) and then compute a capital stock series, using a perpetual inventory and a constant rate of depreciation? A previous post doesn't help me much on this point. These are the data.

Panl oif 300 firms, 10 years (1996-2006)
k = capital stock
I = capital investment
d [delta] = 0.05

The evolution of the real capital stock is:
K_t+i = (1 - d)*K_t+i-1 + I_t+i

Hope someone help me. I would appreciate other suggestions too! Thanks.

Damiano Rossi

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