Announcement

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

  • Double-cluster standard errors XTREG

    Dear Stata users,

    I am currently working on a revision in which a reviewer has requesred that I estimate standard errors clustered at both the household and years levels.

    My dataset us a household panel where each household (hh_id) is observed for at least three years (year). To leverage the longitudinal nature of the data, I am estimating my model with household fixed effects using xtreg in Stata.

    However, when I run my main regression with the command:

    xtreg y x1 x2, fe vce(cluster group)

    Where I define group as group=group(hh_id year), I received the following error:

    "panels are not nested within clusters"

    This prevents me from applying double-cluster standard errors in a fixed effects specification using xtreg. I would appreciate any guidance on how to properly implement double-clustered standard errors in this setup or alternative methods compatible with household fixed effects.

    Thank you very much for your assistance!

  • #2
    Ignacio:
    see if the Stata community-contributed module -reghdfe- can be helpful.
    Kind regards,
    Carlo
    (StataNow 18.5)

    Comment

    Working...
    X