Announcement

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

  • xtreg: Panels are not nested within clusters

    Hi, Stata forum,

    I am running firm level regression using one country panel data.

    For firm:
    xtset id year
    xtreg dep indep1 indep2, fe cluster(id)

    Then, I also wanted to try industry-year fixed effect.
    So i create new var:

    egen industry_year = group (industry year)
    then,

    xtset industry_year
    xtreg dep indep1 indep2, fe cluster(industry_yea)

    And i get the error "xtreg: Panels are not nested within clusters".
    Could you please explain me or recommend me what I can do? I am very confused of the economic meaning of this fixed effect and how to use it
    Thank you very much!






  • #2
    Su:
    you may want to consider the community-contributed programme -reghdfe- (just type -search reghdfe- from within Stata to spot and install it).
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment

    Working...
    X