Announcement

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

  • Fixed Effects Panel regression with vce(cluster): Post-estimation problems

    I am analyzing an unbalanced panel of firms over a 10 year period with 155 observations in 50 cross-sections. I ran a regression with both a fixed and random effects model and then used the Hausman-Test to find out which one is better suited. The Hausmann-test clearly rejected the random effects model. I then tested the fe model using xtreg, fe and reg with firm dummies for multicollinearity (VIF) and heteroskedasticity (xttest3, estat hettest). The null hypothesis of homoskedasticity was clearly rejected and the VIF was highly inflated (>70) for one of my control variables. I then switched to vce(cluster id) to tackle the heteroskedasticity problem and came to the conclusion that i can safely ignore the inflated VIF for a control variable. I am not interested in the variable's coefficient and only include it to increase the overall model fit and because its a standard control variable. My relevant explanatory variables have VIFs below 5.

    Now, using the robust standard errors with vce(cluster id), xtreg still provides me with a F-Test-value, whereas reg does not anymore. Also, the standard errors obtained through the xtreg and reg command differ slightly after using the vce(robust id), while the coeffcients remain the same. I also delete singular clusters, but the issue nontheless persists. When I dont use robust standard errors both commands yield exactly the same result, as they should?

    This brings me to the following questions:
    • Can I still safely report the F-Test I get from xtreg, or is the missing F-Test in reg indicating that the F-Test from xtreg is biased?
    • Which multicollinearity measure can I report, since the VIF from reg would then also be based on different standard errors than those obtained from xtreg?
    • Given the robust standard errors, how can I compare different extensions of my base model (e.g. adding interaction terms, or other explanatory variables). The lrtest yields an error message referring to vce(cluster id)?
    Overall, I have the impression that even though FE is the preferred choice in my case, the explanatory power of the model is rather weak, although some of the interaction effects are significant in a way in line with my theoretical baseline. Overall, I assume the amount of observation is too low. My fraction of variance due to u_i varies between 0.85 and 0.92 in my different variations. Is that value too high to even allow to draw meaningful conclusions?

    Thanks and best regards
    Andreas

  • #2
    Andreas:
    welcome to the list.
    As suggested by he FAQ, posting what you typed along with the results that Stata gave you back is the best way to increase your chances of getting helpful replies. Thanks.
    That said, one of your question can be replied without knowing more details: multicollinearity after -xtreg, fe- can be investigated vi -estat vce, corr-, as in the following toy-example:
    Code:
    . xtreg ln_wage age, fe
    
    Fixed-effects (within) regression               Number of obs      =     28510
    Group variable: idcode                          Number of groups   =      4710
    
    R-sq:  within  = 0.1026                         Obs per group: min =         1
           between = 0.0877                                        avg =       6.1
           overall = 0.0774                                        max =        15
    
                                                    F(1,23799)         =   2720.20
    corr(u_i, Xb)  = 0.0314                         Prob > F           =    0.0000
    
    ------------------------------------------------------------------------------
         ln_wage |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
             age |   .0181349   .0003477    52.16   0.000     .0174534    .0188164
           _cons |   1.148214   .0102579   111.93   0.000     1.128107     1.16832
    -------------+----------------------------------------------------------------
         sigma_u |  .40635023
         sigma_e |  .30349389
             rho |  .64192015   (fraction of variance due to u_i)
    ------------------------------------------------------------------------------
    F test that all u_i=0:     F(4709, 23799) =     8.81         Prob > F = 0.0000
    
    . estat vce, corr
    
    Correlation matrix of coefficients of xtreg model
    
            e(V) |      age     _cons 
    -------------+--------------------
             age |   1.0000           
           _cons |  -0.9845    1.0000
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Hello Carlo,

      thank you for your fast response.

      So far, I understand that my F-value obtained from xtreg equals the result from testparm y_perf x_in control1 control2 control3 control4 contol5 i.year.
      Whereas reg tries to caluclate the f-value from testparm y_perf x_in control1 control2 control3 control4 contol5 i.year i.firm (constraints are dropped) and fails because i have too many clusters. Is the F-value from xtreg still a valuable F-value for my entire model, that I can report with my results?

      Also, since my standard errors and the significance for the variables differ in both models, which are the ones to work with?

      Code:
      . xtreg y_perf x_in control1 control2 control3 control4 contol5 i.year, fe vce(cluster firm)
      
      Fixed-effects (within) regression               Number of obs     =        156
      Group variable: firm                            Number of groups  =         42
      
      R-sq:                                           Obs per group:
           within  = 0.3071                                         min =          1
           between = 0.0156                                         avg =        3.7
           overall = 0.0164                                         max =          9
      
                                                      F(16,41)          =       5.09
      corr(u_i, Xb)  = -0.8090                        Prob > F          =     0.0000
      
                                                (Std. Err. adjusted for 42 clusters in firm)
      --------------------------------------------------------------------------------------
                           |               Robust
                    y_perf |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
      ---------------------+----------------------------------------------------------------
                      x_in |  -.0016055    .036306    -0.04   0.965     -.074927     .071716
                  control1 |  -.0136104   .0218264    -0.62   0.536    -.0576897    .0304689
                  control2 |   .0071329   .0112361     0.63   0.529    -.0155588    .0298246
                  control3 |  -.0431375    .017394    -2.48   0.017    -.0782654   -.0080096
                  control4 |   -.103995   .0686669    -1.51   0.138    -.2426706    .0346807
                  control5 |   .0652812   .0413088     1.58   0.122    -.0181436    .1487061
                           |
                      year |
                     2001  |   .0152089    .014029     1.08   0.285    -.0131232    .0435411
                     2002  |   .0183067   .0078771     2.32   0.025     .0023986    .0342147
                     2003  |   .0117799   .0092233     1.28   0.209     -.006847    .0304068
                     2004  |   .0074793     .01488     0.50   0.618    -.0225715    .0375301
                     2005  |   .0078575   .0200241     0.39   0.697    -.0325821     .048297
                     2006  |  -.0002566    .009975    -0.03   0.980    -.0204015    .0198883
                     2007  |   .0043551   .0107743     0.40   0.688    -.0174041    .0261143
                     2008  |   .0119185   .0101989     1.17   0.249    -.0086786    .0325156
                     2009  |    .008391   .0139991     0.60   0.552    -.0198807    .0366628
                     2010  |   -.001839   .0145292    -0.13   0.900    -.0311812    .0275033
                           |
                     _cons |   .7855187   .2795403     2.81   0.008     .2209755    1.350062
      ---------------------+----------------------------------------------------------------
                   sigma_u |  .07559994
                   sigma_e |  .02468062
                       rho |  .90368654   (fraction of variance due to u_i)
      --------------------------------------------------------------------------------------
      
      
      . reg y_perf x_in control1 control2 control3 control4 contol5 i.year i.firm, vce(cluster firm)
      
      Linear regression                               Number of obs     =        156
                                                      F(15, 41)         =          .
                                                      Prob > F          =          .
                                                      R-squared         =     0.8451
                                                      Root MSE          =     .02468
      
                                                (Std. Err. adjusted for 42 clusters in firm)
      --------------------------------------------------------------------------------------
                           |               Robust
                    y_perf |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
      ---------------------+----------------------------------------------------------------
                      x_in |  -.0016055   .0432387    -0.04   0.971    -.0889279    .0857169
                  control1 |  -.0136104   .0259942    -0.52   0.603    -.0661067    .0388859
                  control2 |   .0071329   .0133816     0.53   0.597    -.0198918    .0341576
                  control3 |  -.0431375   .0207154    -2.08   0.044    -.0849731   -.0013018
                  control4 |   -.103995    .081779    -1.27   0.211     -.269151    .0611611
                  control5 |   .0652812   .0491968     1.33   0.192    -.0340738    .1646362
                           |
                      year |
                     2001  |   .0152089   .0167079     0.91   0.368    -.0185333    .0489512
                     2002  |   .0183067   .0093812     1.95   0.058    -.0006391    .0372524
                     2003  |   .0117799   .0109846     1.07   0.290    -.0104039    .0339637
                     2004  |   .0074793   .0177214     0.42   0.675    -.0283098    .0432684
                     2005  |   .0078575   .0238478     0.33   0.743    -.0403041    .0560191
                     2006  |  -.0002566   .0118797    -0.02   0.983    -.0242482     .023735
                     2007  |   .0043551   .0128317     0.34   0.736    -.0215591    .0302693
                     2008  |   .0119185   .0121464     0.98   0.332    -.0126116    .0364486
                     2009  |    .008391   .0166722     0.50   0.617    -.0252792    .0420613
                     2010  |   -.001839   .0173035    -0.11   0.916    -.0367842    .0331062
                           |
                      firm |
                            ...
                           |
                     _cons |   .8346736   .3063361     2.72   0.009     .2160153    1.453332
      --------------------------------------------------------------------------------------

      Comment

      Working...
      X