Announcement

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

  • How can coefficient of group-mean be estimated while controlling for group fixed effect with dummies?

    Hello, everyone!
    I'm encounting a confusing problem when running a model including both individual-level variables(age,gender, etc.) and group-level varable(group-level mean). The data is cross-sectional micro-level data(survey data).
    I am confusing because when I estimate the model y=a1*x1+a2*x1(bar)+a3*x2 with code reg y x1 x1(hat) x2 i.group (x1(bar) is derived by averaing x1 over the group), i should not have gauged the coefficient of a2. It has no variation across the group, and when controlled the group fixed effect with dummies, how can that coefficient be possibaly estimated?
    And how can the estimated coefficient of a2 be interpreted under such condition? other things equal, the same level of x1 and in the same group, one unite increase in the group mean (x1_bar) will lead to a2 unit change in y? how can the group mean change controlling in the same group??
    I really do not understand what is wrong as it can be estimated following the above-mentioned code in Stata
    Looking forward to some kind responses!
    Best regards!

  • #2
    Kelsi: As per the FAQ, you will get better answers if you show your data set, Stata code, and output.

    Is this what you did?

    Code:
    egen x1bar = mean(x1), by(group)
    reg y x1 x1bar x2 i.group, vce(cluster group)
    If there are no missing data, then you are correct: the coefficient on x1bar is not identified and will drop out. You are using the group fixed effects estimator. So my guess is you have missing data on x2 and you used more than the complete cases when obtaining x1bar. As I showed in my 2019 Journal of Econometrics paper, you only get equivalence between adding the group means and putting in group fixed effects when the group means are obtained using only the complete cases. What you are recovering above are the fixed effects estimates. To get the equivalence, try this:

    Code:
    gen s = (y != .) & (x1 != .) & (x2 != .)
    egen x1bar = mean(x1) if s, by(group)
    reg y x1 x1bar x2, vce(cluster group)
    reg y x1 x1bar x2 i.group, vce(cluster group
    Now both regressions give you FE, and x1bar should drop out of the second.

    It's possible something else is happening, but this is my best guess.

    Comment


    • #3
      Originally posted by Jeff Wooldridge View Post
      Kelsi: As per the FAQ, you will get better answers if you show your data set, Stata code, and output.

      Is this what you did?

      Code:
      egen x1bar = mean(x1), by(group)
      reg y x1 x1bar x2 i.group, vce(cluster group)
      If there are no missing data, then you are correct: the coefficient on x1bar is not identified and will drop out. You are using the group fixed effects estimator. So my guess is you have missing data on x2 and you used more than the complete cases when obtaining x1bar. As I showed in my 2019 Journal of Econometrics paper, you only get equivalence between adding the group means and putting in group fixed effects when the group means are obtained using only the complete cases. What you are recovering above are the fixed effects estimates. To get the equivalence, try this:

      Code:
      gen s = (y != .) & (x1 != .) & (x2 != .)
      egen x1bar = mean(x1) if s, by(group)
      reg y x1 x1bar x2, vce(cluster group)
      reg y x1 x1bar x2 i.group, vce(cluster group
      Now both regressions give you FE, and x1bar should drop out of the second.

      It's possible something else is happening, but this is my best guess.

      Thank you so much for your response! I will try to confirm.
      So that means the previous estimate of a2 is fake due to the differnces in the data generating process, and there's no other meaningful interpretation for it. Am I correct?
      btw,wow, are you Jeffrey Wooldridge who wrote may econometric books?
      Best regards!

      Comment

      Working...
      X