Announcement

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

  • How to Calculate Direct and Indirect Effects in gSEM with Categorical Mediator & Gamma distribution Y?

    Dear Stata experts,

    If my independent variable (X) is categorical, my mediator (M) is also categorical, and my dependent variable (Y) is a positively skewed continuous variable, I would like to conduct a mediation analysis using gSEM in Stata.

    However, my model specifications are as follows:
    • X→Y uses family(gamma) link(log)
    • M→Y uses family(gamma) link(log)
    • X→M uses family(multinomial) link(logit)
    Given this setup, I have the following questions:
    1. How should I calculate the direct and indirect effects?
    2. How can I compute the proportion of the total effect accounted for by the direct and indirect effects?
    Below is my command:
    gsem (j1w8somatization <- i.traj_Group b1.j1familycohension_2group b1.parenting_severity_2group i.as110000_tri i.as247000_tri i.sex i.j1w1somatization_2group i.j1w1parentedu i.parmarrige i.sibling, family(gamma) link(log) ) (i.traj_Group <- b1.j1familycohension_2group b1.parenting_severity_2group i.as110000_tri i.as247000_tri i.sex i.j1w1somatization_2group i.j1w1parentedu i.parmarrige i.sibling) [pweight=ipw]

    Any guidance on this would be greatly appreciated!
Working...
X