Skip to document

Elitz-using Arellano Bond GMMEstimators

Course

Law and Management (LM311)

289 Documents
Students shared 289 documents in this course
Academic year: 2014/2015
Uploaded by:
Anonymous Student
This document has been uploaded by a student, just like you, who decided to remain anonymous.
University of Mauritius

Comments

Please sign in or register to post comments.

Related Studylists

law docs

Preview text

Using Arellano – Bond Dynamic Panel GMM Estimators in Stata Tutorial with Examples using Stata 9 (xtabond and xtabond2) Elitza Mileva, Economics Department Fordham University July 9, 2007 1. The model The following model examines the impact of capital flows on investment in a panel dataset of 22 countries for 10 years (1995 – 2004): Iit = β1Ii,t−1 + β 2K it + β 3 X it + uit . (1) In equation (1) above Iit is gross fixed capital formation as a percentage of GDP and Iit-1 is its lagged value. Kit is a matrix of the components of foreign resource flows – FDI, loans and portfolio (equity and bonds) – as percentage shares of GDP. Xit is a matrix of the following control variables: lagged real GDP growth to account for the accelerator effect; the absolute value of one step ahead growth forecast errors as a measure of uncertainty; the change in the log terms of trade to gauge the price of imported capital goods; and, finally, the deviation of M2 from its three-year trend as a proxy for the liquidity available to finance investment. 2. Why the Arellano – Bond GMM estimator? Several econometric problems may arise from estimating equation (1): 1. The capital flows variables in Kit are assumed to be endogenous. Because causality may run in both directions – from capital inflows to investment and vice versa – these regressors may be correlated with the error term. 2. Time-invariant country characteristics (fixed effects), such as geography and demographics, may be correlated with the explanatory variables. The fixed effects are contained in the error term in equation (1), which consists of the unobserved country-specific effects, vi, and the observationspecific errors, eit: 1 uit = v i + eit (2). 3. The presence of the lagged dependent variable Iit-1 gives rise to autocorrelation. 4. The panel dataset has a short time dimension (T =10) and a larger country dimension (N =22). To solve problem 1 (and problem 2) one would usually use fixed-effects instrumental variables estimation (two-stage least squares or 2SLS), which is what I tried first. The exogenous instruments I used were the following: the aggregate long-term capital inflows to the countries in our sample as a group as a percentage of the sum of their cumulative GDP (I labelled these ‘regional flows’), an index of financial openness and the EBRD transition index. However, the first-stage statistics of the 2SLS regressions showed that my instruments were weak. With weak instruments the fixed-effects IV estimators are likely to be biased in the way of the OLS estimators. Therefore, I decided to use the Arellano – Bond (1991) difference GMM estimator first proposed by Holtz-Eakin, Newey and Rosen (1988). Instead of using only the exogenous instruments listed above lagged levels of the endogenous regressors in Kit (FDI, loans and portfolio) are also added. This makes the endogenous variables pre-determined and, therefore, not correlated with the error term in equation (1). To cope with problem 2 (fixed effects) the difference GMM uses first-differences to transform equation (1) into ΔIit = β1ΔIi,t−1 + β 2ΔK it + β 3ΔX it + Δuit (3). (In general form the transformation is given by: Δy it = αΔy it−1 + Δx ′it β + Δuit .) By transforming the regressors by first differencing the fixed country-specific effect is removed, because it does not vary with time. From equation (2) we get Δuit = Δv i + Δeit or uit − ui,t−1 = (v i − v i ) + (eit − ei,t−1 ) = eit − ei,t−1. The first-differenced lagged dependent variable (problem 3) is also instrumented with its past levels. 2 example). Stata needs a numerical variable for the panel ID so the variable ctry, which is a string variable, won’t work. Alternatively, you can type the following command: tsset ctry_dum year panel variable: time variable: ctry_dum (strongly balanced) year, 1995 to 2004 3 Stata command: xtabond Two Arellano–Bond estimators are available for Stata 9 – one incorporated into Stata 9 (called xtabond) and one proprietor program written by Roodman (2006) (called xtabond2). First is discussed the former (Stata 10 will have two AB estimators built in, including it version of the system estimator). Click on Statistics, Longitudinal / Panel data, Dynamic panel data, Arellano – Bond regression (RE). Stata displays a window, in which you can easily select the dependent variable, the endogenous and exogenous independent variables as well as the lags of the instruments. 3 Stata command: xtabond2 Although the above-mentioned Stata menu option is easier to use, I have found Roodman’s proprietary program (xtabond2) better – it is more flexible and has a better help file and “how to do xtabond2” paper (see in the references). xtabond2 can do everything that xtabond does and has many additional features. See the Stata help file or the paper for a description of the improvements offered by Roodman’s program. The disadvantage of xtabond2 is that you actually have to type the program code – there is no menu for it. Since xtabond2 is not an official command of Stata 9, it has to be downloaded from the Internet ideas.repec/c/boc/bocode/s435901.html or by typing the following command: ssc install xtabond2 If you have to download all xtabond2-related files from the repec website, make sure you save each file in the appropriate ado folder in your Stata folder, that is in the folder of the first letter of the file name as it is listed on the website. ( xtabond2 may be directly available with Stata 10, or it may include a different system routine) 4 The following command shows you the help file: help xtabond2 Below is the command I used to estimate equation (1) followed by the Stata output: xtabond2 inv l fdi loans portfolio l uncert tot dev_m2, gmm (inv fdi loans portfolio, lag (2 2)) iv(fin_integr trans_index flows_eeca l uncert tot dev_m2) nolevel small Favoring space over speed. To switch, type or click on mata: mata set matafavor speed, perm. Warning: Number of instruments may be large relative to number of observations. Suggested rule of thumb: keep number of instruments <= number of groups. Arellano-Bond dynamic panel-data estimation, one-step difference GMM results -----------------------------------------------------------------------------Group variable: ctry_dum Number of obs = 165 Time variable : year Number of groups = 22 Number of instruments = 39 Obs per group: min = 3 F(8, 157) = 6 avg = 7 Prob > F = 0 max = 8 -----------------------------------------------------------------------------| Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------inv | L1. | .2922856 .111738 2 0 .0715819 .5129893 fdi | .5202847 .2094545 2 0 .1065725 .933997 loans | .2789421 .1638248 1 0 - .6025271 portfolio | - .3376843 -0 0 - .6583028 growth | L1. | .1167961 .0555715 2 0 .0070319 .2265604 uncert | .0397982 .0673439 0 0 - .172815 tot | .9193659 1 0 0 -2 4 dev_m2 | .0443079 .0760188 0 0 - .1944594 -----------------------------------------------------------------------------Sargan test of overid. restrictions: chi2(31) = 36 Prob > chi2 = 0 Arellano-Bond test for AR(1) in first differences: z = Arellano-Bond test for AR(2) in first differences: z = -0 -0 Pr > z = Pr > z = 0 0 As you can see, the command xtabond2 is followed by the dependent variable (inv) and the list of all right-hand-side variables: xtabond2 inv l fdi loans portfolio l uncert tot dev_m2 The lag operator is given by l. as in l or l2 for 2 lags of inv. 5 heteroskedasticity, but the standard errors are downward biased. Use twostep robust to get the finite-sample corrected two-step covariance matrix. robust specifies that the resulting standard errors are consistent with panel-specific autocorrelation and heteroskedasticity in one-step estimation. By default Stata also reports three additional tests: Sargan test, AR(1) and AR(2) tests. The Sargan test has a null hypothesis of “the instruments as a group are exogenous”. Therefore, the higher the p-value of the Sargan statistic the better. In robust estimation Stata reports the Hansen J statistic instead of the Sargan with the same null hypothesis. The Arellano – Bond test for autocorrelation has a null hypothesis of no autocorrelation and is applied to the differenced residuals. The test for AR (1) process in first differences usually rejects the null hypothesis (though not in my example), but this is expected since Δeit = eit − ei,t−1 and Δei,t−1 = ei,t−1 − ei,t−2 both have ei,t−1 . The test for AR (2) in first differences is more important, because it will detect autocorrelation in levels. Before closing Stata you can save the data file in .dta format, which is the Stata data format. Choose File, Save As or type: save “C:\ABExample” When you open that file next time, all settings, such as the panel-data setting, or any new variables you have created will be saved. 4. Using the Arellano – Bond system GMM estimator in Stata Sometimes the lagged levels of the regressors are poor instruments for the first-differenced regressors. In this case, one should use the augmented version – “system GMM”. The system GMM estimator uses the levels equation (e. equation (1) in this example) to obtain a system of two equations: one differenced and one in levels. By adding the second equation additional instruments can be obtained. Thus the variables in levels in the second equation are instrumented with their own first differences. This usually increases efficiency. Below is the command and Stata output for Arellano – Bond System GMM estimator. Note that nolevel no longer is included after the comma in the command and Stata defaults to the system GMM. Including the equation in levels does not difference out the constant, therefore, if the model does not call for a constant, type noconst after the comma in the command. 7 xtabond2 inv l fdi loans portfolio l uncert tot dev_m2, gmm (inv fdi loans portfolio, lag (3 3)) iv(fin_integr trans_index flows_eeca l uncert tot dev_m2) small noconst Favoring space over speed. To switch, type or click on mata: mata set matafavor speed, perm. Warning: Number of instruments may be large relative to number of observations. Suggested rule of thumb: keep number of instruments <= number of groups. Arellano-Bond dynamic panel-data estimation, one-step system GMM results -----------------------------------------------------------------------------Group variable: ctry_dum Number of obs = 187 Time variable : year Number of groups = 22 Number of instruments = 63 Obs per group: min = 4 F(8, 179) = 1700 avg = 8 Prob > F = 0 max = 9 -----------------------------------------------------------------------------| Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------inv | L1. | .898973 .025188 35 0 .8492693 .9486767 fdi | .9096135 .2207568 4 0 .4739929 1 loans | .1813443 .1994594 0 0 - .5749386 portfolio | - .4072526 -1 0 -1 .1062178 growth | L1. | .1028205 .0514219 2 0 .0013493 .2042917 uncert | .1431728 .0564829 2 0 .0317148 .2546307 tot | -2 2 -0 0 -6 2 dev_m2 | .0076649 .081528 0 0 - .1685446 -----------------------------------------------------------------------------Sargan test of overid. restrictions: chi2(55) = 43 Prob > chi2 = 0 Arellano-Bond test for AR(1) in first differences: z = Arellano-Bond test for AR(2) in first differences: z = -1 -0 Pr > z = Pr > z = 0 0 As the output table above shows, using system GMM increased efficiency. There are, however, two important points to be made about using system GMM. First, because system GMM uses more instruments than the difference GMM it may not be appropriate to use system GMM with a dataset with a small number of countries. Recall that when the number of instruments is greater than the number of countries the Sargan test may be weak. Second, in a panel with fixed effects including the equation in levels requires a new assumption – the first-differenced instruments used for the variables in levels should not be correlated with the unobserved country effects. Roodman (2006) discusses how this assumption depends on assumptions about the initial conditions. Some authors prefer to include in the levels equation only those variables, which are uncorrelated with the fixed effects. xtabond2 offers the 8 5. References Arellano, M. and S. Bond. (April 1991). Some tests of specification for panel data: Monte Carlo evidence and an application to employment equations. The Review of Economic Studies, 58. pp. 277 – 297. Holtz-Eakin, D., W. Newey and H. S. Rosen (1988). Estimating vector autoregressions with panel data. Econometrica 56. pp. 1371 – 1395. Roodman, D. (December 2006). How to do xtabond2: an introduction to “Difference” and “System” GMM in Stata. Center for Global Development Working Paper Number 103. 10

