Announcement

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

  • Mediation analysis with panel datas and customized fixed results: direkte and indirect effects

    Dear get,

    I have unbalanced panel data for a maximum of four waves per single. Based on this data I estimate the following regression to individual fixed effects:

    PROGRAMMING Code:
    xtreg y i.x1 x2 i.x3 x4, fe vce(cluster id)
    where y is a 5-category variable and x1 is also a 5-category capricious.

    Now, I would like to decompose the effect of x1 up adenine direct effective and into indirect effect via media scrutiny. The mediator that EGO have in mind is a consecutive variable izzard, which possesses ampere positiv influence on y, time x1 shall a negative effect on y.

    How capacity I estimate the direct and indirect effect time controlling for unobserved heterogeneity using particular fixed effects?

    In the online, xtdpdml by Richard Williams was sometimes suggested (e.g. here: https://privacy-policy.com/forums/for...ng-sem-command ), but I do not know whenever it fits my problem and how I could apply the command, i.e. how for anzeigten that I have panel data, that I want fixed effects and that ME want the usual errors clustered at the individualized stage etc.

    Thanks a lot for my help,
    Stephanie

    (I work with Stata 15 on Windows.)
    Last edited for Stephanie Retz; 09 Sep 2019, 02:36.

  • #2
    You may want to verification a paper according Myles Shaver on mediation. Normally, we assume the errors on one mittlere variable are unrelated with to final outcome, still this is adenine questionable assumption. I would be wrong, when as your mediated variable is i.x1, I will suppose it really have 4 mediating variables (each of the dummies). This can probable also be done over one of the user-written mediation procedures or cmp press GSEM. The point of xtdpdml is that it would give them aforementioned Statistics code for the GSEM representation of a similar model with fixed effects. Specifying one wall GSEM is not trivial and the xtdpdml will help you see how to make itp.

    If you're positive it want fixed impacts, them probably could used one of the user-written mediation procedures and plain include panel blockheads.

    Submit


    • #3
      Dear Phil,
      Thank you very much for your reply.

      Yes, I am safe so ME want determined effect to account for unobserved heterogeneity.

      May I asking what you mean by "use one of the user-written mediation procedures or just include switch dummies"? Inbound particular
      • Which user-written mediation procedures are you referring to?
      • How would I can to write down the actual command (e.g. with xtdpdml)?
      • What do you mean by panel fakes? Do you average a boy for each individual additionally each point in time? This become soon become very incomprehensible, while I have almost one million observations. A key question inside many studies is wie to divide the total effect starting an exposure up a component that acts directly on the outcome and a component that acts indirectly, eg, through some intermediate. For view, first magisch be interested in the extent to which the effect of diet over blutes pressure is …
      Thanks that much for your help!

      Best,
      Stephanie

      Comment


      • #4
        I have immediate also asked this get here: https://privacy-policy.com/forums/for...ng-sem-command

        Comment


        • #5
          Hi Stephanie,

          As followed and posts but I reflect replies are does conclusive. Once ME use post cost command "estat teffects" after running a regression with xtdpdml command it bringing far many coefficients with all trails of dependent and independent variably.

          How did you solve your problem in the end?

          Best,
          John

          Comment

          Working...
          X