Announcement

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

  • Clustering standard errors for heteroskedasticity and firm clustering

    Hello,

    I am wondering if someone can confirm that the below code is correct. Specifically, I want to make sure that I am properly adjusting the standard errors based on a paper that I am trying to follow, where the author adjusted standard errors for heteroskedasticity (White 1980) and firm clustering (Petersen 2009).
    My code is:


    Code:
    reghdfe dependent_variable variable_of_interest control , absorb(firm year) vce(cluster firm)
    Is the above code properly adjusting the standard errors for heteroskedasticity and firm clustering? I read section 20.21.2 from "https://www.stata.com/manuals13/u20.pdf#u20.21Obtainingrobustvarianceestimates" and I am still a bit unsure.

    Thank you in advance

  • #2
    If you have panel data with \(N>>T\), Stock and Watson (2008) show that clustering using the panel identifier results in standard errors that are robust to the presence of heteroskedasticity and arbitrary forms of serial correlation. But you need to have enough clusters, otherwise the bias from a small number of clusters outweighs any benefits from clustering (rule of thumb 30+ clusters are needed). By the way, clustering using the panel identifier is the default for panel data estimators in Stata (xt-prefixed estimation commands) if invoking the -robust- option. See more discussion on this in the PDF manual entry of xtreg.

    Reference:
    Stock, J. H., and M. W. Watson. 2008. Heteroskedasticity-robust standard errors for fixed effects panel data regression. Econometrica 76: 155–174. https://doi.org/10.1111/j.0012-9682.2008.00821.x.
    Last edited by Andrew Musau; 26 Apr 2023, 17:12.

    Comment


    • #3
      Hi Andrew,

      Thank you for the response. If I understand correctly then, by using
      Code:
      vce(cluster firm)
      , which has about 200 clusters, then I am controlling for both heteroskedasticity and firm clustering?

      Comment


      • #4
        Yes, provided

        Code:
        xtset firm year
        issues no error message, i.e., you have firm-level panel data.

        Comment


        • #5
          Thank you

          Comment

          Working...
          X