This is my test post
Would it work?
With a code:
Would it work?
With a code:
reg y x1 x2
. xi: xtabond2 logsavings L.logsavings ni incunc incgrowth i.year if year<=2008, two r or gmm(L.logsavings incgrowth, lag(2 .) c) gmm(ni incunc, c) iv(i.year) i.year _Iyear_2003-2015 (naturally coded; _Iyear_2003 omitted) Favoring space over speed. To switch, type or click on mata: mata set matafavor speed, perm. Warning: Two-step estimated covariance matrix of moments is singular. Using a generalized inverse to calculate optimal weighting matrix for two-step estimation. Difference-in-Sargan/Hansen statistics may be negative. Dynamic panel-data estimation, two-step system GMM ------------------------------------------------------------------------------ Group variable: id Number of obs = 854 Time variable : year Number of groups = 567 Number of instruments = 29 Obs per group: min = 1 Wald chi2(16) = 63124.12 avg = 1.51 Prob > chi2 = 0.000 max = 2 ------------------------------------------------------------------------------ | Corrected logsavings | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- logsavings | L1. | .6081459 .1887841 3.22 0.001 .2381359 .9781559 | ni | -.0005938 .0844056 -0.01 0.994 -.1660258 .1648382 incunc | .0072606 .1314558 0.06 0.956 -.2503882 .2649093 incgrowth | .0362049 .2125225 0.17 0.865 -.3803315 .4527413 _Iyear_2004 | 0 (omitted) _Iyear_2005 | 0 (omitted) _Iyear_2006 | 0 (omitted) _Iyear_2007 | 3.461967 1.812407 1.91 0.056 -.090286 7.014221 _Iyear_2008 | 3.363448 1.81569 1.85 0.064 -.1952391 6.922134 _Iyear_2009 | 3.451725 1.819736 1.90 0.058 -.1148916 7.018342 _Iyear_2010 | 3.458569 2.003735 1.73 0.084 -.4686796 7.385817 _Iyear_2011 | 3.689415 1.896649 1.95 0.052 -.0279479 7.406778 _Iyear_2012 | 3.003755 1.866636 1.61 0.108 -.6547841 6.662294 _Iyear_2013 | 2.598397 1.812518 1.43 0.152 -.954074 6.150867 _Iyear_2014 | 4.221764 1.863327 2.27 0.023 .5697102 7.873818 _Iyear_2015 | 3.77235 1.568236 2.41 0.016 .6986646 6.846036 _cons | 0 (omitted) ------------------------------------------------------------------------------ Instruments for orthogonal deviations equation Standard FOD.(_Iyear_2004 _Iyear_2005 _Iyear_2006 _Iyear_2007 _Iyear_2008 _Iyear_2009 _Iyear_2010 _Iyear_2011 _Iyear_2012 _Iyear_2013 _Iyear_2014 _Iyear_2015) GMM-type (missing=0, separate instruments for each period unless collapsed) L(1/12).(ni incunc) collapsed L(2/12).(L.logsavings incgrowth) collapsed Instruments for levels equation Standard _Iyear_2004 _Iyear_2005 _Iyear_2006 _Iyear_2007 _Iyear_2008 _Iyear_2009 _Iyear_2010 _Iyear_2011 _Iyear_2012 _Iyear_2013 _Iyear_2014 _Iyear_2015 _cons GMM-type (missing=0, separate instruments for each period unless collapsed) D.(ni incunc) collapsed DL.(L.logsavings incgrowth) collapsed ------------------------------------------------------------------------------ Arellano-Bond test for AR(1) in first differences: z = -3.27 Pr > z = 0.001 Arellano-Bond test for AR(2) in first differences: z = 0.63 Pr > z = 0.528 ------------------------------------------------------------------------------ Sargan test of overid. restrictions: chi2(12) = 29.47 Prob > chi2 = 0.003 (Not robust, but not weakened by many instruments.) Hansen test of overid. restrictions: chi2(12) = 20.67 Prob > chi2 = 0.055 (Robust, but weakened by many instruments.) Difference-in-Hansen tests of exogeneity of instrument subsets: GMM instruments for levels Hansen test excluding group: chi2(8) = 14.50 Prob > chi2 = 0.070 Difference (null H = exogenous): chi2(4) = 6.17 Prob > chi2 = 0.187 gmm(L.logsavings incgrowth, collapse lag(2 .)) Hansen test excluding group: chi2(2) = 7.56 Prob > chi2 = 0.023 Difference (null H = exogenous): chi2(10) = 13.12 Prob > chi2 = 0.217 gmm(ni incunc, collapse lag(1 .)) Hansen test excluding group: chi2(2) = 12.08 Prob > chi2 = 0.002 Difference (null H = exogenous): chi2(10) = 8.60 Prob > chi2 = 0.571 iv(_Iyear_2004 _Iyear_2005 _Iyear_2006 _Iyear_2007 _Iyear_2008 _Iyear_2009 _Iyear_2010 _Iyear_2011 _Iyear_2012 _Iyear_2013 _Iyear_2014 _Iyear_2015) Hansen test excluding group: chi2(4) = 9.09 Prob > chi2 = 0.059 Difference (null H = exogenous): chi2(8) = 11.58 Prob > chi2 = 0.171
Comment