Announcement

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

  • Panel Data Robust Standard Errors...

    Hi all,

    I have been running panel data fixed effects models with robust standard errors but do not get the intuition behind why I am doing this. I understand clustered standard errors for pooled OLS models (because of correlation in the error across time), but am confused with the fixed effects, so it would be great if someone could clarify why I am doing this. Essentially, all I know is that it is robust to heteroskedasticity and autocorrelation, but do not see how it applies to my panel data. Thanks in advance!

  • #2
    Josh:
    it s difficult to advice positively without seeing what you typed and what Stata gave you back (i.e., your panel data).
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Hi Carlo,

      Apologies! Here is what I typed:

      Code:
      xtreg Y X1 X2 X3, fe vce(robust)
      That was no error message, just a bunch of standard errors that I am unsure of how to interpret. Hopefully this is fine! Thanks!

      Comment


      • #4
        Josh:
        how can we help you out in interpreting standard errors without seeing what Stata gave you back, too (please, see FAQ 12. Thanks)?
        Kind regards,
        Carlo
        (Stata 19.0)

        Comment


        • #5
          Josh: I assume that you are using a version of Stata where the "robust" option is the same as "cluster(id)," where "id" is the cross section identifier. It seems that way since you said the standard errors are "robust to heteroskedasticity and autocorrelation." That is what you want, assuming you have a reasonable large cross section. (See Carlo's advice on showing Stata output; it is much easier to receive advice on this board. Having said that, you are asking a theoretical question.)

          The reason for robust standard errors in panel data is because the idiosyncratic errors can have heteroskedasticity or autocorrelation, or both. In Stata's notation, the composite error term is u(i) + e(i,t). Now, pooled OLS leaves u(i) in the error term, which is an obvious source of autocorrelation. But e(i,t) can be autocorrelated. And both u(i) and e(i,t) can both have heteroskedasticity. Clustering handles all of these issues.

          In the FE case, u(i) is removed. But e(i,t) is still there. So you still want your inference robust to heteroskedasticity and autocorrelation. If you have been taught that the e(i,t) are supposed to be IID then you have been taught incorrectly.

          Hope that helps.

          JW

          Comment


          • #6
            Originally posted by Jeff Wooldridge View Post
            Josh: I assume that you are using a version of Stata where the "robust" option is the same as "cluster(id)," where "id" is the cross section identifier. It seems that way since you said the standard errors are "robust to heteroskedasticity and autocorrelation." That is what you want, assuming you have a reasonable large cross section. (See Carlo's advice on showing Stata output; it is much easier to receive advice on this board. Having said that, you are asking a theoretical question.)

            The reason for robust standard errors in panel data is because the idiosyncratic errors can have heteroskedasticity or autocorrelation, or both. In Stata's notation, the composite error term is u(i) + e(i,t). Now, pooled OLS leaves u(i) in the error term, which is an obvious source of autocorrelation. But e(i,t) can be autocorrelated. And both u(i) and e(i,t) can both have heteroskedasticity. Clustering handles all of these issues.

            In the FE case, u(i) is removed. But e(i,t) is still there. So you still want your inference robust to heteroskedasticity and autocorrelation. If you have been taught that the e(i,t) are supposed to be IID then you have been taught incorrectly.

            Hope that helps.

            JW
            Apologies to play the necromancer and revive this thread, but I'd like to ask a follow-up question to ensure I understood the last paragraph properly.* Is the iid-assumption only required if you calculate standard errors the default way (i.e. not through cluster-robust inference)? If so, which assumptions are left to ensure consistency of the coefficient estimates in fixed effects estimation?

            Is it the following?

            1) mean zero errors: E[e_it] = 0
            2) uncorrelated with regressors: E[e_it|x_it] = 0
            3) no perfect collinearity

            * I read it at the time, found it curious but moved on. Now I am working on my own paper, and understanding this properly has gone from "should think about this at some point" to "should think about this before proceeding".

            Comment


            • #7
              Dear Jeff Wooldridge,

              Thank you for your detailed explanation above. The need to cluster with fixed effect regression is clear: although u(i) is removed but we still have e(i,t) to worry about and thus we cluster. However, when comparing random effects (xtreg, re cluster()) and pooled OLS with clustered standard errors (reg, cluster()), I have hard time understanding how one should choose between the two. Random effects don’t get rid of u(i) and therefore clustering addresses heteroskedasticity and autocorrelation for both terms i.e u(i) and e(i.t) but so should pooled OLS clustering. Is there a difference and what should be the guiding principle for choosing one over the other.
              Thank you.

              Comment


              • #8
                Dear all,

                I run a random effects model for longitudinal data with an unbalanced panel.
                Now I want to test the assumptions of the regression model I got.

                I typed
                Code:
                xtreg y x1 x2 x3, re robust
                In this case the re-model is robust to heteroskedasticity. And i would conclude to the answer of Jeff Wooldridge in #5, that it is also robust to autocorrelation.
                But in literature I just got information that it is robust for heteroskedasticity. Could you tell me some note of literature, where it sais, that it is also robust to autocorrelation?

                A second question is, how can I test for linearity? Is there any possibiliy to test it for my re-model in stata? Or do I have to assume it theoretical only?

                Thank you in advance!

                Mimi

                Comment


                • #9
                  In xtreg, stata automatically clusters on your panel variable when you type robust (in fact, it also does this when you don't).

                  Comment

                  Working...
                  X