Announcement

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

  • The robust standard error in a fixed effects model

    Hi I have a question about the vce(robust) option. (the option is same with vce(cluster pid) in xtreg command)

    Consider a fixed effects model below
    y_{it} = a + X_{it}b + mu_i + e_{it}, where mu_i is the fixed effects.

    When we use the within-group regression (<=> fixed effects regression),
    you know we first transform the model and it is obvious that the transformed error terms, e_{it} - \bar{e}_i, are correlated across time.

    My question is that when we should use the vce(robust) option?
    1. e_{it}s are serially correlated?
    2. e_{it} - \bar{e}_i are serially correalted? (i.e. every time when we run xtreg _____, fe)

    In a sentence, I am not sure whether the vce(robust) option is applied to e_{it} or e_{it} - \bar{e}_i.

    Thank you.

  • #2
    The current thinking is that we should always use robust and clustered errors (vce(robust)) in panel data models as long as our cross sectional dimension is large enough.

    And you are not correct in what you are saying above. If you assume that e_{it} are uncorrelated, then after the fixed effects transformation the resulting error is uncorrelated too.

    Comment


    • #3
      Joro Kolev Thank you for your response! there is a curious part. I think, the transformed error could be correlated within group.
      Suppose that e_{it}s are iid across i and t. (the transformed errors are e_{it} - \bar{e}_i).
      Then the covariances are not zero I think, cov((e_{it} - \bar{e}_i), (e_{is} - \bar{e}_i)) where t != s.
      How could the transformed error be uncorrelated with each other? (of course between group the errors are uncorrelated)
      My question could be ridiculous sorry about that.
      Thank you for your detailed explanation.

      Comment


      • #4
        The within transformed idiosyncratic residuals are serially correlated but this serial correlation does not cause problems for the asymptotic variance of the FE coefficient estimates under the usual FE assumptions. Too lazy to write out the proof, but see chapter 10 of Wooldridge's MIT Press textbook.

        Comment


        • #5
          It appears that you are right, the transformed error appears autocorrelated:

          Here is some data, I am generating only the process mu_i + e_{it}

          Code:
          . clear
          
          . set obs 10000
          number of observations (_N) was 0, now 10,000
          
          . egen group = seq(), block(10)
          
          . gen e = rnormal()
          
          . gen mu = rnormal()
          
          . bysort group: replace mu = mu[1]
          (9,000 real changes made)
          
          . gen u = mu + e
          Now we do the within transformation:

          Code:
          . egen ubar = mean(u), by(group)
          
          . gen uwithin = u - ubar
          and now we check whether they are autocorrelated at order 1

          Code:
          . by group: gen t = _n
          
          . xtset group t
                 panel variable:  group (strongly balanced)
                  time variable:  t, 1 to 10
                          delta:  1 unit
          
          . reg uwithin l.uwithin
          
                Source |       SS           df       MS      Number of obs   =     9,000
          -------------+----------------------------------   F(1, 8998)      =    122.71
                 Model |  111.750475         1  111.750475   Prob > F        =    0.0000
              Residual |  8194.17742     8,998  .910666528   R-squared       =    0.0135
          -------------+----------------------------------   Adj R-squared   =    0.0133
                 Total |  8305.92789     8,999  .922983431   Root MSE        =    .95429
          
          ------------------------------------------------------------------------------
               uwithin |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
          -------------+----------------------------------------------------------------
               uwithin |
                   L1. |  -.1157541   .0104494   -11.08   0.000    -.1362373   -.0952709
                       |
                 _cons |   .0027875   .0100591     0.28   0.782    -.0169307    .0225056
          ------------------------------------------------------------------------------
          and they are.

          So something has jammed up in my memory.

          I remember that for e_{it} iid the within was the appropriate transformation, while for e_{it} a random walk the first difference was the appropriate transformation.

          Probably "appropriate" in my memory does not correspond to uncorrelated transformed error.

          Comment


          • #6
            Eric de Souza Joro Kolev Really thank you guys. Eric's comment helps me to find an appropriate resource and Joro's comment is really understandable and informative. I almost solved my problem. Thank you again.

            Comment


            • #7
              As Eric correctly points out, the within transformation induces serial correlation if there was none to begin with. In fact, under the “ideal” assumptions, the correlation is -1/(T -1). That’s why one must use care when testing for serial correlation.

              But as Eric also points out, the serial correlation created by the within transformation does not cause the usual standard errors to be incorrect. The simplified variance matrix holds. However, one must use care in estimating the error variance using the FE residuals. That’s where the df adjustment comes in.

              BTW, the serial correlation created by the within transformation is why one cannot use standard errors robust only to heteroskedasticity, at least for small T. Stock and Watson showed this formally. Stata dropped that option about 10 years ago, I think.

              Comment


              • #8
                Jeff Wooldridge Thank you professor. I found the contents related this topic from the MIT press book and the explanation you just said helped me with better understand.
                Last edited by Minchul Park; 23 Oct 2020, 05:25.

                Comment


                • #9
                  Professor Wooldridge,

                  Can you provide some intuition how comes that "the serial correlation created by the within transformation does not cause the usual standard errors to be incorrect"? Best if with a reference where this is explained in your textbooks?

                  I also think the point in your third paragraph you are making is novel, in the sense that I am familiar with the Stock and Watson paper in Econometrica showing that the robust only variance in fixed effects panel data is inappropriate (as familiar as I can be, carefully reading the paper when it came out, which is probably 10 years ago). I do not think that the point you are making in your third paragraph is conspicuously made in this paper.

                  Originally posted by Jeff Wooldridge View Post
                  As Eric correctly points out, the within transformation induces serial correlation if there was none to begin with. In fact, under the “ideal” assumptions, the correlation is -1/(T -1). That’s why one must use care when testing for serial correlation.

                  But as Eric also points out, the serial correlation created by the within transformation does not cause the usual standard errors to be incorrect. The simplified variance matrix holds. However, one must use care in estimating the error variance using the FE residuals. That’s where the df adjustment comes in.

                  BTW, the serial correlation created by the within transformation is why one cannot use standard errors robust only to heteroskedasticity, at least for small T. Stock and Watson showed this formally. Stata dropped that option about 10 years ago, I think.

                  Comment


                  • #10
                    Joro: I'm not sure I have good "intuition," but when you look at the formula for the FE estimator that is used to derive its asymptotic variance, it is the produce of the demeaned covariates and the demeaned errors. We can drop the demeaning of the error without changing the expression. So, the asymptotic variance actually can be written in terms of the original errors. So when those errors are homoskedastic and serially uncorrelated, the usual formula falls out. This is shown on p. 305 of 2e of my MIT Press book.

                    Jeff

                    Comment

                    Working...
                    X