Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Hello Dr. Kripfganz,
    I really appreciate all your work.

    I am currently having trouble with my dynamic model. N = 15. T = 64.
    The empiric evidence in my paper offers a variety of dynamic panels being made and because there is endogeneity I decided to give it a try to your work in order to achieve the best results.

    in xtabond2 I had the best model by making all my variables strictly exogenous and only having the lagged depedent variable in the gmm side. But that is not what I intended.

    For long panels, which dynamic panel model could I use as an alternative? Or should I just stay with a xtreg fe despite endogeneity being present?

    xtabond2 ROA L.ROA creditgrowth Liquidity Provsdefault RatioCapGlobal D.vix Buffer LCR NSFR RR Tier1, gmm(L.ROA. collapse) iv((creditgrowth Liquidity Provsdefault RatioCapGlobal D.vix Buffer LCR NSFR RR Tier1)) robust orthogonal pca

    also how can i run this xtabond2 model in xtdpdgmm.

    Again i really appreciate all your work, thank you in advance.

    Comment


    • The GMM estimators implemented in xtdpdgmm (or xtabond2) are intended for setting with large N relative to T. Your data set does not really fit into that category. It neither fits into the large-N, large-T world. With small N, you cannot expect to reliably estimate the optimal weighting matrix. Thus, any two-step GMM estimator (that allows for arbitrary correlation within groups over time) is eliminated from the discussion. Similarly, it is not recommended to compute robust standard errors clustered at the group level. You could still use a conventional IV/2SLS estimator with ivregress or xtivreg.
      https://twitter.com/Kripfganz

      Comment


      • Hello Dr. Kripfganz, how can i get standard regression coefficents from your xtdpdgmm? As far as I know๏ผŒyour xtdpdgmm presents nonstandard coefficents.

        Comment


        • xtdpdgmm does not provide standardized regression coefficients. You would need to standardize all of your variables manually before running the regression.

          I can hardly imagine a situation in the context of dynamic panel models where this is meaningful. There is a lot of things that can go wrong and the interpretation of the results becomes anything than straightforward.
          https://twitter.com/Kripfganz

          Comment


          • I have two equations of dynamic panel data. One is y=b0+b1x1+b2x2+b3x3, and the other is y=A0+A1x1+A2x4+A3x5. I get the coefficients through the xtdpdgmm. Now, I want to compare b2 and A3 to know which has a larger effect on y. Would you give me some advice?

            Comment


            • Assuming that the coefficients are at a comparable scale, you could probably use the suest command to combine the two regressions. Then you can test for equality of the coefficients with the test command. For this to work, you need to run the two xtdpdgmm regressions with the auxiliary option, store the results with estimates store, and then call suest with the two stored estimation results.
              https://twitter.com/Kripfganz

              Comment


              • what's wrong with this?
                . xtdpdgmm L(0/1).slackz munificence complex dynamics area L(0/1).logasset L(0/1).roa agef edu L(0/1).tenure sex agee L(0/1).deputyd ,
                > model(fod) collapse gmm(slackz, lag(1 3)) gmm(munificence, lag(0 1)) gmm(complex, lag(0 1)) gmm(dynamics, lag(0 1)) gmm(area, lag(0 1) ) gmm
                > (logasset, lag(1 2)) gmm(roa, lag(1 2)) gmm(agef, lag(0 2)) gmm(edu, lag(0 1)) gmm(sex, lag(0 0) ) gmm(tenure, lag(0 3)) gmm(agee, lag(0 0)
                > ) gmm(deputyd, lag(1 2)) gmm(area, lag(0 0) model(md)) gmm( sex, lag(0 0) model(md)) gmm(agee, lag(0 0) model(md)) gmm(slackz, lag (1 1) diff
                > model(level)) gmm(munificence, lag(0 0) diff model(level)) gmm(complex, lag(0 0) diff model(level)) gmm(dynamics, lag(0 0) diff model(level
                > )) gmm(area, lag(0 0) model(level)) gmm( logasset, lag(1 1) diff model(level)) gmm( roa, lag(1 1) diff model(level)) gmm( agef, lag(0 0) diff
                > model(level)) gmm(edu, lag(0 0) diff model(level)) gmm(tenure, lag(0 0) diff model(level)) gmm(sex, lag(0 0) model(level)) gmm(agee, lag(0
                > 0) model(level)) gmm(deputyd, lag(1 1) diff model(level)) teffects two vce(r) overid auxiliary

                Generalized method of moments estimation

                Fitting full model:
                Step 1 f(b) = .21961324
                Step 2 f(b) = .04905417

                Fitting reduced model 1:
                Step 1 f(b) = .04378765

                Fitting reduced model 2:
                Step 1 f(b) = .04737229

                Fitting reduced model 3:
                Step 1 f(b) = .04174331

                Fitting reduced model 4:
                Step 1 f(b) = .04725824

                Fitting reduced model 5:
                Step 1 f(b) = .04894016

                Fitting reduced model 6:
                Step 1 f(b) = .04896063

                Fitting reduced model 7:
                Step 1 f(b) = .04693545

                Fitting reduced model 8:
                Step 1 f(b) = .04642574

                Fitting reduced model 9:
                Step 1 f(b) = .04471508

                Fitting reduced model 10:
                Step 1 f(b) = .04683552

                Fitting reduced model 11:
                Step 1 f(b) = .04554952

                Fitting reduced model 12:
                Step 1 f(b) = .04759769

                Fitting reduced model 13:
                Step 1 f(b) = .04775263

                Fitting reduced model 15:
                Step 1 f(b) = .04901515

                Fitting reduced model 16:
                Step 1 f(b) = .04815328

                Fitting reduced model 17:
                Step 1 f(b) = .04883611

                Fitting reduced model 18:
                Step 1 f(b) = .04345726

                Fitting reduced model 19:
                Step 1 f(b) = .04868351

                Fitting reduced model 20:
                Step 1 f(b) = .04871824

                Fitting reduced model 21:
                Step 1 f(b) = .04833418

                Fitting reduced model 22:
                Step 1 f(b) = .04895118

                Fitting reduced model 23:
                Step 1 f(b) = .0457555

                Fitting reduced model 24:
                Step 1 f(b) = .04576668

                Fitting reduced model 25:
                Step 1 f(b) = .04623669

                Fitting reduced model 26:
                Step 1 f(b) = .04865459

                Fitting reduced model 27:
                Step 1 f(b) = .04898542

                Fitting reduced model 28:
                Step 1 f(b) = .04787909

                Fitting reduced model 29:
                Step 1 f(b) = .04526437

                Fitting reduced model 30:
                Step 1 f(b) = .03214391

                Fitting no-mdev model:
                Step 1 f(b) = .04428694

                Fitting no-level model:
                Step 1 f(b) = .0033406

                Group variable: code Number of obs = 1142
                Time variable: year Number of groups = 257

                Moment conditions: linear = 49 Obs per group: min = 1
                nonlinear = 0 avg = 4.44358
                total = 49 max = 8

                ------------------------------------------------------------------------------
                slackz | Coef. Std. Err. z P>|z| [95% Conf. Interval]
                -------------+----------------------------------------------------------------
                /L.slackz | .712158 .1045299 6.81 0.000 .5072831 .9170328
                /munificence | -.3096574 .8710623 -0.36 0.722 -2.016908 1.397593
                /complex | .0136566 .0495609 0.28 0.783 -.0834811 .1107942
                /dynamics | -5.158069 54.91996 -0.09 0.925 -112.7992 102.4831
                /area | -.3154719 .1799491 -1.75 0.080 -.6681656 .0372218
                /logasset | 7.155498 2.668933 2.68 0.007 1.924485 12.38651
                /L.logasset | -8.373998 2.782808 -3.01 0.003 -13.8282 -2.919795
                /roa | -16.33088 8.771663 -1.86 0.063 -33.52302 .8612657
                /L.roa | 8.227022 5.280975 1.56 0.119 -2.123498 18.57754
                /agef | .1133634 .0963832 1.18 0.240 -.0755442 .3022709
                /edu | -.501057 .3031709 -1.65 0.098 -1.095261 .0931471
                /tenure | .0153419 .0475422 0.32 0.747 -.077839 .1085228
                /L.tenure | .0190134 .0677046 0.28 0.779 -.1136852 .1517119
                /sex | .7554232 .468428 1.61 0.107 -.1626789 1.673525
                /agee | -.0292742 .0188381 -1.55 0.120 -.0661961 .0076477
                /deputyd | 1.565541 1.06155 1.47 0.140 -.515058 3.646141
                /L.deputyd | -1.890005 1.075679 -1.76 0.079 -3.998297 .2182872
                2005.year | .3553894 .2172804 1.64 0.102 -.0704723 .7812512
                2006.year | .304873 .2516098 1.21 0.226 -.1882731 .7980191
                2007.year | .2514045 .274264 0.92 0.359 -.2861431 .7889521
                2008.year | .6769215 .4010137 1.69 0.091 -.109051 1.462894
                2009.year | .747258 .3946966 1.89 0.058 -.0263332 1.520849
                2010.year | .9056145 .4358076 2.08 0.038 .0514473 1.759782
                2011.year | .7428411 .4927214 1.51 0.132 -.2228752 1.708557
                /_cons | 12.84346 5.229984 2.46 0.014 2.592877 23.09404
                ------------------------------------------------------------------------------
                Instruments corresponding to the linear moment conditions:
                1, model(fodev):
                L1.slackz L2.slackz L3.slackz
                2, model(fodev):
                munificence L1.munificence
                3, model(fodev):
                complex L1.complex
                4, model(fodev):
                dynamics L1.dynamics
                5, model(fodev):
                area
                6, model(fodev):
                L1.logasset L2.logasset
                7, model(fodev):
                L1.roa L2.roa
                8, model(fodev):
                agef L2.agef
                9, model(fodev):
                edu L1.edu
                10, model(fodev):
                sex
                11, model(fodev):
                tenure L1.tenure L2.tenure L3.tenure
                12, model(fodev):
                agee
                13, model(fodev):
                L1.deputyd L2.deputyd
                15, model(mdev):
                sex
                16, model(mdev):
                agee
                17, model(level):
                L1.D.slackz
                18, model(level):
                D.munificence
                19, model(level):
                D.complex
                20, model(level):
                D.dynamics
                21, model(level):
                area
                22, model(level):
                L1.D.logasset
                23, model(level):
                L1.D.roa
                24, model(level):
                D.agef
                25, model(level):
                D.edu
                26, model(level):
                D.tenure
                27, model(level):
                sex
                28, model(level):
                agee
                29, model(level):
                L1.D.deputyd
                30, model(level):
                2005bn.year 2006.year 2007.year 2008.year 2009.year 2010.year 2011.year
                31, model(level):
                _cons

                . est store d

                . xtdpdgmm L(0/1).slackz munificence complex dynamics area L(0/1).logasset L(0/1).roa agef edu tenure sex agee L(0/1).officiald , model
                > (fod) collapse gmm(slackz, lag(1 3)) gmm(munificence, lag(0 2)) gmm(complex, lag(0 2)) gmm(dynamics, lag(0 2)) gmm(area, lag(0 2)) gmm(logas
                > set, lag(1 3)) gmm(roa, lag(1 3)) gmm(agef, lag(0 2)) gmm(edu, lag(0 1)) gmm( sex, lag(0 2) ) gmm(tenure, lag(0 2)) gmm(agee, lag(0 2)) gmm
                > (officiald, lag(1 3)) gmm(area, lag(0 0) model(md)) gmm( sex, lag(0 0) model(md)) gmm(agee, lag(0 0) model(md)) gmm(slackz, lag(1 1) diff mo
                > del(level)) gmm(munificence, lag(0 0) diff model(level)) gmm(complex, lag(0 0) diff model(level)) gmm(dynamics, lag(0 0) diff model(level))
                > gmm(area, lag(0 0) model(level)) gmm( logasset, lag(1 1) diff model(level)) gmm( roa, lag(1 1) diff model(level)) gmm( agef, lag(0 0) diff mo
                > del(level)) gmm(edu, lag(0 0) diff model(level)) gmm(tenure, lag(0 0) diff model(level)) gmm(sex, lag(0 0) model(level)) gmm(agee, lag(0 0)
                > model(level)) gmm(officiald, lag(1 1) diff model(level)) teffects two vce(r) overid auxiliary

                Generalized method of moments estimation

                Fitting full model:
                Step 1 f(b) = .21879516
                Step 2 f(b) = .0895368

                Fitting reduced model 1:
                Step 1 f(b) = .07797342

                Fitting reduced model 2:
                Step 1 f(b) = .07882463

                Fitting reduced model 3:
                Step 1 f(b) = .07606501

                Fitting reduced model 4:
                Step 1 f(b) = .07926185

                Fitting reduced model 5:
                Step 1 f(b) = .08893557

                Fitting reduced model 6:
                Step 1 f(b) = .08534523

                Fitting reduced model 7:
                Step 1 f(b) = .08495086

                Fitting reduced model 8:
                Step 1 f(b) = .08775046

                Fitting reduced model 9:
                Step 1 f(b) = .07315281

                Fitting reduced model 10:
                Step 1 f(b) = .07129769

                Fitting reduced model 11:
                Step 1 f(b) = .08573825

                Fitting reduced model 12:
                Step 1 f(b) = .07303121

                Fitting reduced model 13:
                Step 1 f(b) = .08466086

                Fitting reduced model 15:
                Step 1 f(b) = .08889474

                Fitting reduced model 16:
                Step 1 f(b) = .08735535

                Fitting reduced model 17:
                Step 1 f(b) = .08696995

                Fitting reduced model 18:
                Step 1 f(b) = .08947708

                Fitting reduced model 19:
                Step 1 f(b) = .08952212

                Fitting reduced model 20:
                Step 1 f(b) = .08911202

                Fitting reduced model 21:
                Step 1 f(b) = .08279975

                Fitting reduced model 22:
                Step 1 f(b) = .08536359

                Fitting reduced model 23:
                Step 1 f(b) = .08768312

                Fitting reduced model 24:
                Step 1 f(b) = .08707116

                Fitting reduced model 25:
                Step 1 f(b) = .08927467

                Fitting reduced model 26:
                Step 1 f(b) = .08936924

                Fitting reduced model 27:
                Step 1 f(b) = .08820959

                Fitting reduced model 28:
                Step 1 f(b) = .08916825

                Fitting reduced model 29:
                Step 1 f(b) = .08449728

                Fitting reduced model 30:
                Step 1 f(b) = .06366293

                Fitting no-mdev model:
                Step 1 f(b) = .08117433

                Fitting no-level model:
                Step 1 f(b) = .04141188

                Group variable: code Number of obs = 1142
                Time variable: year Number of groups = 257

                Moment conditions: linear = 59 Obs per group: min = 1
                nonlinear = 0 avg = 4.44358
                total = 59 max = 8

                ------------------------------------------------------------------------------
                slackz | Coef. Std. Err. z P>|z| [95% Conf. Interval]
                -------------+----------------------------------------------------------------
                /L.slackz | .705772 .1192805 5.92 0.000 .4719866 .9395575
                /munificence | -.4403346 .8550542 -0.51 0.607 -2.11621 1.235541
                /complex | -.0347037 .0459247 -0.76 0.450 -.1247144 .055307
                /dynamics | 59.96618 56.23615 1.07 0.286 -50.25464 170.187
                /area | .0132941 .1548448 0.09 0.932 -.2901961 .3167843
                /logasset | 4.962371 2.576222 1.93 0.054 -.086932 10.01167
                /L.logasset | -5.606148 2.867325 -1.96 0.051 -11.226 .0137069
                /roa | -17.11063 5.502293 -3.11 0.002 -27.89493 -6.326336
                /L.roa | 10.60277 3.994177 2.65 0.008 2.774331 18.43122
                /agef | .0437009 .1054893 0.41 0.679 -.1630544 .2504561
                /edu | .0413938 .2862075 0.14 0.885 -.5195625 .6023501
                /tenure | .0048285 .0490966 0.10 0.922 -.0913991 .101056
                /sex | .3432621 .6145907 0.56 0.576 -.8613135 1.547838
                /agee | .0068542 .0191801 0.36 0.721 -.0307382 .0444465
                /officiald | 1.023247 .5825883 1.76 0.079 -.1186047 2.165099
                /L.officiald | -1.720383 .6982176 -2.46 0.014 -3.088865 -.351902
                2005.year | .4571604 .2177951 2.10 0.036 .0302897 .884031
                2006.year | .3961391 .2675335 1.48 0.139 -.128217 .9204952
                2007.year | .5708944 .254941 2.24 0.025 .0712192 1.07057
                2008.year | .7871243 .4278661 1.84 0.066 -.0514777 1.625726
                2009.year | .8271088 .4124585 2.01 0.045 .018705 1.635513
                2010.year | 1.027484 .4636634 2.22 0.027 .1187209 1.936248
                2011.year | .7870365 .5163632 1.52 0.127 -.2250167 1.79909
                /_cons | 2.834887 5.29475 0.54 0.592 -7.542632 13.21241
                ------------------------------------------------------------------------------
                Instruments corresponding to the linear moment conditions:
                1, model(fodev):
                L1.slackz L2.slackz L3.slackz
                2, model(fodev):
                munificence L1.munificence L2.munificence
                3, model(fodev):
                complex L1.complex L2.complex
                4, model(fodev):
                dynamics L1.dynamics L2.dynamics
                5, model(fodev):
                area L2.area
                6, model(fodev):
                L1.logasset L2.logasset L3.logasset
                7, model(fodev):
                L1.roa L2.roa L3.roa
                8, model(fodev):
                agef L2.agef
                9, model(fodev):
                edu L1.edu
                10, model(fodev):
                sex L1.sex L2.sex
                11, model(fodev):
                tenure L1.tenure L2.tenure
                12, model(fodev):
                agee L1.agee L2.agee
                13, model(fodev):
                L1.officiald L2.officiald L3.officiald
                15, model(mdev):
                sex
                16, model(mdev):
                agee
                17, model(level):
                L1.D.slackz
                18, model(level):
                D.munificence
                19, model(level):
                D.complex
                20, model(level):
                D.dynamics
                21, model(level):
                area
                22, model(level):
                L1.D.logasset
                23, model(level):
                L1.D.roa
                24, model(level):
                D.agef
                25, model(level):
                D.edu
                26, model(level):
                D.tenure
                27, model(level):
                sex
                28, model(level):
                agee
                29, model(level):
                L1.D.officiald
                30, model(level):
                2005bn.year 2006.year 2007.year 2008.year 2009.year 2010.year 2011.year
                31, model(level):
                _cons

                . est store o

                . suest d o

                Simultaneous results for d, o

                Number of obs = 1,142

                -------------------------------------------------------------------------------
                | Robust
                | Coef. Std. Err. z P>|z| [95% Conf. Interval]
                --------------+----------------------------------------------------------------
                d_L,slackz |
                _cons | .712158 .1241785 5.73 0.000 .4687726 .9555434
                --------------+----------------------------------------------------------------
                d_munificence |
                _cons | -.3096574 1.348379 -0.23 0.818 -2.952431 2.333116
                --------------+----------------------------------------------------------------
                d_complex |
                _cons | .0136566 .0717027 0.19 0.849 -.1268782 .1541913
                --------------+----------------------------------------------------------------
                d_dynamics |
                _cons | -5.158069 74.80452 -0.07 0.945 -151.7722 141.4561
                --------------+----------------------------------------------------------------
                d_area |
                _cons | -.3154719 .2452943 -1.29 0.198 -.7962398 .165296
                --------------+----------------------------------------------------------------
                d_logasset |
                _cons | 7.155498 3.376785 2.12 0.034 .5371209 13.77387
                --------------+----------------------------------------------------------------
                d_L,logasset |
                _cons | -8.373998 3.463342 -2.42 0.016 -15.16202 -1.585972
                --------------+----------------------------------------------------------------
                d_roa |
                _cons | -16.33088 9.433864 -1.73 0.083 -34.82091 2.159156
                --------------+----------------------------------------------------------------
                d_L,roa |
                _cons | 8.227022 5.302617 1.55 0.121 -2.165917 18.61996
                --------------+----------------------------------------------------------------
                d_agef |
                _cons | .1133634 .1095392 1.03 0.301 -.1013295 .3280562
                --------------+----------------------------------------------------------------
                d_edu |
                _cons | -.501057 .3479369 -1.44 0.150 -1.183001 .1808867
                --------------+----------------------------------------------------------------
                d_tenure |
                _cons | .0153419 .0756236 0.20 0.839 -.1328777 .1635615
                --------------+----------------------------------------------------------------
                d_L,tenure |
                _cons | .0190134 .0887909 0.21 0.830 -.1550136 .1930403
                --------------+----------------------------------------------------------------
                d_sex |
                _cons | .7554232 .561197 1.35 0.178 -.3445028 1.855349
                --------------+----------------------------------------------------------------
                d_agee |
                _cons | -.0292742 .0263493 -1.11 0.267 -.0809178 .0223694
                --------------+----------------------------------------------------------------
                d_deputyd |
                _cons | 1.565541 2.45065 0.64 0.523 -3.237644 6.368727
                --------------+----------------------------------------------------------------
                d_L,deputyd |
                _cons | -1.890005 2.42004 -0.78 0.435 -6.633196 2.853186
                --------------+----------------------------------------------------------------
                d_2005,year |
                _cons | .3553894 .35439 1.00 0.316 -.3392022 1.049981
                --------------+----------------------------------------------------------------
                d_2006,year |
                _cons | .304873 .3598552 0.85 0.397 -.4004301 1.010176
                --------------+----------------------------------------------------------------
                d_2007,year |
                _cons | .2514045 .4118691 0.61 0.542 -.555844 1.058653
                --------------+----------------------------------------------------------------
                d_2008,year |
                _cons | .6769215 .4867027 1.39 0.164 -.2769983 1.630841
                --------------+----------------------------------------------------------------
                d_2009,year |
                _cons | .747258 .4898263 1.53 0.127 -.212784 1.7073
                --------------+----------------------------------------------------------------
                d_2010,year |
                _cons | .9056145 .5814301 1.56 0.119 -.2339677 2.045197
                --------------+----------------------------------------------------------------
                d_2011,year |
                _cons | .7428411 .5726409 1.30 0.195 -.3795145 1.865197
                --------------+----------------------------------------------------------------
                d__cons |
                _cons | 12.84346 7.006265 1.83 0.067 -.8885694 26.57548
                --------------+----------------------------------------------------------------
                o_L,slackz |
                _cons | .705772 .1116469 6.32 0.000 .4869481 .9245959
                --------------+----------------------------------------------------------------
                o_munificence |
                _cons | -.4403346 1.11817 -0.39 0.694 -2.631908 1.751239
                --------------+----------------------------------------------------------------
                o_complex |
                _cons | -.0347037 .058277 -0.60 0.552 -.1489245 .0795171
                --------------+----------------------------------------------------------------
                o_dynamics |
                _cons | 59.96618 57.7011 1.04 0.299 -53.1259 173.0583
                --------------+----------------------------------------------------------------
                o_area |
                _cons | .0132941 .1780203 0.07 0.940 -.3356192 .3622074
                --------------+----------------------------------------------------------------
                o_logasset |
                _cons | 4.962371 3.533726 1.40 0.160 -1.963606 11.88835
                --------------+----------------------------------------------------------------
                o_L,logasset |
                _cons | -5.606148 3.543803 -1.58 0.114 -12.55187 1.339579
                --------------+----------------------------------------------------------------
                o_roa |
                _cons | -17.11063 6.531034 -2.62 0.009 -29.91122 -4.31004
                --------------+----------------------------------------------------------------
                o_L,roa |
                _cons | 10.60277 4.084201 2.60 0.009 2.597888 18.60766
                --------------+----------------------------------------------------------------
                o_agef |
                _cons | .0437009 .1018201 0.43 0.668 -.1558629 .2432646
                --------------+----------------------------------------------------------------
                o_edu |
                _cons | .0413938 .3063771 0.14 0.893 -.5590943 .6418819
                --------------+----------------------------------------------------------------
                o_tenure |
                _cons | .0048285 .0539864 0.09 0.929 -.100983 .1106399
                --------------+----------------------------------------------------------------
                o_sex |
                _cons | .3432621 .8802884 0.39 0.697 -1.382072 2.068596
                --------------+----------------------------------------------------------------
                o_agee |
                _cons | .0068542 .0200002 0.34 0.732 -.0323456 .0460539
                --------------+----------------------------------------------------------------
                o_officiald |
                _cons | 1.023247 1.430928 0.72 0.475 -1.78132 3.827815
                --------------+----------------------------------------------------------------
                o_L,officiald |
                _cons | -1.720383 1.335567 -1.29 0.198 -4.338046 .8972792
                --------------+----------------------------------------------------------------
                o_2005,year |
                _cons | .4571604 .33954 1.35 0.178 -.2083257 1.122646
                --------------+----------------------------------------------------------------
                o_2006,year |
                _cons | .3961391 .3428259 1.16 0.248 -.2757874 1.068066
                --------------+----------------------------------------------------------------
                o_2007,year |
                _cons | .5708944 .3403995 1.68 0.094 -.0962763 1.238065
                --------------+----------------------------------------------------------------
                o_2008,year |
                _cons | .7871243 .4595304 1.71 0.087 -.1135387 1.687787
                --------------+----------------------------------------------------------------
                o_2009,year |
                _cons | .8271088 .476522 1.74 0.083 -.1068572 1.761075
                --------------+----------------------------------------------------------------
                o_2010,year |
                _cons | 1.027484 .5088123 2.02 0.043 .0302307 2.024738
                --------------+----------------------------------------------------------------
                o_2011,year |
                _cons | .7870365 .5419654 1.45 0.146 -.2751962 1.849269
                --------------+----------------------------------------------------------------
                o__cons |
                _cons | 2.834887 6.433989 0.44 0.659 -9.7755 15.44527
                -------------------------------------------------------------------------------

                . test [d_L,deputyd=o_L,officiald]
                last test not found
                r(302);

                . test d_L,deputyd=o_L,officiald
                invalid 'officiald'
                r(198);

                . test d_L.deputyd=o_L.officiald
                d_L: operator invalid
                r(198);

                . test [d_L.deputyd=o_L.officiald]
                equation d_L not found
                r(303);

                .

                Comment


                • Try
                  Code:
                  test _b[d_L,deputyd:_cons] = _b[o_L,officiald:_cons]
                  https://twitter.com/Kripfganz

                  Comment


                  • That's great. Thank you.

                    Comment


                    • Dear Sebastian,

                      I need your help regarding the model. ROA,๐‘–๐‘ก= ๐›ผROA๐‘– + ๐œ‘ROA๐‘–๐‘กโˆ’1 + โˆ‘ ฮดROA_sic_t SIC_Year sic_t+ ฮตROA,๐‘–๐‘ก;

                      where:
                      1)SIC_Year sic_t is the year-specific industry fixed effect.
                      2)Coefficient ๐›ผROA๐‘– is the firm-specific constant
                      3)๐œ‘s are the first-order autoregressive coefficient estimates.

                      I have used XTABOND command as follows.

                      . xtabond ROA year2011-year2019 fyear

                      fyear is time variable in my dataset. It is unbalaced panel data. Gvkey are firm name codes, SIC variable is industry level codes.

                      Click image for larger version

