help stockcapit


Calculates physical capital stock by the perpetual-inventory method


stockcapit investvar gdpvar [if] [in] [, options]

options Description ------------------------------------------------------------------------- Main capital(newvar) specifies the new capital variable to be created delta(#) specifies the constant depreciation rate; default is delta(0.05) -------------------------------------------------------------------------

You must tsset your data before using stockcapit; see tsset. The stockcapit command works for both Time series and Panel data. varlist must not contain time-series operators; see tsvarlist. by is not allowed with stockcapit; see [D] by for more details on by.


stockcapit calculates physical capital stock by the perpetual-inventory method using investvar (Investment variable) and gdpvar (GDP variable). The initial capital stock is computed as in Harberger (1978). See Nehru and Dhareshwar (1993) and King and Levine (1994) for more details concerning the measurement of initial capital stock. As pointed by Barro and Sala-i Martin (2004) the calculated capital stock for the first years depends on the initial guess of initial capital stock and hence is unreliable. But as initial capital depreciates, the computed stocks become more and more precise.


+------+ ----+ Main +-------------------------------------------------------------

capital(newvar) specifies the name of the new capital variable to be created. You must provided this variable name, otherwise stockcapit will abort with an error message.

delta(#) indicates the constant depreciation rate; default is delta(0.05). Some authors like Nehru and Dhareshwar (1993) state that the choice of the depreciation rate is more important than the initial capital stock. They argue that an error in the depreciation rate have an effect on both initial and final capital stocks and these errors have a propensity to reinforce one another. The choice of the default as 0.05 is based on Bosworth and Collins (2003).


stockcapit is not an official Stata command. The usual disclimers apply: all errors and imperfections in this package are mine and all comments are very welcome.


The package stockcapit rely on the package tsspell. Hence you must install tsspell to make stockcapit work. To install the package tsspell from within Stata, please click on: ssc install tsspell, replace. Note that you must be connected to Internet for this action to work.

Return values

Macros r(capital) Created capital stock variable


We open the dataset stockcapitdatapand.dta. The data are panel data from Penn World Table 7.0 which contain 190 countries from 1950 to 2009.

use, clear

We compute the capital stock by placing first the investment variable and then the GDP variable. We enter the name of the capital stock variable to be created as capital.

stockcapit invest gdp, capit(capital)

This creates the capital stock variable named capital. By default it is labeled as "Calculated Physical Capital Stock". To see this, we type:

des capital

The stockcapit command can also be applied on a single time series data. To illustrate this, we open the following dataset containing a time series data.

use, clear

stockcapit invest gdp, capit(capital)

We observe that the capital stock variable named capital is created. By default it is labeled as "Calculated Physical Capital Stock".


Barro, R.J. and Sala-i-Martin, X.: 2004, (Second Edition) "Economic Growth", McGraw-Hill.

Bosworth, B.P. and Collins, S.M.: 2003, "The empirics of Growth: An Update", Brookings Papers on Economic Activity 2:113-206.

Harberger, A.: 1978, "Perspectives on Capital and Technology in Less Developed Countries" in M.J. Artis and A.R. Nobey (eds.), Contemporary Economic Analysis (London: Croom Helm).

Heston, A., Summers, R. and Aten, B.: 2011, "Penn World Table Version 7.0", Center for International Comparisons of Production, Income and Prices at the University of Pennsylvania, March.

King, R. G. and Levine R.: 1994, "Capital Fundamentalism, Economic Development, and Economic Growth", Carnegie-Rochester Conference Series on Public Policy, Vol. 40.

Nehru, V. and Dhareshwar, A.: 1993, "A New Database on Physical Capital Stock: Sources, Methodology and Results", Rivista de Analisis Economico 8 (1): 37-59.


Diallo Ibrahima Amadou,

Also see

Online: help for generate, egen, tsspell (must be installed)