Announcement

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

  • Dynamic panel and GMM

    Hello and have a good time. I'm having trouble estimating my model based on the dynamic panel method in Stata 14.1. My data, which is shown in the attached table, includes 122 companies, 854 observations and 19 industries. I want to control the effects of year and industry in this research, but I don't know how to enter this in the command, and when I enter the effects of year and industry, the software gives you an error, which shows the command and the error. I have presented below. I would appreciate it if you could guide me how to enter the effects of year and industry in this command.
    Thanks & Regards

    Code:
     xtdpd etr L.etr ceonarcissismremuneration lev roa owncon duality fsize bsize ceoage bmeeting, dgmmiv(ceonarcissismremuneration lev roa owncon duality fsize bsize ceoage bmeetin i.industry i.years) dgmm(etr, lagrange(2 4)) lgmmiv(etr) twostep artests(2)
    error : "factor variables not allowed"

    statalist.org.xlsx

  • #2
    I am not familiar with this command, but because you haven’t got a response yet, I shall answer the obvious question. i. Is the prefix for
    factor variables. The error message indicates that this command doesn’t accept factor variables. I think that around Stata 12 or so is when Stata started to make this syntax universal.

    You should try using the xi: prefix for the whole command. It’s an older syntax, but it should enable factor variables, e.g.

    Code:
    xi: xtdpd etr L.etr …
    Be aware that it can be very hard to answer a question without sample data. You can use the dataex command for this. Type help dataex at the command line.

    When presenting code or results, please use the code delimiters format them. Use the # button on the formatting toolbar, between the " (double quote) and <> buttons.

    Comment


    • #3
      Hello and have a good time، thanks for your tips; I have sent all the variables that should be provided in the command along with the data in the attached file. Thank you for check.
      Please download the file below the error that I have written.

      Comment


      • #4
        Did you try what I suggested?
        Be aware that it can be very hard to answer a question without sample data. You can use the dataex command for this. Type help dataex at the command line.

        When presenting code or results, please use the code delimiters format them. Use the # button on the formatting toolbar, between the " (double quote) and <> buttons.

        Comment


        • #5
          Hello and have a good time, I executed the command you said:

          Code:
          xi: xtdpd etr L.etr ceonarcissismremuneration lev roa owncon duality fsize bsize ceoage bmeeting, dgmmiv(ceonarcissismremuneration lev roa owncon duality fsize bsize ceoage bmeetin i.industry i.years ) dgmm(etr, lagrange(2 4)) lgmmiv(etr) twostep artests(2)
          and it sent me the following result:
          Code:
          i.industry        _Iindustry_1-19     (naturally coded; _Iindustry_1 omitted)
          i.years           _Iyears_1-7         (naturally coded; _Iyears_1 omitted)
          note: _Iindustry_2 dropped from dgmmiv() because of collinearity
          note: _Iindustry_3 dropped from dgmmiv() because of collinearity
          note: _Iindustry_4 dropped from dgmmiv() because of collinearity
          note: _Iindustry_5 dropped from dgmmiv() because of collinearity
          note: _Iindustry_6 dropped from dgmmiv() because of collinearity
          note: _Iindustry_7 dropped from dgmmiv() because of collinearity
          note: _Iindustry_8 dropped from dgmmiv() because of collinearity
          note: _Iindustry_9 dropped from dgmmiv() because of collinearity
          note: _Iindustry_10 dropped from dgmmiv() because of collinearity
          note: _Iindustry_11 dropped from dgmmiv() because of collinearity
          note: _Iindustry_12 dropped from dgmmiv() because of collinearity
          note: _Iindustry_13 dropped from dgmmiv() because of collinearity
          note: _Iindustry_14 dropped from dgmmiv() because of collinearity
          note: _Iindustry_15 dropped from dgmmiv() because of collinearity
          note: _Iindustry_16 dropped from dgmmiv() because of collinearity
          note: _Iindustry_17 dropped from dgmmiv() because of collinearity
          note: _Iindustry_18 dropped from dgmmiv() because of collinearity
          note: _Iindustry_19 dropped from dgmmiv() because of collinearity
          
          Dynamic panel-data estimation                   Number of obs     =        732
          Group variable: firms                           Number of groups  =        122
          Time variable: years
                                                          Obs per group:
                                                                        min =          6
                                                                        avg =          6
                                                                        max =          6
          
          Number of instruments =    155                  Wald chi2(10)     =   65917.34
                                                          Prob > chi2       =     0.0000
          Two-step results
          -------------------------------------------------------------------------------------------
                                etr |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
          --------------------------+----------------------------------------------------------------
                                etr |
                                L1. |   .2748354   .0053425    51.44   0.000     .2643644    .2853064
                                    |
          ceonarcissismremuneration |  -.4487585   .0258168   -17.38   0.000    -.4993586   -.3981584
                                lev |  -.0612323    .006441    -9.51   0.000    -.0738566   -.0486081
                                roa |   .0376469   .0060959     6.18   0.000     .0256992    .0495946
                             owncon |  -.0078717    .004305    -1.83   0.067    -.0163092    .0005659
                            duality |    .010431   .0020349     5.13   0.000     .0064426    .0144195
                              fsize |   .0031327   .0003059    10.24   0.000     .0025332    .0037323
                              bsize |  -.4470682   .0718298    -6.22   0.000    -.5878521   -.3062844
                             ceoage |   .0951618    .003309    28.76   0.000     .0886763    .1016473
                           bmeeting |  -.0003575   .0001001    -3.57   0.000    -.0005538   -.0001613
                              _cons |   .0206086   .0563166     0.37   0.714    -.0897699    .1309871
          -------------------------------------------------------------------------------------------
          Warning: gmm two-step standard errors are biased; robust standard 
                   errors are recommended.
          Instruments for differenced equation
                  GMM-type: L(2/.).ceonarcissismremuneration L(2/.).lev L(2/.).roa L(2/.).owncon
                            L(2/.).duality L(2/.).fsize L(2/.).bsize L(2/.).ceoage L(2/.).bmeeting
                            L(2/.)._Iyears_2 L(2/.)._Iyears_3 L(2/.)._Iyears_4 L(2/.)._Iyears_5
                            L(2/.)._Iyears_6 L(2/.)._Iyears_7 L(2/4).etr
          Instruments for level equation
                  GMM-type: LD.etr
                  Standard: _cons

          Comment


          • #6
            Of course, apart from this, the following code :
            Code:
            xi: xtdpd etr L.etr ceonarcissismremuneration lev roa owncon duality fsize bsize ceoage bmeeting i.industry i.years , dgmmiv(ceonarcissismremuneration lev roa owncon duality fsize bsize ceoage bmeetin i.industry i.years) dgmm(etr, lagrange(2 4)) lgmmiv(etr) twostep artests(2)
            and results can also be seen:
            Code:
            i.industry        _Iindustry_1-19     (naturally coded; _Iindustry_1 omitted)
            i.years           _Iyears_1-7         (naturally coded; _Iyears_1 omitted)
            note: _Iindustry_2 dropped from dgmmiv() because of collinearity
            note: _Iindustry_3 dropped from dgmmiv() because of collinearity
            note: _Iindustry_4 dropped from dgmmiv() because of collinearity
            note: _Iindustry_5 dropped from dgmmiv() because of collinearity
            note: _Iindustry_6 dropped from dgmmiv() because of collinearity
            note: _Iindustry_7 dropped from dgmmiv() because of collinearity
            note: _Iindustry_8 dropped from dgmmiv() because of collinearity
            note: _Iindustry_9 dropped from dgmmiv() because of collinearity
            note: _Iindustry_10 dropped from dgmmiv() because of collinearity
            note: _Iindustry_11 dropped from dgmmiv() because of collinearity
            note: _Iindustry_12 dropped from dgmmiv() because of collinearity
            note: _Iindustry_13 dropped from dgmmiv() because of collinearity
            note: _Iindustry_14 dropped from dgmmiv() because of collinearity
            note: _Iindustry_15 dropped from dgmmiv() because of collinearity
            note: _Iindustry_16 dropped from dgmmiv() because of collinearity
            note: _Iindustry_17 dropped from dgmmiv() because of collinearity
            note: _Iindustry_18 dropped from dgmmiv() because of collinearity
            note: _Iindustry_19 dropped from dgmmiv() because of collinearity
            note: _Iyears_5 dropped because of collinearity
            note: D._Iindustry_2 dropped because of collinearity
            note: D._Iindustry_3 dropped because of collinearity
            note: D._Iindustry_4 dropped because of collinearity
            note: D._Iindustry_5 dropped because of collinearity
            note: D._Iindustry_6 dropped because of collinearity
            note: D._Iindustry_7 dropped because of collinearity
            note: D._Iindustry_8 dropped because of collinearity
            note: D._Iindustry_9 dropped because of collinearity
            note: D._Iindustry_10 dropped because of collinearity
            note: D._Iindustry_11 dropped because of collinearity
            note: D._Iindustry_12 dropped because of collinearity
            note: D._Iindustry_13 dropped because of collinearity
            note: D._Iindustry_14 dropped because of collinearity
            note: D._Iindustry_15 dropped because of collinearity
            note: D._Iindustry_16 dropped because of collinearity
            note: D._Iindustry_17 dropped because of collinearity
            note: D._Iindustry_18 dropped because of collinearity
            note: D._Iindustry_19 dropped because of collinearity
            note: D._Iyears_2 dropped because of collinearity
            
            Dynamic panel-data estimation                   Number of obs     =        732
            Group variable: firms                           Number of groups  =        122
            Time variable: years
                                                            Obs per group:
                                                                          min =          6
                                                                          avg =          6
                                                                          max =          6
            
            Number of instruments =    155                  Wald chi2(14)     =  100003.31
                                                            Prob > chi2       =     0.0000
            Two-step results
            -------------------------------------------------------------------------------------------
                                  etr |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
            --------------------------+----------------------------------------------------------------
                                  etr |
                                  L1. |   .2828854   .0068986    41.01   0.000     .2693645    .2964064
                                      |
            ceonarcissismremuneration |  -.4841562    .033338   -14.52   0.000    -.5494974    -.418815
                                  lev |   -.066055   .0072698    -9.09   0.000    -.0803035   -.0518066
                                  roa |    .075123   .0129481     5.80   0.000     .0497451    .1005009
                               owncon |   -.033168   .0078185    -4.24   0.000    -.0484919   -.0178441
                              duality |   .0083651   .0029752     2.81   0.005     .0025339    .0141964
                                fsize |   .0017972    .000487     3.69   0.000     .0008427    .0027517
                                bsize |   -.530725   .1226756    -4.33   0.000    -.7711646   -.2902853
                               ceoage |    .057833   .0078641     7.35   0.000     .0424197    .0732463
                             bmeeting |   .0000201   .0001032     0.19   0.845    -.0001821    .0002224
                            _Iyears_3 |   .0086709    .001253     6.92   0.000     .0062151    .0111267
                            _Iyears_4 |   -.007317   .0012709    -5.76   0.000    -.0098078   -.0048261
                            _Iyears_6 |  -.0037994   .0012199    -3.11   0.002    -.0061903   -.0014085
                            _Iyears_7 |  -.0188647   .0016794   -11.23   0.000    -.0221562   -.0155732
                                _cons |    .246956   .1120843     2.20   0.028     .0272749    .4666372
            -------------------------------------------------------------------------------------------
            Warning: gmm two-step standard errors are biased; robust standard 
                     errors are recommended.
            Instruments for differenced equation
                    GMM-type: L(2/.).ceonarcissismremuneration L(2/.).lev L(2/.).roa L(2/.).owncon
                              L(2/.).duality L(2/.).fsize L(2/.).bsize L(2/.).ceoage L(2/.).bmeeting
                              L(2/.)._Iyears_2 L(2/.)._Iyears_3 L(2/.)._Iyears_4 L(2/.)._Iyears_5
                              L(2/.)._Iyears_6 L(2/.)._Iyears_7 L(2/4).etr
            Instruments for level equation
                    GMM-type: LD.etr
                    Standard: _cons
            
            .

            Comment

            Working...
            X