Name:	s.png
Views:	3
Size:	24.8 KB
ID:	1586636


                      In the studies it is written: "We use the deviations of the actual values from the forecasts (i.e., forecast errors) as the measure of abnormal profitability (aROAit) to find firms with greater-than-normal profitability (aROAit>0)"

                      How would you find forecast and their deviations from actual values? I tried to do it with the forecasting of Stata but as it is unbalanced panel data I receive error each time. With the predict comman I get some big numbers each time, so I am wondering if my Xtabond command was correct and if it was same as in study(not sure if I correctly do it with SIC codes)?

                      How would you do it with forecast?

                      Best Regards,
                      Nadir

                      Comment


                      • There is a new update to version 2.3.2 now available on my personal website:
                        Code:
                        net install xtdpdgmm, from(http://www.kripfganz.de/stata/) replace
                        This update fixes an annoying bug that produced an error message when the command was run with the nl(noserial) option on a data set in which the panel identifier was named different than "id". (Apparently, all of my test data sets had a panel identifier variable named "id" which is why I never noticed this bug.) Many thanks to Luca Uberti for flagging this problem.

                        I used this opportunity to add another option to the estat mmsc postestimation command. The penalty term for the BIC and HQIC versions of the model and moment selection criteria depend on a measure of the sample size, ln(N) and ln(ln(N)), respectively. So far, for N the command always used the number of groups (panels). Now, there is a new option that allows to choose N either as the number of groups, n(groups), the number of clusters, n(cluster), or the total number of observations, n(obs).
                        If the xtdpdgmm command was run with the vce(cluster) option, the default for estat mmsc is now to use the number of clusters for N. Otherwise, it remains the number of groups. (There is actually a related issue with the conventional BIC after other estimation commands; see help bic note.)
                        https://twitter.com/Kripfganz

                        Comment


                        • Dear sebastian Kripfganz,I have tried to update xtdpdgmm from http://www.kripfganz.de/stata/.But I failed to update it.I have sent en email to you.Can you send me the updated adofile and helpfile ?Thanks in advance.



                          Best.
                          Raymond
                          Best regards.

                          Raymond Zhang
                          Stata 17.0,MP

                          Comment


                          • If you are located in China, there might be firewall restrictions that prevent you from installing Stata packages directly from my website. As the new version is not yet available on SSC, I have just sent you the source files for a local installation by e-mail.
                            https://twitter.com/Kripfganz

                            Comment


                            • @Sebastian Kripfganz I have recieved your email.Thank you very much.


                              Best Regards.
                              Raymond
                              Best regards.

                              Raymond Zhang
                              Stata 17.0,MP

                              Comment


                              • Dear Sebastian Kripfganz

                                My name is Dinh, from Vietnam. Currently, I am doing a research related to the health effect of housing. My data is panel data with 5 waves and round 1900 observations of each wave.
                                The estimated model is constructed as follow:
                                Hi,t= b0*Hi,t-1+b0*Housingi,t+Xi,t*alpha+error term.
                                I also read your interesting paper (https://onlinelibrary-wiley-com.ezpr....1002/jae.2681). But I am still stuck with my data. Could I have some questions:
                                1. As you mentioned in your paper, T > =2, so is it ok to estimate the model by your command with T=3? I know that we need at least 5 years for xtabond2 if running two-step GMM.
                                2. In your paper, the second assumption is that X (like my function include vector X and Housing) is strictly exogenous. However, I am arguing that Housing condition is endogenous. If using xtabond2, I can add it into (gmm(H Housing, lag (2 3) collapse)). So I cannot use your command if I hold my assumption of endogenous housing?
                                3. Your command is only to use for linear dependent variable? No for binary variable? I also think xtabond2 is only for linear dependent variable. But I did read a paper using xtabond2 with binary dependent.

                                Thank you in advance, and I hope you all the best!
                                Dinh

                                Comment

                                Working...
                                X