08/03/2022 14:50 [STATA] Dynamic panel data (xtabond2) Motivation Following Arellano and Bond (1991), let us model firms’ employmentn using a partial adjustment model to reflect the costs of hiring and firing. To reflect this partial adjustment, we include two lags of employment: nt−1 and nt−2 . Other variables are: Current and lagged wage level: wt and wt−1 . Current, once- and twice-lagged capital stock: kt , kt−1 , kt−2 . Current, once- and twice-lagged output in the firm’s sector: yst , yst−1 , yst−2 All variablesare expressed as logarithms. https://deepnote.com/@carlos-mendez/STATA-Dynamic-panel-data-xtabond2-jo5hm0DYQy-HAnZZbv_qjg 1/12 08/03/2022 14:50 [STATA] Dynamic panel data (xtabond2) A set of time dummies is also included to capture business cycle effects. Import data *use "https://www.stata-press.com/data/r17/abdata.dta", clear webuse abdata, clear describe year float %9.0g emp float %9.0g wage float %9.0g cap float %9.0g indoutpt float %9.0g n float %9.0g w float %9.0g k float %9.0g ys float %9.0g rec float %9.0g yearm1 float %9.0g id float %9.0g nL1 float %9.0g nL2 float %9.0g wL1 float %9.0g kL1 float %9.0g kL2 float %9.0g ysL1 float %9.0g ysL2 float %9.0g yr1976 byte %8.0g year==1976 yr1977 byte %8.0g year==1977 yr1978 byte %8.0g year==1978 yr1979 byte %8.0g year==1979 yr1980 byte %8.0g year==1980 yr1981 byte %8.0g year==1981 yr1982 byte %8.0g year==1982 yr1983 byte %8.0g year==1983 yr1984 byte %8.0g year==1984 -------------------------------------------------------------------------------Sorted by: id year Describe data sort id year xtset id year https://deepnote.com/@carlos-mendez/STATA-Dynamic-panel-data-xtabond2-jo5hm0DYQy-HAnZZbv_qjg 2/12 08/03/2022 14:50 [STATA] Dynamic panel data (xtabond2) xtsum n nL1 nL2 w wL1 k kL1 kL2 ys ysL1 ysL2 Panel variable: id (unbalanced) Time variable: year, 1976 to 1984 Delta: 1 unit Variable | Mean Std. dev. Min Max | Observations -----------------+--------------------------------------------+---------------c1 overall | . . . . | N = 0 between | . . . | n = 0 within . . . | T = . | | ind overall | | 5.123181 2.678095 1 9 | N = 1031 2.677405 1 9 | n = 140 0 5.123181 2.21607 1976 1984 | N = 1031 between | .6001349 1979 1981 | n = 140 within 2.133869 1975.651 between | within | 5.123181 | T-bar = 7.36429 | year overall | | 1979.651 | 1983.651 | T-bar = 7.36429 | emp overall | | 15.93492 .104 108.562 | N = 1031 between | 7.891677 16.16889 .12975 102.1901 | n = 140 within 2.209997 -14.81247 | 34.76311 | T-bar = 7.36429 | wage overall | between | within | | 23.9188 5.648418 8.0171 45.2318 | N = 1031 5.184036 8.713344 36.06047 | n = 140 2.06765 11.72244 40.93513 | T-bar = 7.36429 | | Pooled OLS regress n nL1 nL2 w wL1 k kL1 kL2 ys ysL1 ysL2 yr*, cluster(id) note: yr1976 omitted because of collinearity. note: yr1977 omitted because of collinearity. note: yr1984 omitted because of collinearity. Linear regression Number of obs = 751 F(16, 139) = 13990.88 Prob > F = 0.0000 R-squared = 0.9944 Root MSE = .10158 https://deepnote.com/@carlos-mendez/STATA-Dynamic-panel-data-xtabond2-jo5hm0DYQy-HAnZZbv_qjg 3/12 08/03/2022 14:50 [STATA] Dynamic panel data (xtabond2) (Std. err. adjusted for 140 clusters in id) -----------------------------------------------------------------------------| Robust n | Coefficient std. err. t P>|t| [95% conf. interval] -------------+---------------------------------------------------------------nL1 | 1.044643 .0517969 20.17 0.000 .9422313 1.147055 nL2 | -.0765426 .0488082 -1.57 0.119 -.1730451 .0199598 w | -.5236727 .1740911 -3.01 0.003 -.8678817 -.1794637 wL1 | .4767538 .1717904 2.78 0.006 .1370937 .8164139 k | .3433951 .048649 7.06 0.000 .2472074 .4395829 kL1 | -.2018991 .0650327 -3.10 0.002 -.3304803 -.073318 kL2 | -.1156467 .0358966 -3.22 0.002 -.1866206 -.0446727 ys | .4328752 .17894 2.42 0.017 .079079 .7866715 ysL1 | -.7679125 .2514336 -3.05 0.003 -1.265041 -.2707836 ysL2 | .3124721 .1322678 2.36 0.020 .0509551 .5739891 yr1976 | 0 (omitted) yr1977 | 0 (omitted) yr1978 | -.0153956 .0204269 -0.75 0.452 -.0557832 .024992 yr1979 | .0004932 .0187355 0.03 0.979 -.0365503 .0375367 yr1980 | .0065977 .0204613 0.32 0.748 -.033858 .0470534 yr1981 | -.0375487 .0228406 -1.64 0.102 -.0827087 .0076113 yr1982 | -.0304299 .0194649 -1.56 0.120 -.0689156 .0080557 yr1983 | -.0080024 .020992 -0.38 0.704 -.0495073 .0335025 yr1984 | 0 (omitted) _cons | .2901212 .3136154 0.93 0.357 -.3299523 .9101947 ------------------------------------------------------------------------------ Problems: Ignore unobserved heterogeneity at the firm level ... Within estimator xtreg n nL1 nL2 w wL1 k kL1 kL2 ys ysL1 ysL2 yr*, fe cluster(id) (Std. err. adjusted for 140 clusters in id) -----------------------------------------------------------------------------| Robust n | Coefficient std. err. t P>|t| [95% conf. interval] -------------+---------------------------------------------------------------nL1 | .7329476 .0596831 12.28 0.000 .6149436 .8509516 nL2 | -.1394773 .0781564 -1.78 0.077 -.2940065 .0150519 w | -.5597445 .1596195 -3.51 0.001 -.8753406 -.2441484 https://deepnote.com/@carlos-mendez/STATA-Dynamic-panel-data-xtabond2-jo5hm0DYQy-HAnZZbv_qjg 4/12 08/03/2022 14:50 [STATA] Dynamic panel data (xtabond2) wL1 | .3149987 .1430587 2.20 0.029 .0321463 .5978511 k | .3884188 .056928 6.82 0.000 .275862 .5009756 kL1 | -.0805185 .0538774 -1.49 0.137 -.1870436 .0260066 kL2 | -.0278013 .0426222 -0.65 0.515 -.1120728 .0564703 ys | .468666 .1712492 2.74 0.007 .1300759 .8072561 ysL1 | -.6285587 .2066106 -3.04 0.003 -1.037065 -.2200527 0.44 0.663 -.2043473 .3203001 ysL2 | .0579764 .1326758 yr1976 | 0 (omitted) yr1977 | 0 (omitted) yr1978 | .0119152 .0281652 0.42 0.673 -.0437723 .0676028 yr1979 | .0165714 .0278495 0.60 0.553 -.038492 .0716348 yr1980 | .0231479 .0266961 0.87 0.387 -.029635 .0759308 yr1981 | -.013454 .0272058 -0.49 0.622 -.0672447 .0403366 yr1982 | -.0224821 .0202344 -1.11 0.268 -.062489 .0175248 yr1983 | -.0161192 .0208214 -0.77 0.440 -.0572868 .0250485 yr1984 | 0 (omitted) _cons | 1.780205 .6303464 2.82 0.005 .5338981 3.026512 -------------+---------------------------------------------------------------sigma_u | .22568151 sigma_e | .09395847 rho | .85227336 (fraction of variance due to u_i) ------------------------------------------------------------------------------ Problems: Nickell bias: The first difference of the lag dependent variable is correlated with the first difference of the error. The Nickell bias is more servere in short time series. ... A consistent estimate should be between polled OLS (upper bound) and the within estimator (lower bound) Anderson-Hsiao It works for the first-differenced equation. Let us instrument the lagged dependent variable with the twice-lagged level ivregress 2sls D.n (D.nL1 = nL2) D.(nL2 w wL1 k kL1 kL2 /// ys ysL1 ysL2 yr1979 yr1980 yr1981 yr1982 yr1983) . | . 636 . 3 0 0.8 0.3 5 .68 6 . 5 3 5 2.14 0.032 .0830965 1.898064 | ys | D1. | .9905803 .4630105 | ysL1 | https://deepnote.com/@carlos-mendez/STATA-Dynamic-panel-data-xtabond2-jo5hm0DYQy-HAnZZbv_qjg 5/12 08/03/2022 14:50 y [STATA] Dynamic panel data (xtabond2) | D1. | -1.937912 1.438225 -1.35 0.178 -4.75678 .8809566 .4870838 .5099415 0.96 0.339 -.5123832 1.486551 .0467148 .0448599 1.04 0.298 -.0412089 .1346385 .0761344 .0624919 1.22 0.223 -.0463474 .1986163 .022623 .0557394 0.41 0.685 -.0866242 .1318701 .0127801 .0548402 0.23 0.816 -.0947048 .120265 .0099072 .0456113 0.22 0.828 -.0794894 .0993037 .0159337 .0273445 0.58 0.560 -.0376605 .0695279 | ysL2 | D1. | | yr1979 | D1. | | yr1980 | D1. | | yr1981 | D1. | | yr1982 | D1. | | yr1983 | D1. | | _cons | -----------------------------------------------------------------------------Instrumented: D.nL1 Instruments: D.nL2 D.w D.wL1 D.k D.kL1 D.kL2 D.ys D.ysL1 D.ysL2 D.yr1979 Problems: ... Difference GMM Assume that endogeneity is only present in the first lagged dependent variable xtabond2 n nL1 nL2 w wL1 k kL1 kL2 ys ysL1 ysL2 yr*, gmm(nL1) /// iv(w wL1 k kL1 kL2 ys ysL1 ysL2 yr*) nolevel robust small | ys | .6085073 .1753161 3.47 0.001 .2618979 .9551167 ysL1 | -.7111651 .2354565 -3.02 0.003 -1.176675 -.245655 ysL2 | .1057969 .1434813 0.74 0.462 -.1778733 .3894671 yr1978 | .0077033 .0319176 0.24 0.810 -.0553996 .0708062 yr1979 | .0172578 .0295618 0.58 0.560 -.0411875 .0757031 yr1980 | .0297185 .0281082 1.06 0.292 -.0258529 .0852899 yr1981 | -.004071 .0303813 -0.13 0.894 -.0641364 .0559944 yr1982 | -.0193555 .0232123 -0.83 0.406 -.0652474 .0265364 yr1983 | -.0136171 .0191302 -0.71 0.478 -.0514386 .0242044 https://deepnote.com/@carlos-mendez/STATA-Dynamic-panel-data-xtabond2-jo5hm0DYQy-HAnZZbv_qjg 6/12 08/03/2022 14:50 [STATA] Dynamic panel data (xtabond2) -----------------------------------------------------------------------------Instruments for first differences equation Standard D.(w wL1 k kL1 kL2 ys ysL1 ysL2 yr1976 yr1977 yr1978 yr1979 yr1980 yr1981 yr1982 yr1983 yr1984) GMM-type (missing=0, separate instruments for each period unless collapsed) L(1/.).nL1 -----------------------------------------------------------------------------Arellano-Bond test for AR(1) in first differences: z = -3.60 Pr > z = 0.000 Arellano-Bond test for AR(2) in first differences: z = -0.52 Pr > z = 0.606 -----------------------------------------------------------------------------Sargan test of overid. restrictions: chi2(25) = 67.59 Prob > chi2 = 0.000 Prob > chi2 = 0.177 (Not robust, but not weakened by many instruments.) Hansen test of overid. restrictions: chi2(25) = 31.38 (Robust, but can be weakened by many instruments.) Difference-in-Hansen tests of exogeneity of instrument subsets: iv(w wL1 k kL1 kL2 ys ysL1 ysL2 yr1976 yr1977 yr1978 yr1979 yr1980 yr1981 yr19 > 82 yr1983 yr1984) Hansen test excluding group: chi2(11) = 12.01 Prob > chi2 = 0.363 Difference (null H = exogenous): chi2(14) = 19.37 Prob > chi2 = 0.151 A more succint way of writing the same command: xtabond2 n L(1/2).n L(0/1).w L(0/2).(k ys) yr*, gmm(L.n) /// iv(L(0/1).w L(0/2).(k ys) yr*) nolevel robust small --. | .6085073 .1753161 3.47 0.001 .2618979 .9551167 L1. | -.7111651 .2354565 -3.02 0.003 -1.176675 -.245655 L2. | .1057969 .1434813 0.74 0.462 -.1778733 .3894671 yr1978 | .0077033 .0319176 0.24 0.810 -.0553996 .0708062 yr1979 | .0172578 .0295618 0.58 0.560 -.0411875 .0757031 yr1980 | .0297185 .0281082 1.06 0.292 -.0258529 .0852899 yr1981 | -.004071 .0303813 -0.13 0.894 -.0641364 .0559944 yr1982 | -.0193555 .0232123 -0.83 0.406 -.0652474 .0265364 yr1983 | -.0136171 .0191302 -0.71 0.478 -.0514386 .0242044 | -----------------------------------------------------------------------------Instruments for first differences equation Standard D.(w L.w k L.k L2.k ys L.ys L2.ys yr1976 yr1977 yr1978 yr1979 yr1980 yr1981 yr1982 yr1983 yr1984) GMM-type (missing=0, separate instruments for each period unless collapsed) L(1/.).L.n -----------------------------------------------------------------------------Arellano-Bond test for AR(1) in first differences: z = -3.60 Pr > z = 0.000 Arellano-Bond test for AR(2) in first differences: z = -0.52 Pr > z = 0.606 -----------------------------------------------------------------------------Sargan test of overid. restrictions: chi2(25) = 67.59 Prob > chi2 = 0.000 (Not robust, but not weakened by many instruments.) https://deepnote.com/@carlos-mendez/STATA-Dynamic-panel-data-xtabond2-jo5hm0DYQy-HAnZZbv_qjg 7/12 08/03/2022 14:50 [STATA] Dynamic panel data (xtabond2) Hansen test of overid. restrictions: chi2(25) = 31.38 Prob > chi2 = 0.177 (Robust, but can be weakened by many instruments.) Difference-in-Hansen tests of exogeneity of instrument subsets: iv(w L.w k L.k L2.k ys L.ys L2.ys yr1976 yr1977 yr1978 yr1979 yr1980 yr1981 yr > 1982 yr1983 yr1984) Hansen test excluding group: iff ( ll chi2(11) ) hi ( = 12.01 Prob > chi2 = ) b 0.363 hi Let us study the senstivity of the results to the choice of “GMM-style” lag specification Restrict the maximun lags to 5 periods xtabond2 n nL1 nL2 w wL1 k kL1 kL2 ys ysL1 ysL2 yr*, gmm(nL1, lag(2 5)) /// iv(w wL1 k kL1 kL2 ys ysL1 ysL2 yr*) nolevel robust small ys | .6399356 .2082587 3.07 0.003 .2281969 1.051674 ysL1 | -.7762311 .3621577 -2.14 0.034 -1.492236 -.0602258 ysL2 | .0195998 .1916987 0.10 0.919 -.3593988 .3985985 yr1978 | -.0264333 .0272127 -0.97 0.333 -.0802342 .0273677 yr1979 | -.0087855 .025915 -0.34 0.735 -.0600208 .0424498 yr1980 | .0103422 .028649 0.36 0.719 -.0462984 .0669828 yr1981 | -.0197328 .0358396 -0.55 0.583 -.0905897 .0511241 yr1982 | -.0298074 .0307328 -0.97 0.334 -.0905677 .030953 yr1983 | -.0112002 .0204428 -0.55 0.585 -.0516167 .0292162 -----------------------------------------------------------------------------Instruments for first differences equation Standard D.(w wL1 k kL1 kL2 ys ysL1 ysL2 yr1976 yr1977 yr1978 yr1979 yr1980 yr1981 yr1982 yr1983 yr1984) GMM-type (missing=0, separate instruments for each period unless collapsed) L(2/5).nL1 -----------------------------------------------------------------------------Arellano-Bond test for AR(1) in first differences: z = -1.41 Pr > z = 0.158 Arellano-Bond test for AR(2) in first differences: z = -2.08 Pr > z = 0.037 -----------------------------------------------------------------------------Sargan test of overid. restrictions: chi2(16) = 24.69 Prob > chi2 = 0.075 Prob > chi2 = 0.676 (Not robust, but not weakened by many instruments.) Hansen test of overid. restrictions: chi2(16) = 12.95 (Robust, but can be weakened by many instruments.) Difference-in-Hansen tests of exogeneity of instrument subsets: iv(w wL1 k kL1 kL2 ys ysL1 ysL2 yr1976 yr1977 yr1978 yr1979 yr1980 yr1981 yr19 > 82 yr1983 yr1984) Hansen test excluding group: chi2(2) = 1.40 Prob > chi2 = 0.497 Restrict the maximun lags to 4 periods https://deepnote.com/@carlos-mendez/STATA-Dynamic-panel-data-xtabond2-jo5hm0DYQy-HAnZZbv_qjg 8/12 08/03/2022 14:50 [STATA] Dynamic panel data (xtabond2) xtabond2 n nL1 nL2 w wL1 k kL1 kL2 ys ysL1 ysL2 yr*, gmm(nL1, lag(2 4)) /// iv(w wL1 k kL1 kL2 ys ysL1 ysL2 yr*) nolevel robust small nL2 | .2314476 .1747848 1.32 0.188 -.1141113 .5770065 w | -.7087804 .2175647 -3.26 0.001 -1.138918 -.2786434 wL1 | .6080322 .2624007 2.32 0.022 .0892518 1.126812 k | .3094885 .0680321 4.55 0.000 .1749855 .4439916 kL1 | -.2112921 .122904 -1.72 0.088 -.4542799 .0316957 kL2 | -.2016251 .0656621 -3.07 0.003 -.3314426 -.0718076 ys | .6982485 .2025977 3.45 0.001 .297702 1.098795 ysL1 | -.986704 .34575 -2.85 0.005 -1.67027 -.3031376 ysL2 | .1115407 .1988029 0.56 0.576 -.2815033 .5045848 yr1978 | -.0397756 .0323797 -1.23 0.221 -.103792 .0242408 yr1979 | -.0148331 .0322496 -0.46 0.646 -.0785923 .0489261 yr1980 | .0100056 .0351291 0.28 0.776 -.0594465 .0794576 yr1981 | -.021134 .043033 -0.49 0.624 -.1062125 .0639445 yr1982 | -.0261283 .0347394 -0.75 0.453 -.09481 .0425534 yr1983 | -.0049688 .0241235 -0.21 0.837 -.0526622 .0427247 -----------------------------------------------------------------------------Instruments for first differences equation Standard D.(w wL1 k kL1 kL2 ys ysL1 ysL2 yr1976 yr1977 yr1978 yr1979 yr1980 yr1981 yr1982 yr1983 yr1984) GMM-type (missing=0, separate instruments for each period unless collapsed) L(2/4).nL1 -----------------------------------------------------------------------------Arellano-Bond test for AR(1) in first differences: z = -2.04 Pr > z = 0.041 Arellano-Bond test for AR(2) in first differences: z = -1.93 Pr > z = 0.054 -----------------------------------------------------------------------------Sargan test of overid. restrictions: chi2(13) = 10.22 Prob > chi2 = 0.676 Prob > chi2 = 0.714 (Not robust, but not weakened by many instruments.) Hansen test of overid. restrictions: chi2(13) = 9.75 (Robust, but can be weakened by many instruments.) The estimate of the lagged dependent variable’s coefficient appears to be quite sensitive to thechoice of lag length. One disadvantage of this difference GMM approach is that it magnifies gaps in unbalanced panels. This motivates an alternative transformation: the forward orthogonal deviations (FOD) transformation (Arellano and Bover, 1995). The FOD transformation subtracts the average of all available future observations from the current value. We apply this transformation below. xtabond2 n nL1 nL2 w wL1 k kL1 kL2 ys ysL1 ysL2 yr*, gmm(nL1) /// iv(w wL1 k kL1 kL2 ys ysL1 ysL2 yr*) nolevel orthogonal robust small | ys | .4687189 .1720838 2.72 0.007 .1285001 .8089377 ysL1 | -.6254982 .2187189 -2.86 0.005 -1.057917 -.1930792 https://deepnote.com/@carlos-mendez/STATA-Dynamic-panel-data-xtabond2-jo5hm0DYQy-HAnZZbv_qjg 9/12 08/03/2022 14:50 [STATA] Dynamic panel data (xtabond2) ysL2 | .0419738 .1422114 0.30 0.768 -.2391858 .3231334 yr1978 | .0091826 .0272736 0.34 0.737 -.0447388 .063104 yr1979 | .0145949 .0267841 0.54 0.587 -.0383588 .0675485 yr1980 | .0216254 .0258883 0.84 0.405 -.0295572 .072808 yr1981 | -.0145863 .0268631 -0.54 0.588 -.0676961 .0385235 yr1982 | -.023622 .0203417 -1.16 0.248 -.0638385 .0165946 yr1983 | -.0159339 .0209197 -0.76 0.448 -.0572932 .0254254 -----------------------------------------------------------------------------Instruments for orthogonal deviations equation Standard FOD.(w wL1 k kL1 kL2 ys ysL1 ysL2 yr1976 yr1977 yr1978 yr1979 yr1980 yr1981 yr1982 yr1983 yr1984) GMM-type (missing=0, separate instruments for each period unless collapsed) L(1/.).nL1 -----------------------------------------------------------------------------Arellano-Bond test for AR(1) in first differences: z = -4.09 Pr > z = 0.000 Arellano-Bond test for AR(2) in first differences: z = -0.31 Pr > z = 0.758 -----------------------------------------------------------------------------Sargan test of overid. restrictions: chi2(25) = 61.85 Prob > chi2 = 0.000 Prob > chi2 = 0.170 (Not robust, but not weakened by many instruments.) Hansen test of overid. restrictions: chi2(25) = 31.61 (Robust, but can be weakened by many instruments.) Difference-in-Hansen tests of exogeneity of instrument subsets: iv(w wL1 k kL1 kL2 ys ysL1 ysL2 yr1976 yr1977 yr1978 yr1979 yr1980 yr1981 yr19 > 82 yr1983 yr1984) Hansen test excluding group: chi2(11) = 11.09 Prob > chi2 = 0.436 Let us assume that the lag of employment, wages, and capital are endogenous (GMM-style) xtabond2 n nL1 nL2 w wL1 k kL1 kL2 ys ysL1 ysL2 yr*, gmm(nL1 wL1 kL1) /// iv(ys ysL1 ysL2 yr*) nolevel robust small kL2 | -.0304529 .0321355 -0.95 0.345 -.0939866 .0330807 ys | .6509498 .189582 3.43 0.001 .276136 1.025764 ysL1 | -.9162028 .2639274 -3.47 0.001 -1.438001 -.3944042 ysL2 | .2786584 .1855286 1.50 0.135 -.0881415 .6454584 yr1978 | .0238987 .0367972 0.65 0.517 -.0488513 .0966487 yr1979 | .0352258 .0351846 1.00 0.318 -.034336 .1047876 yr1980 | .0502675 .0365659 1.37 0.171 -.0220252 .1225602 yr1981 | .0102721 .0349996 0.29 0.770 -.058924 .0794683 yr1982 | -.0111623 .0264747 -0.42 0.674 -.0635042 .0411797 yr1983 | -.0069458 .0191611 -0.36 0.718 -.0448283 .0309368 -----------------------------------------------------------------------------Instruments for first differences equation Standard D.(ys ysL1 ysL2 yr1976 yr1977 yr1978 yr1979 yr1980 yr1981 yr1982 yr1983 yr1984) GMM-type (missing=0, separate instruments for each period unless collapsed) https://deepnote.com/@carlos-mendez/STATA-Dynamic-panel-data-xtabond2-jo5hm0DYQy-HAnZZbv_qjg 10/12 08/03/2022 14:50 [STATA] Dynamic panel data (xtabond2) L(1/.).(nL1 wL1 kL1) -----------------------------------------------------------------------------Arellano-Bond test for AR(1) in first differences: z = -5.39 Pr > z = 0.000 Arellano-Bond test for AR(2) in first differences: z = -0.78 Pr > z = 0.436 -----------------------------------------------------------------------------Sargan test of overid. restrictions: chi2(74) = 120.62 Prob > chi2 = 0.001 Prob > chi2 = 0.487 (Not robust, but not weakened by many instruments.) Hansen test of overid. restrictions: chi2(74) = 73.72 (Robust, but can be weakened by many instruments.) Difference-in-Hansen tests of exogeneity of instrument subsets: iv(ys ysL1 ysL2 yr1976 yr1977 yr1978 yr1979 yr1980 yr1981 yr1982 yr1983 yr1984 > ) Hansen test excluding group: chi2(65) System GMM Diff ( ll H ) hi2(9) = 56.99 Prob > chi2 = 0.750 16 72 P 0 053 b hi2 Let us follow Blundell and Bond, who used a simpler model, dropping the second lags and removing sectoral demand. We consider wages and capital as potentially endogenous, with GMM-style instruments xtabond2 n L.n L(0/1).(w k) yr*, gmm(L.(n w k)) iv(yr*, equation(level)) /// robust small yr1980 | -.0173995 .0221715 -0.78 0.434 -.0612366 .0264376 yr1981 | -.0435283 .0193348 -2.25 0.026 -.0817565 -.0053 yr1982 | -.0096193 .0186829 -0.51 0.607 -.0465588 .0273201 yr1983 | .0038132 .0171959 0.22 0.825 -.0301861 .0378126 _cons | .5522011 .1971607 2.80 0.006 .1623793 .9420228 -----------------------------------------------------------------------------Instruments for first differences equation GMM-type (missing=0, separate instruments for each period unless collapsed) L(1/.).(L.n L.w L.k) Instruments for levels equation Standard _cons yr1976 yr1977 yr1978 yr1979 yr1980 yr1981 yr1982 yr1983 yr1984 GMM-type (missing=0, separate instruments for each period unless collapsed) D.(L.n L.w L.k) -----------------------------------------------------------------------------Arellano-Bond test for AR(1) in first differences: z = -5.46 Pr > z = 0.000 Arellano-Bond test for AR(2) in first differences: z = -0.25 Pr > z = 0.804 Carlos Mendez / [STATA] Dynamic panel data (xtabond2) Published at Aug 22, 2021 = 186.90 Prob > chi2 = 0.000 -----------------------------------------------------------------------------Sargan test of overid. restrictions: chi2(100) (Not robust, but not weakened by many instruments.) Hansen test of overid. restrictions: chi2(100) = 110.70 Prob > chi2 = 0.218 (Robust, but can be weakened by many instruments.) https://deepnote.com/@carlos-mendez/STATA-Dynamic-panel-data-xtabond2-jo5hm0DYQy-HAnZZbv_qjg 11/12 08/03/2022 14:50 ( , y y [STATA] Dynamic panel data (xtabond2) ) Difference-in-Hansen tests of exogeneity of instrument subsets: GMM instruments for levels Hansen test excluding group: chi2(79) = 84.33 Prob > chi2 = 0.320 Difference (null H = exogenous): chi2(21) = 26.37 Prob > chi2 = 0.193 iv(yr1976 yr1977 yr1978 yr1979 yr1980 yr1981 yr1982 yr1983 yr1984, eq(level)) Hansen test excluding group: chi2(93) Difference (null H = exogenous): chi2(7) References = 107.79 Prob > chi2 = 0.140 = Prob > chi2 = 0 893 2 91 Arellano, M. and Bond, S. (1991) "Some tests of specification for panel data: Monte Carlo evidence and an application to employment equations", The Review of Economic Studies, 58(2), 227-297, doi: 10.2307/2297968 https://www.stata.com/features/overview/dynamic-panel-data/ https://deepnote.com/@carlos-mendez/STATA-Dynamic-panel-data-xtabond2-jo5hm0DYQy-HAnZZbv_qjg 12/12