Announcement

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

  • Fixed Effects or OLS

    Hello all,

    The following question: As part of my master's thesis, I am reading papers that address similar questions. In these papers it is always described that an OLS estimation is performed. Can this be interpreted in a way that no fixed or random effects estimation was performed?
    Thanks in advance.

  • #2
    You can be certain that no random effects estimation was performed, as that cannot, to my knowledge, be done with OLS.

    You cannot exclude the possibility that fixed-effect estimation was done. This is because, for linear regression, you can emulate fixed-effects regression by an OLS regression that includes indicators for the fixed effects as covariates. While this would be a relatively inefficient (computationally, not statistically) way to get the results of a fixed-effects regression, it is sometimes done, and it might well just be described as OLS regression. You would have to scrutinize the full text of the article to see whether the "OLS regression" included the fixed effects "dummies" or not.

    Comment


    • #3
      Thanks Clyde. Year-fixed effects and industry fixed effects are integrated. However, the analysis takes place at the company level, so that no cross-sectional fixed effects are integrated. Besides, yes Industry Dummies are the same across all years. Wouldn't this be possible with a fixed effects regression? Can I exclude fixed effects and assume that it is OLS with dummies?

      I am investigating whether the religiosity of counties where companies are located in the US affects ESG scores. The tests indicate to me that fixed effects regression is preferable. I just wonder if it makes sense to show the difference between the counties, since Fixed Effects Regression only takes into account the variation within the groups.

      Thanks in advance!
      Last edited by Siegfried Fiegler; 11 Nov 2022, 00:17.

      Comment


      • #4
        Siegfried:
        if you emulate -xtreg,fe- via OLS with -panelid- among the predictors, you are going to face the very same problems that you have with time-invariant variable and -fe- estimators.
        If you're intrested in obtaining coefficient of time invariant predictors you should go -re- (but -re- is inconsistent if -fe- is the way to go).
        Kind regards,
        Carlo
        (Stata 19.0)

        Comment


        • #5
          Hello Carlo,
          I observe that in all relevant papers no company specific axis intercepts are estimated hence the question. One could also choose OLS for purely logical reasons, if it fits better to the hypothesis instead of doing the tests in Stata. My goal would be to omit it as a PanelID in the Predictors.

          Comment


          • #6
            Click image for larger version