Was this document helpful?

Elitz-using Arellano Bond GMMEstimators

Course: Law and Management (LM311)

289 Documents
Students shared 289 documents in this course
Was this document helpful?
Using Arellano – Bond Dynamic Panel GMM Estimators in Stata
Tutorial with Examples using Stata 9.0
(xtabond and xtabond2)
Elitza Mileva,
Economics Department
Fordham University
July 9, 2007
1. The model
The following model examines the impact of capital flows on investment in a panel dataset
of 22 countries for 10 years (1995 – 2004):
I
it =
β
1
I
i,t1
+
β
2
K
it
+
β
3
X
it
+
uit . (1)
In equation (1) above Iit is gross fixed capital formation as a percentage of GDP and Iit-1 is its
lagged value. Kit is a matrix of the components of foreign resource flows – FDI, loans and
portfolio (equity and bonds) – as percentage shares of GDP. Xit is a matrix of the following control
variables: lagged real GDP growth to account for the accelerator effect; the absolute value of one
step ahead growth forecast errors as a measure of uncertainty; the change in the log terms of trade
to gauge the price of imported capital goods; and, finally, the deviation of M2 from its three-year
trend as a proxy for the liquidity available to finance investment.
2. Why the Arellano – Bond GMM estimator?
Several econometric problems may arise from estimating equation (1):
1. The capital flows variables in Kit are assumed to be endogenous. Because causality may run in
both directions – from capital inflows to investment and vice versa – these regressors may be
correlated with the error term.
2. Time-invariant country characteristics (fixed effects), such as geography and demographics,
may be correlated with the explanatory variables. The fixed effects are contained in the error term
in equation (1), which consists of the unobserved country-specific effects, vi, and the observation-
specific errors, eit:
1