Announcement

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

  • Panel fixed effect regression with multiple fixed effects

    Hello,

    I am working with a panel dataset that has 3 rounds. I am confused as to how do I incorporate multiple fixed effects into the model, what would be the command. For example: I want to assess the impact of a particular shock X at the household level on children's health Y. So the equation would mainly look like this:

    Yihvt= b0+b1Xhvt+ ah+av+at+ error

    here Yihvt is the measure of child health for child i in household h, village v and year t. ah is household fixed effects, av is village fixed effects and at is year fixed effects. I have created a unique id for child by grouping household id and member id. Then I declared the panel in the following way

    xtset child_id year

    I want to know what would be the command to estimate the above equation? how do I incorporate household fixed effects, village fixed effects and year fixed effects in the regression. I cannot create a dummy variable using household id as I have almost 5000 households, introducing this much regressors in the model seems a bad idea.

  • #2
    With

    xtset child_id year
    you have child fixed effects. If children do not change households, then household fixed effects are redundant in the presence of child fixed effects. Otherwise, assuming that the collinearity does not exist, you have the possibility of absorbing one of the FE variables with xtreg in Stata 18+. Assuming that the number of villages and years is not too large, you could do the following:

    Code:
    xtset child_id year
    xtreg Y X i.village i.year, fe absorb(household) cluster(child_id)
    Then you have to modify your equation to include child fixed effects. Otherwise, reghdfe from https://github.com/sergiocorreia/reghdfe allows you to absorb multiple fixed effects variables.

    Code:
    reghdfe Y X, absorb(village year household child) vce(cluster child_id)
    Also, you should have different notations for the error components, e.g., \(\mu_t\), \(\eta_i\), \(u_h\), etc. No need to include an intercept term because the child fixed effects imply an intercept for each child.
    Last edited by Andrew Musau; 27 Mar 2025, 06:51.

    Comment


    • #3
      Thank you so much,

      Comment

      Working...
      X