il sent you my data into your mail to try. thanks
-
Login or Register
- Log in with
xtseqreg lnexports l.lnexports lngdpi lngdpj lndistance neighbour homebias, /// gmm(l.lnexports, lag(1 2) collapse model(difference)) /// iv(l.lnexports, difference model(level))/// iv(lngdpi lngdpj lndistance neighbour homebias priceincreasei priceincreasej , difference model(level)) twostep vce(robust) estimate store gmm1 xtseqreg lnexports (l.lnexports lngdpi lngdpj lndistance neighbour homebias) lndistance neighbour homebias, /// vce(robust) first(gmm1, nocons) iv(lngdpi lngdpj inflationi inflationj)
xtset q1 time panel variable: q1 (unbalanced) time variable: time, 1 to 3, but with gaps delta: 1 unit
.xtabond2 lnlabprod_v3 capprod rawprod npprod dummy maxprod i.Year if (q13a ==1 & q11a == 0 & industry_same ==1), gmm > (lnlabprod_v3 capprod rawprod npprod dummy maxprod, lag(2 2) eq(level)) gmm (lnlabprod_v3 capprod rawprod npprod du > mmy maxprod, lag(2 2) eq(diff)) iv(i.Year i.q17a, eq(level)) iv(i.q17a, eq(diff)) robust twostep Favoring speed over space. To switch, type or click on mata: mata set matafavor space, 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: q1 Number of obs = 5612 Time variable : time Number of groups = 2982 Number of instruments = 44 Obs per group: min = 1 Wald chi2(8) = 16799.40 avg = 1.88 Prob > chi2 = 0.000 max = 3 ------------------------------------------------------------------------------ | Corrected lnlabprod_v3 | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- capprod | .1737902 .068021 2.55 0.011 .0404714 .307109 rawprod | .0695543 .0560353 1.24 0.215 -.0402729 .1793815 npprod | .2612364 .1383583 1.89 0.059 -.0099408 .5324136 dummy | 3.12106 1.320894 2.36 0.018 .5321542 5.709965 maxprod | .4540816 .180837 2.51 0.012 .0996476 .8085157 | Year | 2011 | 0 (empty) 2013 | -4.680937 .047691 -98.15 0.000 -4.774409 -4.587464 2015 | -4.759981 .054865 -86.76 0.000 -4.867515 -4.652448 | _cons | 10.94667 1.147688 9.54 0.000 8.697245 13.1961 ------------------------------------------------------------------------------ Instruments for first differences equation Standard D.(0b.q17a 1.q17a 2.q17a 3.q17a 4.q17a 5.q17a 6.q17a 7.q17a 8.q17a 9.q17a 10.q17a 11.q17a 12.q17a 13.q17a 14.q17a 15.q17a 16.q17a 17.q17a 18.q17a 19.q17a 20.q17a) GMM-type (missing=0, separate instruments for each period unless collapsed) L2.(lnlabprod_v3 capprod rawprod npprod dummy maxprod) Instruments for levels equation Standard 2011b.Year 2013.Year 2015.Year 0b.q17a 1.q17a 2.q17a 3.q17a 4.q17a 5.q17a 6.q17a 7.q17a 8.q17a 9.q17a 10.q17a 11.q17a 12.q17a 13.q17a 14.q17a 15.q17a 16.q17a 17.q17a 18.q17a 19.q17a 20.q17a _cons GMM-type (missing=0, separate instruments for each period unless collapsed) DL2.(lnlabprod_v3 capprod rawprod npprod dummy maxprod) ------------------------------------------------------------------------------ Arellano-Bond test for AR(1) in first differences: z = -5.90 Pr > z = 0.000 Arellano-Bond test for AR(2) in first differences: z = . Pr > z = . ------------------------------------------------------------------------------ Sargan test of overid. restrictions: chi2(35) = 75.26 Prob > chi2 = 0.000 (Not robust, but not weakened by many instruments.) Hansen test of overid. restrictions: chi2(35) = 38.54 Prob > chi2 = 0.312 (Robust, but weakened by many instruments.) Difference-in-Hansen tests of exogeneity of instrument subsets: gmm(lnlabprod_v3 capprod rawprod npprod dummy maxprod, eq(diff) lag(2 2)) Hansen test excluding group: chi2(29) = 30.33 Prob > chi2 = 0.397 Difference (null H = exogenous): chi2(6) = 8.21 Prob > chi2 = 0.223 iv(2011b.Year 2013.Year 2015.Year 0b.q17a 1.q17a 2.q17a 3.q17a 4.q17a 5.q17a 6.q17a 7.q17a 8.q17a 9.q17a 10.q17a 11. > q17a 12.q17a 13.q17a 14.q17a 15.q17a 16.q17a 17.q17a 18.q17a 19.q17a 20.q17a, eq(level)) Hansen test excluding group: chi2(16) = 10.85 Prob > chi2 = 0.818 Difference (null H = exogenous): chi2(19) = 27.69 Prob > chi2 = 0.090 iv(0b.q17a 1.q17a 2.q17a 3.q17a 4.q17a 5.q17a 6.q17a 7.q17a 8.q17a 9.q17a 10.q17a 11.q17a 12.q17a 13.q17a 14.q17a 15 > .q17a 16.q17a 17.q17a 18.q17a 19.q17a 20.q17a, eq(diff)) Hansen test excluding group: chi2(17) = 23.73 Prob > chi2 = 0.127 Difference (null H = exogenous): chi2(18) = 14.81 Prob > chi2 = 0.675
. xi: xtseqreg lnlabprod_v3 capprod rawprod npprod dummy maxprod if (q13a == 1 & q11a == 0 & industry_same ==1), gmmiv > (lnlabprod_v3 capprod rawprod npprod dummy maxprod, lag (2 2) model(level)) gmmiv (lnlabprod_v3 capprod rawprod npp > rod dummy maxprod, lag (2 2) model(diff)) iv(i.Year i.q17a, model(level)) iv(i.q17a, model(diff)) teffects vce(robus > t) twostep i.Year _IYear_2011-2015 (naturally coded; _IYear_2011 omitted) i.q17a _Iq17a_0-20 (naturally coded; _Iq17a_0 omitted) Group variable: q1 Number of obs = 5612 Time variable: time Number of groups = 2982 Obs per group: min = 1 avg = 1.881958 max = 3 Number of instruments = 50 (Std. Err. adjusted for clustering on q1) ------------------------------------------------------------------------------ | WC-Robust lnlabprod_v3 | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- capprod | .217903 .0325344 6.70 0.000 .1541367 .2816693 rawprod | .065866 .035395 1.86 0.063 -.003507 .135239 npprod | .4307212 .0701663 6.14 0.000 .2931978 .5682446 dummy | -.5710566 .2646682 -2.16 0.031 -1.089797 -.0523164 maxprod | -.0702817 .0373012 -1.88 0.060 -.1433908 .0028274 | time | 2 | -4.613127 .0382481 -120.61 0.000 -4.688092 -4.538162 3 | -4.65214 .036684 -126.82 0.000 -4.72404 -4.580241 | _cons | 13.80343 .5484781 25.17 0.000 12.72843 14.87843 ------------------------------------------------------------------------------
gmmiv(..., difference lag (2 2) model(level)) iv(..., difference model(diff))
Comment