Announcement

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

  • Help me with Mediation analysis for panel data using SEM?

    Hi Statalist,
    1/My model has 1 Y variable, 1 X variable, 1 Mediation variable, and some control variables, all continuous. Data is a panel for 10 years. My concern is how to run SEM for a Mediation analysis of panel data. 2/ I've been watching this video by Stata Corp https://www.youtube.com/watch?v=f5G8K9AIlPw. Can I use this guidance for panel data? I don't know how to add control variables to the SEM model because the guidance did not mention it.
    Please give me some advice...
    Thank you so much.

  • #2
    The best advice is to read the help documentation for the mediate command. And Stata's PDF documentation for commands are always top notch. All point to something like the following, with y1 the outcome, m1 the mediator, t1 the treatment, and x1, x2, and x3 as covariates.
    Code:
    mediate (y1x1x2) (m1 x1 x3) (t1), vce(cluster cluster_id)

    Comment


    • #3
      Dear Erik,
      Thank you so much for your response, I have been finding guidance for months.
      I wish you all health and prosperity.

      Comment

      Working...
      X