Announcement

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

  • GLS Fixed Effects regression, Omitted because of Collinearity

    Dear Stata community,

    Hi, I have a panel data (Company ID, years) independent variables(MTB, size, growth, roa, tangibility, covid19: dummy), and dependent variable (leverage).

    I tried to rung a command: xtreg leverage MTB size growth roa tangibility covid if year == 2016, fe
    However, Stata drops every independent variable due to collinearity even though the only added dummy is covid variable.
    So I took covid out and re-run the command but Stata still drops all variables due to the same reason.
    So, I ran the command without if: xtreg leverage MTB size growth roa tangibility covid, fe
    It perfectly runs fine.

    However, I would like to run xtreg command for each year(from 2016 to 2021), is there any possible solution for this?

    P.S: I dropped every independent variable by one but it still suffered from collinearity, so I believe it is a matter of year variable.

    Any advice is appreciated!

    Thanks in advance

    Click image for larger version

Name:	collinearity.PNG
Views:	1
Size:	28.4 KB
ID:	1666861

    Click image for larger version

Name:	collinearity1.PNG
Views:	1
Size:	32.4 KB
ID:	1666862

  • #2
    Kang:
    your problem rests on the -fe- machinery, which is amied at exploring within-panel variation. Therefore, one-year observations are not enough to feed the beast:
    Code:
    . use "https://www.stata-press.com/data/r17/nlswork.dta"
    (National Longitudinal Survey of Young Women, 14-24 years old in 1968)
    
    . xtreg ln_wage c.age##c.age if year==70, fe
    note: age omitted because of collinearity.
    note: c.age#c.age omitted because of collinearity.
    
    Fixed-effects (within) regression               Number of obs     =      1,686
    Group variable: idcode                          Number of groups  =      1,686
    
    R-squared:                                      Obs per group:
         Within  =      .                                         min =          1
         Between =      .                                         avg =        1.0
         Overall =      .                                         max =          1
    
                                                    F(0,0)            =       0.00
    corr(u_i, Xb) =      .                          Prob > F          =          .
    
    ------------------------------------------------------------------------------
         ln_wage | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
    -------------+----------------------------------------------------------------
             age |          0  (omitted)
                 |
     c.age#c.age |          0  (omitted)
                 |
           _cons |   1.507048          .        .       .            .           .
    -------------+----------------------------------------------------------------
         sigma_u |  .39847428
         sigma_e |          .
             rho |          .   (fraction of variance due to u_i)
    ------------------------------------------------------------------------------
    F test that all u_i=0: F(1685, 0) = .                        Prob > F =      .
    
    .
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Dear Carlo,

      Thanks for the insight!
      But if one-year obs isn't enough, shouldn't the error(which I have when I run the same command but re) be insufficient obs not omitted due to collinearity?

      Best regards

      Comment


      • #4
        Kang:
        different estimators, different machineries, different error/warning messages:
        Code:
        . use "https://www.stata-press.com/data/r17/nlswork.dta"
        (National Longitudinal Survey of Young Women, 14-24 years old in 1968)
        
        . xtreg ln_wage c.age##c.age if year==70, fe
        note: age omitted because of collinearity.
        note: c.age#c.age omitted because of collinearity.
        
        Fixed-effects (within) regression               Number of obs     =      1,686
        Group variable: idcode                          Number of groups  =      1,686
        
        R-squared:                                      Obs per group:
             Within  =      .                                         min =          1
             Between =      .                                         avg =        1.0
             Overall =      .                                         max =          1
        
                                                        F(0,0)            =       0.00
        corr(u_i, Xb) =      .                          Prob > F          =          .
        
        ------------------------------------------------------------------------------
             ln_wage | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
        -------------+----------------------------------------------------------------
                 age |          0  (omitted)
                     |
         c.age#c.age |          0  (omitted)
                     |
               _cons |   1.507048          .        .       .            .           .
        -------------+----------------------------------------------------------------
             sigma_u |  .39847428
             sigma_e |          .
                 rho |          .   (fraction of variance due to u_i)
        ------------------------------------------------------------------------------
        F test that all u_i=0: F(1685, 0) = .                        Prob > F =      .
        
        . xtreg ln_wage c.age##c.age if year==70, re
        insufficient observations
        r(2001);
        
        .
        Kind regards,
        Carlo
        (Stata 19.0)

        Comment


        • #5
          Thanks a lot!

          Here are some more questions about the regression, if you don't mind!
          I would like to run the regression for each year so I can compare how variables changed over time.
          However, it isn't possible with GLS fe regression. Could you suggest which model to take (Simple OLS regression)?

          Thanks in advance

          Comment


          • #6
            Kang:
            switching to simple OLS if you're dealing with a panel dataset makes little/no sense.
            I would be more interested in interacting -i.year- with the variable(s) you're more interested in.
            Kind regards,
            Carlo
            (Stata 19.0)

            Comment


            • #7
              Carlo:
              My panel data contain leverage (dependent variable), roa, tangibility, market size, MTB (market to book ratio), and growth of listed companies in the Korean stock market from 2016 to 2021.
              I am trying to observe changes in statistical coefficients of those variables before and during the Covid-19.

              Comment


              • #8
                Kang:
                then add a two-level categorical variable -i.pre_during_COVID- (pre_COVID=0; during_COVID=1) and add it as a predictor in the right-hand side of your regression equation.
                Kind regards,
                Carlo
                (Stata 19.0)

                Comment


                • #9
                  Dear all,

                  I am trying to do something similar namely to test the performance (ROA) of family firms versus non-family firms.
                  Model:

                  xtreg roa FamilyFirm, fe vce(robust)

                  However, whatever I try, my FamilyFirm dummy is omitted because of collinearity. The same happens if I do a regression with my covid year dummy (which equals 1 if 2020 0 otherwise). The family firm dummy indicates whether a firm is a family firm and stays constant over time.

                  When I adjust one single value in the past, so for example firm X, i make a family firm in a year earlier, Stata does not drop the variable anymore. But then I'm using wrong data.

                  Actually, I do want to include state-time fixed effects and industry fixed effects. How do I specify those in the regression? I have dummies for industry, state and time seperately.


                  Best regards,
                  Lucas van de Ven
                  Last edited by Lucas Venn; 01 Jun 2022, 07:08.

                  Comment


                  • #10
                    Lucas:
                    you can't do what you're after with the -fe- specifrication, as the -fe- estimator wipes out all time-invariant variables.
                    Kind regards,
                    Carlo
                    (Stata 19.0)

                    Comment


                    • #11
                      Dear Carlo,

                      Clear. So the only two options I have is using another methodology or manually collect the data for the dummies on multiple years?

                      Comment


                      • #12
                        Lucas:
                        the only option is to switch to -re-, keeping in mind that, if -fe- is the way to go, -re- results are inconsistent (read unreliable).
                        Kind regards,
                        Carlo
                        (Stata 19.0)

                        Comment


                        • #13
                          Dear,

                          I just made the re regression. However, I am highly doubting whether I did it right. The following model is used:

                          ROA = alpha + beta_1(FamilyFirm) + beta_2(covidyear) + beta_3(covidyear * FamilyFirm) + control variables, re

                          My professor from the university told me to use such a model, but I am struggling on how to use the model since:

                          - When I performed my difference in mean analysis, the ROA was better for family firms compared to non-family firms.
                          - Furthermore, I would have expected the covidyear variable to be negative.
                          - The FamilyFirm variable is a dummy which equals 1 if the firm is identified as a family firm, 0 otherwise. This dummy is time-invariant --> which made it impossible to perform a fixed effects model.

                          Code:
                          . xtreg roe FamilyFirm covidyear covidyear##FamilyFirm log_emp salesgrowth capitalstructure log_firmsi
                          > ze log_firmage risk investments Blockholders EquityBased i.sic2digits i.state1, re 
                          note: 1.covidyear omitted because of collinearity.
                          note: 1.FamilyFirm omitted because of collinearity.
                          
                          Random-effects GLS regression                   Number of obs     =      3,775
                          Group variable: ticker1                         Number of groups  =        405
                          
                          R-squared:                                      Obs per group:
                               Within  = 0.1748                                         min =          1
                               Between = 0.5028                                         avg =        9.3
                               Overall = 0.2339                                         max =         10
                          
                                                                          Wald chi2(96)     =    1018.51
                          corr(u_i, X) = 0 (assumed)                      Prob > chi2       =     0.0000
                          
                          --------------------------------------------------------------------------------------
                                           roe | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
                          ---------------------+----------------------------------------------------------------
                                    FamilyFirm |  -.0063058    .004889    -1.29   0.197     -.015888    .0032765
                                     covidyear |   .0019904   .0047785     0.42   0.677    -.0073753     .011356
                                   1.covidyear |          0  (omitted)
                                  1.FamilyFirm |          0  (omitted)
                                               |
                          covidyear#FamilyFirm |
                                          1 1  |   .0217433   .0100072     2.17   0.030     .0021295    .0413572
                                               |
                                       log_emp |    -.00387   .0023729    -1.63   0.103    -.0085207    .0007807
                                   salesgrowth |   .0008307   .0000709    11.72   0.000     .0006918    .0009696
                              capitalstructure |  -.0397185   .0079293    -5.01   0.000    -.0552596   -.0241775
                                  log_firmsize |   .0050721   .0023144     2.19   0.028     .0005359    .0096083
                                   log_firmage |   .0009934   .0019678     0.50   0.614    -.0028635    .0048502
                                          risk |  -.0076651   .0004067   -18.84   0.000    -.0084623   -.0068679
                                   investments |    .003498    .014501     0.24   0.809    -.0249234    .0319194
                                  Blockholders |   .0667456   .0382079     1.75   0.081    -.0081405    .1416316
                                   EquityBased |  -.0150729   .0056565    -2.66   0.008    -.0261594   -.0039864
                                               |
                                    sic2digits |
                                           13  |  -.0038821    .023133    -0.17   0.867    -.0492219    .0414577
                                           14  |   .0457434   .0373897     1.22   0.221    -.0275392    .1190259
                                           15  |    .093413   .0272314     3.43   0.001     .0400404    .1467855
                                           17  |   .0752435   .0370232     2.03   0.042     .0026793    .1478076
                                           20  |    .052516     .02277     2.31   0.021     .0078876    .0971444
                                           21  |   .0741864   .0303078     2.45   0.014     .0147843    .1335885
                                           22  |    .075517   .0382311     1.98   0.048     .0005855    .1504485
                                           23  |   .0735693    .025256     2.91   0.004     .0240685    .1230701
                                           24  |   .0621935   .0307407     2.02   0.043     .0019429    .1224442
                                           25  |   .0828426   .0383484     2.16   0.031     .0076811    .1580041
                                           26  |    .063092   .0250986     2.51   0.012     .0138996    .1122844
                                           27  |   -.022255   .0393843    -0.57   0.572    -.0994468    .0549369
                                           28  |   .0544474   .0221476     2.46   0.014     .0110388     .097856
                                           29  |   .0864935   .0254414     3.40   0.001     .0366293    .1363577
                                           30  |   .0386836    .029199     1.32   0.185    -.0185453    .0959125
                                           31  |   .0703815   .0370677     1.90   0.058    -.0022698    .1430327
                                           33  |   .0706056   .0356116     1.98   0.047      .000808    .1404031
                                           34  |   .0674461   .0266957     2.53   0.012     .0151236    .1197687
                                           35  |   .0671937   .0225436     2.98   0.003      .023009    .1113784
                                           36  |   .0593213   .0224285     2.64   0.008     .0153622    .1032805
                                           37  |   .0729571   .0231092     3.16   0.002     .0276639    .1182503
                                           38  |   .0501963   .0223109     2.25   0.024     .0064676    .0939249
                                           39  |   .0175037   .0330701     0.53   0.597    -.0473124    .0823199
                                           40  |   .0742328   .0273036     2.72   0.007     .0207187    .1277469
                                           42  |   .0512255   .0274829     1.86   0.062    -.0026399    .1050909
                                           44  |   .0375258   .0300505     1.25   0.212     -.021372    .0964237
                                           45  |    .079166    .025302     3.13   0.002     .0295749     .128757
                                           47  |   .0522946   .0322094     1.62   0.104    -.0108346    .1154237
                                           48  |   .0564331   .0241559     2.34   0.019     .0090884    .1037778
                                           49  |   .0380969   .0220296     1.73   0.084    -.0050803    .0812741
                                           50  |   .0570764   .0247686     2.30   0.021     .0085308    .1056221
                                           51  |   .0333156   .0266403     1.25   0.211    -.0188985    .0855296
                                           52  |   .0473536   .0296934     1.59   0.111    -.0108445    .1055517
                                           53  |   .0675105   .0254262     2.66   0.008     .0176761    .1173448
                                           54  |   .1126542   .0386739     2.91   0.004     .0368548    .1884536
                                           55  |   .0748026   .0272093     2.75   0.006     .0214734    .1281318
                                           56  |   .0938286   .0276188     3.40   0.001     .0396968    .1479605
                                           57  |   .0978228   .0417355     2.34   0.019     .0160228    .1796228
                                           58  |    .088843   .0276919     3.21   0.001     .0345678    .1431182
                                           59  |   .0528586   .0272704     1.94   0.053    -.0005905    .1063077
                                           70  |    .074607   .0334726     2.23   0.026     .0090019    .1402121
                                           72  |   .0923949   .0321264     2.88   0.004     .0294282    .1553615
                                           73  |   .0484676   .0221902     2.18   0.029     .0049756    .0919597
                                           78  |   .0683953   .0374631     1.83   0.068     -.005031    .1418217
                                           79  |   .0017705   .0383912     0.05   0.963    -.0734749    .0770159
                                           80  |   .0835302   .0254927     3.28   0.001     .0335653     .133495
                                           87  |   .0386772   .0263971     1.47   0.143    -.0130602    .0904146
                                           99  |   .0322044   .0291702     1.10   0.270    -.0249681    .0893769
                                               |
                                        state1 |
                                           AR  |   .0350061   .0465826     0.75   0.452    -.0562941    .1263063
                                           AZ  |    .013808   .0446103     0.31   0.757    -.0736265    .1012425
                                           CA  |   .0140955   .0427957     0.33   0.742    -.0697825    .0979736
                                           CO  |   .0209047   .0442361     0.47   0.637    -.0657964    .1076059
                                           CT  |   .0233401   .0438144     0.53   0.594    -.0625346    .1092147
                                           DC  |   .0094579   .0522085     0.18   0.856    -.0928689    .1117847
                                           DE  |   .0092421   .0479122     0.19   0.847     -.084664    .1031482
                                           FL  |   .0163826   .0437779     0.37   0.708    -.0694205    .1021857
                                           GA  |   .0181198   .0433755     0.42   0.676    -.0668947    .1031343
                                           ID  |   .0674453   .0486517     1.39   0.166    -.0279104    .1628009
                                           IL  |   .0204941   .0430472     0.48   0.634    -.0638767     .104865
                                           IN  |   .0151996   .0445138     0.34   0.733    -.0720459    .1024451
                                           KS  |   .0336689   .0527647     0.64   0.523     -.069748    .1370858
                                           KY  |    .021269    .048307     0.44   0.660    -.0734111    .1159491
                                           LA  |  -.0065566   .0461747    -0.14   0.887    -.0970574    .0839443
                                           MA  |   .0057163   .0431579     0.13   0.895    -.0788716    .0903043
                                           MD  |   .0027603   .0456628     0.06   0.952    -.0867371    .0922577
                                           ME  |   .0094847   .0521368     0.18   0.856    -.0927015    .1116709
                                           MI  |   .0386675   .0434865     0.89   0.374    -.0465645    .1238995
                                           MN  |   .0116382    .043558     0.27   0.789    -.0737339    .0970103
                                           MO  |   .0130821   .0439102     0.30   0.766    -.0729804    .0991445
                                           NC  |   .0190168   .0415436     0.46   0.647    -.0624072    .1004409
                                           NE  |   .0211396   .0489358     0.43   0.666    -.0747727     .117052
                                           NJ  |   .0148107    .043307     0.34   0.732    -.0700695    .0996908
                                           NV  |   .0893277   .0554717     1.61   0.107    -.0193949    .1980502
                                           NY  |   .0197762   .0428417     0.46   0.644     -.064192    .1037445
                                           OH  |   .0124805   .0434288     0.29   0.774    -.0726385    .0975995
                                           OK  |    .024623   .0447901     0.55   0.582    -.0631639    .1124099
                                           OR  |   .0224772   .0483896     0.46   0.642    -.0723646    .1173191
                                           PA  |   .0118807   .0431331     0.28   0.783    -.0726586    .0964199
                                           RI  |   .0294957   .0466815     0.63   0.527    -.0619983    .1209897
                                           TN  |   .0359063   .0440841     0.81   0.415    -.0504971    .1223096
                                           TX  |   .0096353   .0429878     0.22   0.823    -.0746191    .0938898
                                           VA  |   .0149053   .0436321     0.34   0.733    -.0706121    .1004227
                                           WA  |   .0067815   .0437383     0.16   0.877     -.078944    .0925071
                                           WI  |   .0247808   .0436123     0.57   0.570    -.0606978    .1102593
                                               |
                                         _cons |  -.0132424   .0526774    -0.25   0.802    -.1164883    .0900034
                          ---------------------+----------------------------------------------------------------
                                       sigma_u |  .01800372
                                       sigma_e |  .07252115
                                           rho |  .05805262   (fraction of variance due to u_i)
                          --------------------------------------------------------------------------------------
                          Last edited by Lucas Venn; 02 Jun 2022, 03:55.

                          Comment


                          • #14
                            Lucas:
                            1) my crush with corporate finance ended abruptly around 35 years ago, but, if I can still grasp the basics from the back of my mind, return on equity (ROE) differs from return on assets (ROA);
                            2) what does the -xttest0- outcome (to be perfformed after -xtreg,re-) tell you?;
                            3) have you tested via -testparm- whether the tons of states and years included in your regression reach (or not) joint statistical significance?
                            4) with 405 panels the cluster-robust standard error should replace its default counterpart;
                            5) have you checked whether the functional form of your regressand is correctly specified (you can use the same procedure explained in the -linktest- entry of Stata .pdf manual?
                            6) have you tested (via the community-contributed modules -xtoverid- or. better, -mundlak-) which specification (i.e.., -fe- or -re-) fits your regression?
                            7) time-invariant variable are an unavoidable fact of life (I was born in Milan and this will stand the test of time). However, striving for obtaining the coefficient of a time-invariant variable is not, per se, a good reason to switch from -fe- to -re- panel data regression.
                            Kind regards,
                            Carlo
                            (Stata 19.0)

                            Comment

                            Working...
                            X