Name:	stata.PNG
Views:	1
Size:	11.5 KB
ID:	1688942
            The author calls this OLS. Am I correct that this equation does not belong to any fixed effects model.would this be mentioned more explicitly in the paper?

            Comment


            • #7
              Siegfried;
              it depends on the way the dataset was (theoretically) -xtset-.
              This equation seems to show a two-way fixed effect (-industry- and -year-).
              Again, OLS can emulate -fe- estimates, as you can see from the following toy-example, that adopts default standard errors due to the really negligible sample size:
              Code:
              . use "https://www.stata-press.com/data/r17/nlswork.dta"
              (National Longitudinal Survey of Young Women, 14-24 years old in 1968)
              
              . xtset idcode year
              
              Panel variable: idcode (unbalanced)
               Time variable: year, 68 to 88, but with gaps
                       Delta: 1 unit
              
              . regress ln_wage c.age##c.age i.idcode i.year if idcode<=3
              
                    Source |       SS           df       MS      Number of obs   =        39
              -------------+----------------------------------   F(18, 20)       =      4.86
                     Model |  4.21278813        18  .234043785   Prob > F        =    0.0005
                  Residual |  .962950828        20  .048147541   R-squared       =    0.8139
              -------------+----------------------------------   Adj R-squared   =    0.6465
                     Total |  5.17573896        38  .136203657   Root MSE        =    .21943
              
              ------------------------------------------------------------------------------
                   ln_wage | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
              -------------+----------------------------------------------------------------
                       age |   .0773019   .2865219     0.27   0.790    -.5203723    .6749761
                           |
               c.age#c.age |  -.0045583   .0012212    -3.73   0.001    -.0071057    -.002011
                           |
                    idcode |
                        2  |  -.4183815   .0918256    -4.56   0.000    -.6099263   -.2268366
                        3  |   .6579353   1.834332     0.36   0.724    -3.168414    4.484284
                           |
                      year |
                       69  |   .3367906   .4335876     0.78   0.446    -.5676572    1.241238
                       70  |   .2089384   .6771373     0.31   0.761    -1.203545    1.621422
                       71  |   .3144116   .9610926     0.33   0.747    -1.690392    2.319216
                       72  |   .5888124   1.253657     0.47   0.644     -2.02627    3.203894
                       73  |   .8912873   1.550825     0.57   0.572    -2.343676    4.126251
                       75  |   1.246958   2.152898     0.58   0.569    -3.243908    5.737823
                       77  |   1.560689   2.761762     0.57   0.578    -4.200247    7.321624
                       78  |   1.941522   3.068213     0.63   0.534    -4.458659    8.341703
                       80  |    2.34498   3.684737     0.64   0.532    -5.341247    10.03121
                       82  |   2.698954   4.315145     0.63   0.539     -6.30228    11.70019
                       83  |   2.994437   4.618087     0.65   0.524    -6.638723     12.6276
                       85  |   3.538578   5.245889     0.67   0.508    -7.404154    14.48131
                       87  |   3.965153   5.878139     0.67   0.508    -8.296429    16.22674
                       88  |    4.40786   6.407149     0.69   0.499    -8.957218    17.77294
                           |
                     _cons |   1.341224   4.651269     0.29   0.776    -8.361153     11.0436
              ------------------------------------------------------------------------------
              
              . xtreg ln_wage c.age##c.age i.year if idcode<=3, fe
              
              Fixed-effects (within) regression               Number of obs     =         39
              Group variable: idcode                          Number of groups  =          3
              
              R-squared:                                      Obs per group:
                   Within  = 0.7404                                         min =         12
                   Between = 0.4068                                         avg =       13.0
                   Overall = 0.4014                                         max =         15
              
                                                              F(16,20)          =       3.57
              corr(u_i, Xb) = -0.8560                         Prob > F          =     0.0042
              
              ------------------------------------------------------------------------------
                   ln_wage | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
              -------------+----------------------------------------------------------------
                       age |   .0773019   .2865219     0.27   0.790    -.5203723    .6749761
                           |
               c.age#c.age |  -.0045583   .0012212    -3.73   0.001    -.0071057    -.002011
                           |
                      year |
                       69  |   .3367906   .4335876     0.78   0.446    -.5676572    1.241238
                       70  |   .2089384   .6771373     0.31   0.761    -1.203545    1.621422
                       71  |   .3144116   .9610926     0.33   0.747    -1.690392    2.319216
                       72  |   .5888124   1.253657     0.47   0.644     -2.02627    3.203894
                       73  |   .8912873   1.550825     0.57   0.572    -2.343676    4.126251
                       75  |   1.246958   2.152898     0.58   0.569    -3.243908    5.737823
                       77  |   1.560689   2.761762     0.57   0.578    -4.200247    7.321624
                       78  |   1.941522   3.068213     0.63   0.534    -4.458659    8.341703
                       80  |    2.34498   3.684737     0.64   0.532    -5.341247    10.03121
                       82  |   2.698954   4.315145     0.63   0.539     -6.30228    11.70019
                       83  |   2.994437   4.618087     0.65   0.524    -6.638723     12.6276
                       85  |   3.538578   5.245889     0.67   0.508    -7.404154    14.48131
                       87  |   3.965153   5.878139     0.67   0.508    -8.296429    16.22674
                       88  |    4.40786   6.407149     0.69   0.499    -8.957218    17.77294
                           |
                     _cons |   1.465543   5.342682     0.27   0.787    -9.679096    12.61018
              -------------+----------------------------------------------------------------
                   sigma_u |  .54258328
                   sigma_e |  .21942548
                       rho |  .85944136   (fraction of variance due to u_i)
              ------------------------------------------------------------------------------
              F test that all u_i=0: F(2, 20) = 10.43                      Prob > F = 0.0008
              
              .
              Kind regards,
              Carlo
              (Stata 19.0)

              Comment


              • #8
                Hello Carlo,

                the data set of this equation was at the company level. Does that mean I can still set up the Fixed Effects as in the equation? This would help me a lot in my investigation? Thanks for your help!

                In the paper it was xtset Company.ID Year
                Last edited by Siegfried Fiegler; 11 Nov 2022, 05:51.

                Comment


                • #9
                  Siegfried:
                  if I were presented with your same research goal, I would go (with cluster-robust standard errors, of needed:
                  Code:
                  xtset Company.ID Year
                  xtreg <depvar> <indepvars> i.Year, fe
                  What we have learnt from this thread, is that math is difficult to tame: we face the very same issues regardless of going -xtreg,fe- or emulating the -fe- estimator via -regress-.
                  Kind regards,
                  Carlo
                  (Stata 19.0)

                  Comment


                  • #10
                    I think you misunderstood my question. Some of the literature even mentions that the fixed effects model is not suitable because some important independent variables vary only very little over time. Therefore, I would use the equation above.

                    I understand your point that -reg- and -xtreg- with fe can produce the same results but when xtset takes place at the firm level and one integrates at the industry level with reg Fixed Effects I think there is a significant difference?

                    Comment


                    • #11
                      Siegfried:
                      some comments about your post:
                      1) without providing link to the literature (there're tons of literature mentioned on this forum, thanks to its interdisciplinearity) it is easy to misunderstand questions. Therefore, as per FAQ, full reference, please. Thanks.
                      2) https://blog.stata.com/2015/10/29/fi...dlak-approach/ can be informative;
                      3) if you use an -fe- estimator, -xtset- your data with -firmid- as the -panelvar- and add industry among your set of predictors, if your firms do not change -industry- across time (that is, of -industry-, ait is often the case, is a time-invariant variable), you will not get any coefficient about that predictor, due to de-meaning (the mean of a constant is the very same constant);
                      4) you're right that, if time-varying variables have little within-variation, the -fe- estimator complains.
                      Kind regards,
                      Carlo
                      (Stata 19.0)

                      Comment


                      • #12
                        Thanks Carlo! On point 3): Precisely because these shorten out, I make the assumption that the formula shown above was worked with the reg command.

                        It is very confusing to me because many papers only state that OLS was used and not which regression exactly!

                        Comment


                        • #13
                          Siegfied:
                          I'm symphatetic with your disappointment: sometimes articles offer poor guidance.
                          However, if the predictor is time-invariant and -fe- is the way to go, -regress- and -xtreg,fe-,again, do not give back different results:
                          Code:
                           
                           . use "https://www.stata-press.com/data/r17/nlswork.dta"  (National Longitudinal Survey of Young Women, 14-24 years old in 1968)  . xtset idcode year  Panel variable: idcode (unbalanced)  Time variable: year, 68 to 88, but with gaps          Delta: 1 unit 
                          regress ln_wage c.age##c.age i.idcode i.year i.race i.not_smsa if idcode<=5
                          note: 2.race omitted because of collinearity.
                          note: 0.not_smsa omitted because of collinearity.
                          
                                Source |       SS           df       MS      Number of obs   =        61
                          -------------+----------------------------------   F(20, 40)       =      3.57
                                 Model |    4.815506        20    .2407753   Prob > F        =    0.0003
                              Residual |  2.69622786        40  .067405697   R-squared       =    0.6411
                          -------------+----------------------------------   Adj R-squared   =    0.4616
                                 Total |  7.51173386        60  .125195564   Root MSE        =    .25963
                          
                          ------------------------------------------------------------------------------
                               ln_wage | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
                          -------------+----------------------------------------------------------------
                                   age |   .2452264    .311939     0.79   0.436    -.3852259    .8756786
                                       |
                           c.age#c.age |  -.0055013   .0010514    -5.23   0.000    -.0076262   -.0033764
                                       |
                                idcode |
                                    2  |  -.4004018   .1075486    -3.72   0.001    -.6177656    -.183038
                                    3  |   .0156358   1.893272     0.01   0.993    -3.810809    3.842081
                                    4  |   .4579348   1.919643     0.24   0.813    -3.421809    4.337679
                                    5  |   .2553714   1.905768     0.13   0.894    -3.596329    4.107072
                                       |
                                  year |
                                   69  |    .187113   .4093169     0.46   0.650    -.6401474    1.014373
                                   70  |   .1828126   .6688065     0.27   0.786    -1.168896    1.534521
                                   71  |   .1911771   .9720923     0.20   0.845    -1.773495    2.155849
                                   72  |   .3253527   1.282299     0.25   0.801     -2.26627    2.916976
                                   73  |    .425706   1.595447     0.27   0.791    -2.798814    3.650226
                                   75  |   .4567861   2.226248     0.21   0.838    -4.042629    4.956201
                                   77  |    .602516   2.863692     0.21   0.834    -5.185221    6.390253
                                   78  |   .8596773   3.181579     0.27   0.788    -5.570534    7.289889
                                   80  |    .862568   3.816887     0.23   0.822    -6.851649    8.576785
                                   82  |   .9851321   4.460771     0.22   0.826    -8.030422    10.00069
                                   83  |   1.214008   4.775983     0.25   0.801    -8.438614    10.86663
                                   85  |   1.656427   5.418656     0.31   0.761    -9.295086    12.60794
                                   87  |   1.920968   6.063396     0.32   0.753    -10.33361    14.17555
                                   88  |   2.309481   6.628962     0.35   0.729    -11.08815    15.70711
                                       |
                                  race |
                                Black  |          0  (omitted)
                            0.not_smsa |          0  (omitted)
                                 _cons |  -1.307517   5.016738    -0.26   0.796    -11.44672    8.831689
                          ------------------------------------------------------------------------------
                          
                          . xtreg ln_wage c.age##c.age i.year i.race i.not_smsa if idcode<=5, fe
                          note: 2.race omitted because of collinearity.
                          note: 0.not_smsa omitted because of collinearity.
                          
                          Fixed-effects (within) regression               Number of obs     =         61
                          Group variable: idcode                          Number of groups  =          5
                          
                          R-squared:                                      Obs per group:
                               Within  = 0.5138                                         min =         11
                               Between = 0.0082                                         avg =       12.2
                               Overall = 0.2186                                         max =         15
                          
                                                                          F(16,40)          =       2.64
                          corr(u_i, Xb) = -0.5792                         Prob > F          =     0.0065
                          
                          ------------------------------------------------------------------------------
                               ln_wage | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
                          -------------+----------------------------------------------------------------
                                   age |   .2452264    .311939     0.79   0.436    -.3852259    .8756786
                                       |
                           c.age#c.age |  -.0055013   .0010514    -5.23   0.000    -.0076262   -.0033764
                                       |
                                  year |
                                   69  |    .187113   .4093169     0.46   0.650    -.6401474    1.014373
                                   70  |   .1828126   .6688065     0.27   0.786    -1.168896    1.534521
                                   71  |   .1911771   .9720923     0.20   0.845    -1.773495    2.155849
                                   72  |   .3253527   1.282299     0.25   0.801     -2.26627    2.916976
                                   73  |    .425706   1.595447     0.27   0.791    -2.798814    3.650226
                                   75  |   .4567861   2.226248     0.21   0.838    -4.042629    4.956201
                                   77  |    .602516   2.863692     0.21   0.834    -5.185221    6.390253
                                   78  |   .8596773   3.181579     0.27   0.788    -5.570534    7.289889
                                   80  |    .862568   3.816887     0.23   0.822    -6.851649    8.576785
                                   82  |   .9851321   4.460771     0.22   0.826    -8.030422    10.00069
                                   83  |   1.214008   4.775983     0.25   0.801    -8.438614    10.86663
                                   85  |   1.656427   5.418656     0.31   0.761    -9.295086    12.60794
                                   87  |   1.920968   6.063396     0.32   0.753    -10.33361    14.17555
                                   88  |   2.309481   6.628962     0.35   0.729    -11.08815    15.70711
                                       |
                                  race |
                                Black  |          0  (omitted)
                            0.not_smsa |          0  (omitted)
                                 _cons |  -1.253811   6.156588    -0.20   0.840    -13.69674    11.18912
                          -------------+----------------------------------------------------------------
                               sigma_u |  .32167419
                               sigma_e |  .25962607
                                   rho |  .60553778   (fraction of variance due to u_i)
                          ------------------------------------------------------------------------------
                          F test that all u_i=0: F(4, 40) = 7.83                       Prob > F = 0.0001
                          
                          .
                          Kind regards,
                          Carlo
                          (Stata 19.0)

                          Comment


                          • #14
                            hello Carlo, thanks for the example! In my example it should be different results after all. In "xtset" CompanyID and Year is introduced. But the regression works only with Industry and Time-fixed Effects. But not with Company Fixed Effects. Am I correct with this?

                            Comment


                            • #15
                              Siegfried:
                              it may be that, being perfectly collinear, -regress- discards -firm- or - industry-.
                              Kind regards,
                              Carlo
                              (Stata 19.0)

                              Comment

                              Working...
                              X