Announcement

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

  • Fixed effects and First Difference Estimators

    Hello,
    I have panel data corresponding to 8 years and a number of variables involving a model. I'm supposed to show that Fixed Effects gives the same results as First Differences, when this last estimation is done applying GLS. I obtained the fixed effects part by using the command xtreg dep.variable ind.variables (there are 16), fe. But I don't know how to do FD, and estimating through GLS. I've tried a number of commands, yet i can't seem to obtain the same results as in the first part. Any suggestions? Thanks,

  • #2
    The FE estimator is indeed equivalent to an FD-GLS estimator assuming (and imposing) that the errors \( e_{it} \) for the level equation are i.i.d. \( (0, \sigma^2) \), and therefore \( Var (\Delta e_{it}) = 2 \sigma^2 \) and \( Cov (\Delta e_{it}, \Delta e_{i,t-1}) = - \sigma^2 \). Since \( \sigma^2 \) is constant for all \( i \) and \( t \) it does not affect the GLS estimates.

    To my knowledge, none of the standard Stata commands allows to easily estimate a model with this particular covariance structure. And because of the equivalence to the FE estimator, there is also no need for it.
    https://www.kripfganz.de/stata/

    Comment


    • #3
      To add, there is a degenerate case where you can easily observe the equivalence, namely when you only have 2 time periods:
      Code:
      . webuse abdata, clear
      
      . drop if year < 1981 | year > 1982
      (751 observations deleted)
      
      . xtreg n w k, fe
      
      Fixed-effects (within) regression               Number of obs      =       280
      Group variable: id                              Number of groups   =       140
      
      R-sq:  within  = 0.5324                         Obs per group: min =         2
             between = 0.8228                                        avg =       2.0
             overall = 0.8201                                        max =         2
      
                                                      F(2,138)           =     78.55
      corr(u_i, Xb)  = 0.6901                         Prob > F           =    0.0000
      
      ------------------------------------------------------------------------------
                 n |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
      -------------+----------------------------------------------------------------
                 w |  -.7887733   .1055578    -7.47   0.000    -.9974932   -.5800534
                 k |   .4335047   .0524917     8.26   0.000     .3297126    .5372968
             _cons |   3.690322   .3299445    11.18   0.000     3.037922    4.342723
      -------------+----------------------------------------------------------------
           sigma_u |  .78660142
           sigma_e |  .08469421
               rho |   .9885398   (fraction of variance due to u_i)
      ------------------------------------------------------------------------------
      F test that all u_i=0:     F(139, 138) =    72.89            Prob > F = 0.0000
      
      . reg D.(n w k), noconstant
      
            Source |       SS       df       MS              Number of obs =     140
      -------------+------------------------------           F(  2,   138) =   78.55
             Model |  2.25387742     2  1.12693871           Prob > F      =  0.0000
          Residual |  1.97977791   138  .014346217           R-squared     =  0.5324
      -------------+------------------------------           Adj R-squared =  0.5256
             Total |  4.23365532   140  .030240395           Root MSE      =  .11978
      
      ------------------------------------------------------------------------------
               D.n |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
      -------------+----------------------------------------------------------------
                 w |
               D1. |  -.7887733   .1055578    -7.47   0.000    -.9974931   -.5800534
                   |
                 k |
               D1. |   .4335047   .0524917     8.26   0.000     .3297126    .5372968
      ------------------------------------------------------------------------------
      Here, FE is not only equivalent to FD-GLS but also to FD-OLS because there is only one time period left for the first-differenced equation and the variance estimate is a scalar that drops out.
      https://www.kripfganz.de/stata/

      Comment


      • #4
        Thank you for your answer. Is there no way in which I can create new differentiated variables and then regress them using GLS though?? I've tried regress D.( ... ), noconstant, and, thought i ommits the variables that FE does (rightly so), the coefficients are off by a few decimal points.

        Comment


        • #5
          If you just use regress with first-differenced data for more than 2 time periods, you are ignoring the serial correlation of the first-differenced residuals \( \Delta e_{it} \). The FE estimator would be more efficient in this case if the untransformed errors \( e_{it} \) are indeed serially uncorrelated. To the contrary, FD-OLS may be more efficient than FE if the levels error term \( e_{it} \) exhibits strong serial correlation. If you are using a GLS estimator, say xtgls, it typically estimates an unrestricted covariance matrix or imposes restrictions that are different than the above mentioned structure. This difference in the variance matrix estimate is why you do not get exactly the same results as with the FE estimator.
          https://www.kripfganz.de/stata/

          Comment

          Working...
          X