Announcement

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

  • Panel Data: Pooled OLS vs Fixed Effect

    Dear Experts,

    I have an unbalanced panel data as below:


    Click image for larger version

Name:	Screenshot_1.jpg
Views:	1
Size:	32.4 KB
ID:	1469697


    If I have data above, what model I should use between Pooled OLS and Fixed Effect model.

    Are there any specific tests I can conduct to choose the correct model?

    Thank you so much for helping.

  • #2
    If you run xtreg,fe, you obtain this information from the foot of the regression table (highlighted in red below).

    Code:
    . webuse grunfeld
    . xtreg invest mvalue kstock,fe
    
    Fixed-effects (within) regression               Number of obs     =        200
    Group variable: company                         Number of groups  =         10
    
    R-sq:                                           Obs per group:
         within  = 0.7668                                         min =         20
         between = 0.8194                                         avg =       20.0
         overall = 0.8060                                         max =         20
    
                                                    F(2,188)          =     309.01
    corr(u_i, Xb)  = -0.1517                        Prob > F          =     0.0000
    
    ------------------------------------------------------------------------------
          invest |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
          mvalue |   .1101238   .0118567     9.29   0.000     .0867345    .1335131
          kstock |   .3100653   .0173545    17.87   0.000     .2758308    .3442999
           _cons |  -58.74393   12.45369    -4.72   0.000    -83.31086     -34.177
    -------------+----------------------------------------------------------------
         sigma_u |  85.732501
         sigma_e |  52.767964
             rho |  .72525012   (fraction of variance due to u_i)
    ------------------------------------------------------------------------------
    F test that all u_i=0: F(9, 188) = 49.18                     Prob > F = 0.0000
    If this test is significant, i.e., that all firm effects are equal to 0, you reject poolability and opt for the fixed effects model. Here is the intuition using least squares dummy variables (LSDV) regression which is equivalent to fixed effects.


    Code:
    . regress invest mvalue kstock i.company
    
          Source |       SS           df       MS      Number of obs   =       200
    -------------+----------------------------------   F(11, 188)      =    288.50
           Model |   8836465.8        11  803315.073   Prob > F        =    0.0000
        Residual |  523478.114       188  2784.45805   R-squared       =    0.9441
    -------------+----------------------------------   Adj R-squared   =    0.9408
           Total |  9359943.92       199  47034.8941   Root MSE        =    52.768
    
    ------------------------------------------------------------------------------
          invest |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
          mvalue |   .1101238   .0118567     9.29   0.000     .0867345    .1335131
          kstock |   .3100653   .0173545    17.87   0.000     .2758308    .3442999
                 |
         company |
              2  |   172.2025   31.16126     5.53   0.000     110.7319    233.6732
              3  |  -165.2751   31.77556    -5.20   0.000    -227.9576   -102.5927
              4  |    42.4874   43.90987     0.97   0.334    -44.13197    129.1068
              5  |  -44.32013   50.49225    -0.88   0.381    -143.9243    55.28406
              6  |   47.13539   46.81068     1.01   0.315    -45.20629    139.4771
              7  |   3.743212   50.56493     0.07   0.941    -96.00433    103.4908
              8  |   12.75103   44.05263     0.29   0.773    -74.14994      99.652
              9  |  -16.92558   48.45326    -0.35   0.727    -112.5075    78.65636
             10  |   63.72884   50.33023     1.27   0.207    -35.55572    163.0134
                 |
           _cons |  -70.29669   49.70796    -1.41   0.159    -168.3537    27.76035
    ------------------------------------------------------------------------------
    The difference between pooled OLS and LSDV (fixed effects) are the firm dummies taking values 2-10 above. If pooled OLS is preferred over fixed effects, then this implies that the dummies are jointly not significant (or are jointly equal to zero). We can perform this test using the testparm command in Stata as below:


    Code:
    . testparm i.company
    
    ( 1) 2.company = 0
    ( 2) 3.company = 0
    ( 3) 4.company = 0
    ( 4) 5.company = 0
    ( 5) 6.company = 0
    ( 6) 7.company = 0
    ( 7) 8.company = 0
    ( 8) 9.company = 0
    ( 9) 10.company = 0
    
    F( 9, 188) = 49.18
    Prob > F = 0.0000
    Doing this, we get the same test statistic as obtained under xtreg. Therefore, fixed effects is preferred in this instance.

    Comment


    • #3
      I have a question which corresponds to the question raised above. For this reason I do not use a new thread.

      The sample is comparable to that of "grunfeld", however the panel is unbalanced and comprises singletons with respect to firms. Less than 1% of the observations are singletons.

      When I run a fixed effects regression with
      Code:
      xtreg y x i.year, fe
      for the
      Code:
      F test that all u_i=0
      I get
      Code:
       Prob > F = 0.0000
      .
      Thus, using firm fixed effects is recommended.

      However, when I first drop all missing values of the variables used in the regression, drop the singletons using the code
      Code:
      bysort firmid: drop if _N==1
      and then run
      Code:
      xtreg y x i.year, fe
      I get the same coefficients and t-stats except for the intercept

      but

      I get a large p-value for the
      Code:
      F test that all u_i=0

      I understand that for the F-Test, F(v1,v2), v1 decreases when singletons are removed manually before conducting the regression but I did not expect that whether singletons are dropped before xtreg is used or not makes a difference with regard to the decision whether to use firm fixed effects or not.

      Does -xtreg- not consider singletons for the F test that all u_i=0?

      Should I then use fixed effects or not?

      Comment


      • #4
        Samantha:
        there's an upward issue: why removing singletions (and making-up your data) when Stata can handle both balanced and unbalanced panel datasets?
        Kind regards,
        Carlo
        (Stata 19.0)

        Comment

        Working...
        X