Announcement

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

  • GSEM: Mediation and GSEM

    Hi all

    I am using path analysis to find the direct and mediation effect of a variable. It is a basic mediation model using GSEM, similar to example 42g of the STATA manual on SEM (https://www.stata.com/manuals13/sem.pdf).

    I cant figure out how to include fixed effects. I have 2 fixed effects and have to many observations to include indicator variables. Is there another way I include double fixed effects in a GSEM mediation model?

    Thanks

  • #2
    I know this an old question but I still haven't figured out how to do this. I want to use path analysis but need to include 2 fixed effects (year and firm). Any help would be appreciated.

    Comment


    • #3
      I figured it out and just want to post the solution here - should somebody else need to do something similar. I used the center, inplace command to center all variables used in the equation by fixed effect A. I then centered the previously centered variables by fixed effect B. I then once again centered the previously centered variables by fixed effect A and repeat this process a few times. This is what REGHDFE does. I then used the centered variables in GSEM. I know the standard errors might be incorrect but I cluster at a "low" level which should mitigate this concern.

      Just wanted to put it out there if somebody else needs to solve a similar problem.

      Comment

      Working...
      X