Announcement

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

  • Time dummies in Pooled OLS regression

    Hi,

    I am estimating a firm group-level variable using a panel data set.
    I have added fixed effects for time, industry, years and countries to account for any observed effects and used xtreg in the estimation.

    However, my main independent variable is time-invariant. Therefore, I cannot estimate this within this model. I therefore consider using Pooled OLS for this estimation.

    Now, I am rather confused about the difference in definition of both models.
    Is a fixed effects model including time and firm fixed effects the same as Pooled OLS with time and firm dummies (and clustering errors)?


    Assume the regression equation applying to this is Y = bX + error. Where X is time invariant and Y is time variant.

    Can I add time dummies to this, or would this violate the Pooled OLS model?

    best,
    Frank

  • #2
    Frank:
    no, they are in part different beasts:
    Code:
    use "https://www.stata-press.com/data/r16/nlswork.dta"
    . xtreg ln_wage i.race i.year if idcode<=3, fe
    note: 2.race omitted because of collinearity
    
    Fixed-effects (within) regression               Number of obs     =         39
    Group variable: idcode                          Number of groups  =          3
    
    R-sq:                                           Obs per group:
         within  = 0.5446                                         min =         12
         between = 0.2670                                         avg =       13.0
         overall = 0.3678                                         max =         15
    
                                                    F(14,22)          =       1.88
    corr(u_i, Xb)  = -0.0356                        Prob > F          =     0.0897
    
    ------------------------------------------------------------------------------
         ln_wage |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
            race |
          black  |          0  (omitted)
                 |
            year |
             69  |    .208967   .3918928     0.53   0.599    -.6037689    1.021703
             70  |  -.2747772   .3439816    -0.80   0.433    -.9881514    .4385969
             71  |  -.3613911    .326316    -1.11   0.280    -1.038129    .3153467
             72  |  -.2056973    .326316    -0.63   0.535    -.8824352    .4710406
             73  |  -.0310461    .326316    -0.10   0.925     -.707784    .6456917
             75  |   .0416271    .326316     0.13   0.900    -.6351107     .718365
             77  |   .0358937    .326316     0.11   0.913    -.6408441    .7126316
             78  |   .2433199    .326316     0.75   0.464    -.4334179    .9200578
             80  |   .2726139    .326316     0.84   0.412    -.4041239    .9493518
             82  |   .1747839   .3439816     0.51   0.616    -.5385903    .8881581
             83  |   .2924489    .326316     0.90   0.380    -.3842889    .9691868
             85  |   .3712589    .326316     1.14   0.267     -.305479    1.047997
             87  |   .2960361    .326316     0.91   0.374    -.3807017     .972774
             88  |   .3038639    .326316     0.93   0.362    -.3728739    .9806018
                 |
           _cons |   1.659677   .2833366     5.86   0.000     1.072073    2.247281
    -------------+----------------------------------------------------------------
         sigma_u |  .24956596
         sigma_e |  .27711004
             rho |  .44784468   (fraction of variance due to u_i)
    ------------------------------------------------------------------------------
    F test that all u_i=0: F(2, 22) = 9.64                       Prob > F = 0.0010
    
    . reg ln_wage i.idcode i.race i.year if idcode<=3, vce(cluster idcode)
    note: 2.race omitted because of collinearity
    
    Linear regression                               Number of obs     =         39
                                                    F(2, 2)           =          .
                                                    Prob > F          =          .
                                                    R-squared         =     0.6736
                                                    Root MSE          =     .27711
    
                                     (Std. Err. adjusted for 3 clusters in idcode)
    ------------------------------------------------------------------------------
                 |               Robust
         ln_wage |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
          idcode |
              2  |  -.3898423   .0268011   -14.55   0.005    -.5051583   -.2745263
              3  |  -.4648596   .0066766   -69.62   0.000    -.4935868   -.4361323
                 |
            race |
          black  |          0  (omitted)
                 |
            year |
             69  |    .208967   3.42e-08  6.1e+06   0.000     .2089668    .2089671
             70  |  -.2747772   .2665627    -1.03   0.411    -1.421704    .8721495
             71  |  -.3613911   .3802231    -0.95   0.442    -1.997359    1.274577
             72  |  -.2056973   .2055158    -1.00   0.422     -1.08996    .6785657
             73  |  -.0310461   .1010676    -0.31   0.788    -.4659047    .4038125
             75  |   .0416271   .1645216     0.25   0.824    -.6662522    .7495064
             77  |   .0358937   .1361656     0.26   0.817    -.5499794    .6217669
             78  |   .2433199   .1991388     1.22   0.346    -.6135051    1.100145
             80  |   .2726139    .219896     1.24   0.341    -.6735221     1.21875
             82  |   .1747839   .0801197     2.18   0.161    -.1699433    .5195112
             83  |   .2924489   .1355079     2.16   0.164    -.2905946    .8754925
             85  |   .3712589   .1931145     1.92   0.194     -.459646    1.202164
             87  |   .2960361   .2135556     1.39   0.300    -.6228196    1.214892
             88  |   .3038639   .1527355     1.99   0.185    -.3533039    .9610317
                 |
           _cons |   1.958421   .0066766   293.32   0.000     1.929694    1.987148
    ------------------------------------------------------------------------------
    
    .
    If you are interested in estimating the coefficient of your relevant time-invariant predictor (asn, as expected, the -fe- estimator wipes it out), you may want to consider the community-contributed commands -xthybrid- and -mundlak-
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Thank you Carlo.

      But if i am correct, I can potentially estimate the effect of my time invariant variable with Pooled OLS + Time effects.
      See below the results from Pooled OLS.
      INDEP is the time invariant variable.

      $Fetime are the time effects (w). P value is 0.67 so there is no relationship, but it does seem to not drop the variable due to collinearity.


      reg DEP INDEP $fetime , vce(cluster firmclusterid)

      Linear regression Number of obs = 5,796
      F(19, 390) = 30.03
      Prob > F = 0.0000
      R-squared = 0.0696
      Root MSE = .14158

      (Std. Err. adjusted for 391 clusters in firmclusterid)
      -------------------------------------------------------------------------------
      | Robust
      DEP | Coef. Std. Err. t P>|t| [95% Conf. Interval]
      --------------+----------------------------------------------------------------
      INDEP | -.0032232 .0075515 -0.43 0.670 -.0180699 .0116235
      |
      w |
      2 | .0201794 .0060377 3.34 0.001 .0083089 .03205
      3 | .0670767 .0090025 7.45 0.000 .0493771 .0847762
      4 | .0649924 .0083669 7.77 0.000 .0485425 .0814423
      5 | .0685803 .008204 8.36 0.000 .0524508 .0847099
      6 | .0509967 .0071494 7.13 0.000 .0369404 .0650529
      7 | .0531592 .0064538 8.24 0.000 .0404706 .0658478
      8 | .0635349 .0086654 7.33 0.000 .0464982 .0805717
      9 | .0801138 .00875 9.16 0.000 .0629107 .0973169
      10 | .1028432 .0108187 9.51 0.000 .081573 .1241133
      11 | .0967367 .0086188 11.22 0.000 .0797916 .1136818
      12 | .1249916 .0105195 11.88 0.000 .1043097 .1456735
      13 | .095314 .0088147 10.81 0.000 .0779838 .1126443
      14 | .1335215 .0094167 14.18 0.000 .1150076 .1520354
      15 | .1273269 .0110223 11.55 0.000 .1056564 .1489975
      16 | .1202794 .0085615 14.05 0.000 .1034468 .1371119
      17 | .1436933 .0103861 13.84 0.000 .1232734 .1641131
      18 | .1302452 .0094797 13.74 0.000 .1116075 .1488828
      19 | .1162327 .0093656 12.41 0.000 .0978194 .134646
      |
      _cons | .0190264 .0040902 4.65 0.000 .0109848 .027068
      -------------------------------------------------------------------------------

      Comment


      • #4
        Frank:
        you're correct that pooled OLS allows you to estimate -i.year-, but it is not a fixed effect estimator.
        Kind regards,
        Carlo
        (Stata 19.0)

        Comment

        Working...
        X