Announcement

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

  • Two-way clustering, by firm and year

    Dear Stata Users,

    Can you, please advise me on the way of clusterization of residuals by firm and year. I use the following comman:

    Code:
    reghdfe y x1 x2 x3, absorb(gvkey_destrfyear) vce(cluster gvkey_destr fyear)
    Will this be the same if I group firm identifier (gvkey) with the year and then use this group while clustering? Something like this:

    Code:
     egen res_cl = group(fyear gvkey_destr)
    areg y x1 x2 x3 i.fyear, absorb(gvkey_destr) vce(cluster res_cl)
    The reason why I ask this, is that when I use models that dont have dummies as exogenous variables, the results are almost the same. However, once there is a dummy, the coefficient of the dummy variable changes dramatically.

    Please, advise me this issue.

  • #2
    I think you're treating the fixed effects differently in the two estimators. The first uses what I assume is fyear and gvkey_destr (You ran them together in the example), but the second only absorbs
    gvkey_destr.

    Comment

    Working...
    X