Announcement

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

  • Fixed effect model omits my dummy variable.how do i fix it?

    I have a panel data with variables ROE as y variable ,Debtratio as dependent variable,firm size and firm growth as control variables and a dummy variable(technology).My aim is to measure the effect of debt ratio on ROE controlling for firm size and firm growth for when the company is a high tech==1 and low tech==0.Running the fixed effect model omits the dummy variable technology because obviously it is time invariant over the course of 10 years for an entity.i would also measure the interaction between Debt ratio and technology on ROE.i have ran fe,re and be and all gave me different values for all measurements.My request is what is the correct thing to do in this situation?

  • #2
    Shadrach:
    welcome to this forum.
    - regardless -fe- specification (that actually wipes out time -invariant predictors), Stata always omits one level of a given categorical variables (that you can set/change via -fvvarlist- command) to protect you against the so-called dummy trap (https://en.wikipedia.org/wiki/Dummy_...(statistics));
    - the best approach is to compare -fe- vs -re- specification via -hausman- model, instead than running -fe- and -re- specification searching for "the best" model (whatever this may mean).
    As an aside, please read the FAQ on how to share what you typed and what Stata gave you back and/or post an excerpt/example of your data via -dataex-. Thanks.
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      xtreg ROE c.DEBTRATIO##i.TECHLEV FIRMSIZE YOYASSETGROWTH,fe

      i already ran the hausman test and it showed fixed effect as the appropriate model even though the result for the fixed effect omitted the dummy variable.

      Comment


      • #4
        Code:
        * Example generated by -dataex-. To install: ssc install dataex
        clear
        input double(ROE DEBTRATIO FIRMSIZE YOYASSETGROWTH) float TECHLEV
         -12.045 42.4184  18.95026488512146 -15.0082 1
        -16.6644 49.1793 18.938346432486906  -1.1848 1
          3.9554 61.0368 19.255813734390493  37.3644 1
          17.069 29.8574  19.03163819033435 -20.0825 1
          4.0436 29.4935 19.095191436359503   6.5616 1
          2.6249 23.2528 19.077752816822542  -1.7287 1
         -1.3431 40.3239  19.30507651488318  25.5236 1
          4.8519 53.4754 19.639392142978075  39.6984 1
          1.5416 59.0402 19.803653362037466  17.8522 1
         38.8437 20.3456  19.22588925800566 -43.8848 1
          2.3245   7.429 18.186064445005186   2.9274 1
          1.0231  7.4786  18.18387457151789   -.2187 1
           .4284  7.6589   18.1901093920773    .6254 1
          1.2035  4.5319 18.171350044322935  -1.8584 1
          -.7277  4.3705  18.16238395823611   -.8926 1
         12.7314 11.8931  20.23522796760672   4.5203 1
          4.1213 10.0605 20.255860350706175   2.0847 1
          1.3688 11.2276  20.32878227602286   7.5647 1
         10.6726 18.9809   22.0012382724594  432.523 1
         11.5699 24.6583 22.826504056551624 128.2487 1
         12.9975 49.3006  22.85778510919945  24.7429 0
          9.8246 53.6142 23.062767169255494  22.7503 0
         16.8749 48.5852 23.113252648961723   5.1782 0
         24.8745 45.7945 23.246561056236157  14.2602 0
         17.7231 52.1906  23.44990165561166   22.549 0
          4.0029 49.3004 23.386026422025076  -6.1878 0
         20.6663 44.2868  23.43656004928872   5.1832 0
         10.6566 42.7561 23.439073094475816    .2516 0
          7.7021  49.144 23.463434678259592   2.4661 0
         10.1707 52.1026 23.565078315767128    9.617 0
          5.9938 64.3463 23.084115091930528   5.7929 0
          7.2909 61.7391  23.07941283343942   -.4691 0
          3.9358 69.7358 23.330986042774065  28.6047 0
          2.1323 74.3477 23.524617873084065  21.3649 0
           .6237 74.9408  23.55096123884677   2.6693 0
          1.1381 74.3593 23.530432129692436   -2.032 0
          1.1118 72.8132 23.479679719889933  -4.9486 0
           1.286 74.3884  23.54341535350496   6.5755 0
        -36.3355 78.4184 23.380048536190195  -15.072 0
          3.3476 80.7546 23.570679036970624  21.0012 0
        end

        Comment


        • #5
          Shadrach:
          thanks for providing further details.
          Please note that -panelid- and -timevar- are missing in your data excerpt. Thanks.
          Kind regards,
          Carlo
          (Stata 19.0)

          Comment


          • #6
            Code:
            * Example generated by -dataex-. To install: ssc install dataex
            clear
            input int year float SN double(ROE DEBTRATIO ROA FIRMSIZE YOYASSETGROWTH) float TECHLEV double EPS str9 CODE
            2007 1  -12.045 42.4184 -4.2608  18.95026488512146 -15.0082 1 -.1104 "000004.SZ"
            2008 1 -16.6644 49.1793 -5.4002 18.938346432486906  -1.1848 1 -.1324 "000004.SZ"
            2009 1   3.9554 61.0368  4.0435 19.255813734390493  37.3644 1  .0294 "000004.SZ"
            2010 1   17.069 29.8574 11.6702  19.03163819033435 -20.0825 1  .1384 "000004.SZ"
            2011 1   4.0436 29.4935  6.1404 19.095191436359503   6.5616 1  .0356 "000004.SZ"
            2012 1   2.6249 23.2528  5.1951 19.077752816822542  -1.7287 1  .0239 "000004.SZ"
            2013 1  -1.3431 40.3239  4.7509  19.30507651488318  25.5236 1 -.0123 "000004.SZ"
            2014 1   4.8519 53.4754  6.8156 19.639392142978075  39.6984 1  .0453 "000004.SZ"
            2015 1   1.5416 59.0402  2.8493 19.803653362037466  17.8522 1  .0149 "000004.SZ"
            2016 1  38.8437 20.3456 15.6452  19.22588925800566 -43.8848 1   .468 "000004.SZ"
            2007 2   2.3245   7.429  2.8845 18.186064445005186   2.9274 1   .023 "000008.SZ"
            2008 2   1.0231  7.4786    .813  18.18387457151789   -.2187 1    .01 "000008.SZ"
            2009 2    .4284  7.6589   .3679   18.1901093920773    .6254 1  .0043 "000008.SZ"
            2010 2   1.2035  4.5319    .067 18.171350044322935  -1.8584 1  .0121 "000008.SZ"
            2011 2   -.7277  4.3705 -1.7481  18.16238395823611   -.8926 1 -.0073 "000008.SZ"
            2012 2  12.7314 11.8931  13.872  20.23522796760672   4.5203 1    .26 "000008.SZ"
            2013 2   4.1213 10.0605   4.432 20.255860350706175   2.0847 1    .07 "000008.SZ"
            2014 2   1.3688 11.2276  2.5334  20.32878227602286   7.5647 1    .03 "000008.SZ"
            2015 2  10.6726 18.9809 10.9867   22.0012382724594  432.523 1   .078 "000008.SZ"
            2016 2  11.5699 24.6583 10.8546 22.826504056551624 128.2487 1   .192 "000008.SZ"
            2007 3  12.9975 49.3006  10.193  22.85778510919945  24.7429 0    .41 "000012.SZ"
            2008 3   9.8246 53.6142   7.029 23.062767169255494  22.7503 0    .35 "000012.SZ"
            2009 3  16.8749 48.5852 10.1394 23.113252648961723   5.1782 0    .68 "000012.SZ"
            2010 3  24.8745 45.7945 16.9455 23.246561056236157  14.2602 0     .7 "000012.SZ"
            2011 3  17.7231 52.1906 12.9618  23.44990165561166   22.549 0    .57 "000012.SZ"
            2012 3   4.0029 49.3004   4.657 23.386026422025076  -6.1878 0    .13 "000012.SZ"
            2013 3  20.6663 44.2868 14.7377  23.43656004928872   5.1832 0    .74 "000012.SZ"
            2014 3  10.6566 42.7561  7.9354 23.439073094475816    .2516 0    .42 "000012.SZ"
            2015 3   7.7021  49.144  6.4815 23.463434678259592   2.4661 0     .3 "000012.SZ"
            2016 3  10.1707 52.1026  7.4609 23.565078315767128    9.617 0    .38 "000012.SZ"
            2007 4   5.9938 64.3463  2.6784 23.084115091930528   5.7929 0  .3475 "000016.SZ"
            2008 4   7.2909 61.7391   3.242  23.07941283343942   -.4691 0  .2083 "000016.SZ"
            2009 4   3.9358 69.7358  1.6619 23.330986042774065  28.6047 0  .1255 "000016.SZ"
            2010 4   2.1323 74.3477   .9589 23.524617873084065  21.3649 0  .0697 "000016.SZ"
            2011 4    .6237 74.9408   .8167  23.55096123884677   2.6693 0  .0207 "000016.SZ"
            2012 4   1.1381 74.3593  1.4735 23.530432129692436   -2.032 0  .0381 "000016.SZ"
            2013 4   1.1118 72.8132  1.8896 23.479679719889933  -4.9486 0  .0375 "000016.SZ"
            2014 4    1.286 74.3884  1.1294  23.54341535350496   6.5755 0  .0437 "000016.SZ"
            2015 4 -36.3355 78.4184 -9.2764 23.380048536190195  -15.072 0 -.5219 "000016.SZ"
            2016 4   3.3476 80.7546  1.0851 23.570679036970624  21.0012 0  .0397 "000016.SZ"
            2007 5   14.648 21.5707 10.7621  19.96413869760196  -1.1495 0    .24 "000019.SZ"
            2008 5   3.8692 27.9769  4.6788  20.09204591702396  13.6448 0    .07 "000019.SZ"
            2009 5  -3.9535 41.3914  -.2742 20.250629558117843   17.185 0   -.07 "000019.SZ"
            2010 5   1.7631 43.3623  3.2525 20.305427758286157   5.6327 0   .031 "000019.SZ"
            2011 5    1.149 16.2047  1.9114 20.783386081835598  61.2778 0  .0323 "000019.SZ"
            2012 5   8.0395 17.7289  6.4972 20.924568274794584  15.1634 0   .297 "000019.SZ"
            2013 5    4.537 24.3113   4.503 21.013423782458425   9.2923 0   .174 "000019.SZ"
            2014 5   1.3797 13.9418  1.3591  20.86703042550435   2.4654 0  .0443 "000019.SZ"
            2015 5  -3.6985   9.743 -3.8743 20.781967441500388  -8.1546 0 -.1171 "000019.SZ"
            2016 5   9.8222 10.9292 10.1231 20.887545382155363  11.1353 0  .2139 "000019.SZ"
            2007 6   9.5454 35.2331  6.8684 19.739651479636457   -.5518 0  .0779 "000020.SZ"
            2008 6   3.0889 44.5208  2.6078   19.9173322298418  19.4444 0  .0267 "000020.SZ"
            2009 6   1.6626 66.7058  3.0954 20.444582936182208  69.4268 0  .0147 "000020.SZ"
            2010 6   3.5397 63.2778  3.6507 20.402915006299466  -4.0812 0  .0324 "000020.SZ"
            2011 6   3.8176  58.566  4.6885 20.320375843113627  -7.9225 0  .0366 "000020.SZ"
            2012 6   1.1638 58.8963  3.6206 20.340019690284514   1.9838 0  .0115 "000020.SZ"
            2013 6  -2.3535  62.581  1.6923 20.410400648102268   7.2917 0  -.023 "000020.SZ"
            2014 6   2.7702 75.8028  5.4137  20.87404597280686  58.9859 0  .0271 "000020.SZ"
            2015 6  -2.2713 73.0405  4.1113 20.867443439121825   -.6581 0 -.0238 "000020.SZ"
            2016 6   1.7296 49.4528  1.9103 20.265152109676023 -45.2397 0  .0193 "000020.SZ"
            end
            format %ty year

            Comment


            • #7
              sorry,i think this will do.Thanks for the quick reply too.Appreciated.

              Comment


              • #8
                Shadrach:
                thanks for providing an enhanced example.
                As far as I can see the issue, -1.TECHLEV- is time-invariant; hence, ther's nothing you can do to estimate its coefficients under -fe-.
                In addition, if -hausman- test outcome points you to -fe-, -re- would be inconsistent (ie, cannot be an alternative).
                Kind regards,
                Carlo
                (Stata 19.0)

                Comment

                Working...
                X