Announcement

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

  • Turning SPSS PROCESS Macro coding into Stata (sequential moderated mediation)

    Dear Stata Users,

    I've tried to compute a sequential moderated mediation model (IV -> Mediator 1 -> Mediator 2 -> DV conditional that the path"IV -> Mediator 1" is moderated by W).

    First, the coding for a normal moderated mediation is available at http://www.ats.ucla.edu/stat/stata/faq/modmed.htm. However, I am looking for the coding for sequential moderated mediation; does anyone have any hint how I can extend the normal coding to compute a sequential moderated mediation model?

    Second, I've obtained the SPSS coding for sequential moderated mediation. Is there any sort of guide or special command so I can use or translate the SPSS syntax in the STATA?

    Thanks,
    Mojtaba




  • #2
    Hello. Is the mediation sequential or not? Is W categorical or continuous?
    If mediation is sequential and W is not categorical, you can modelize it as follows:

    gen wxiv = iv*w
    sureg (m1 iv w wxiv cv) (m2 m1 x cv) (dv m2 m1 x cv)

    Then you can get significance of indirect effects as follows:

    nlcom _b[m1:iv]*_b[m2:m1] (here you test if m1 mediates iv->m2)
    nlcom _b[m1:iv]*_b[dv:m1] (here you test if m1 mediates iv->dv)
    nlcom _b[m2:iv]*_b[dv:m2] (here you test if m2 mediates iv->dv)
    nlcom _b[m1:iv]*_b[m2:m1]*_b[dv:m2] (here you test mediation is sequential)

    If mediation is not sequential and W is not categorical, you can modelize it as follows:

    gen wxiv = iv*w
    sureg (m1 iv w wxiv cv) (m2 x cv) (dv m2 m1 x cv)

    Then you can get significance of indirect effects as follows:

    nlcom _b[m1:iv]*_b[dv:m1] (here you test if m1 mediates iv->dv)
    nlcom _b[m2:iv]*_b[dv:m2] (here you test if m2 mediates iv->dv)

    Comment


    • #3
      The UCLA link in #1 no longer works. I suspect this is the new version of that same page: HTH.
      --
      Bruce Weaver
      Email: [email protected]
      Version: Stata/MP 18.5 (Windows)

      Comment


      • #4
        Originally posted by Daniel Ruiz-Palomo View Post
        Hello. Is the mediation sequential or not? Is W categorical or continuous?
        If mediation is sequential and W is not categorical, you can modelize it as follows:

        gen wxiv = iv*w
        sureg (m1 iv w wxiv cv) (m2 m1 x cv) (dv m2 m1 x cv)

        Then you can get significance of indirect effects as follows:

        nlcom _b[m1:iv]*_b[m2:m1] (here you test if m1 mediates iv->m2)
        nlcom _b[m1:iv]*_b[dv:m1] (here you test if m1 mediates iv->dv)
        nlcom _b[m2:iv]*_b[dv:m2] (here you test if m2 mediates iv->dv)
        nlcom _b[m1:iv]*_b[m2:m1]*_b[dv:m2] (here you test mediation is sequential)

        If mediation is not sequential and W is not categorical, you can modelize it as follows:

        gen wxiv = iv*w
        sureg (m1 iv w wxiv cv) (m2 x cv) (dv m2 m1 x cv)

        Then you can get significance of indirect effects as follows:

        nlcom _b[m1:iv]*_b[dv:m1] (here you test if m1 mediates iv->dv)
        nlcom _b[m2:iv]*_b[dv:m2] (here you test if m2 mediates iv->dv)
        Hey could someone please elaborate what the code would look like for just one mediator and how I could include the bootstrapping procedure in it? In other word do what SPSS does with its PROCESS tool in Stata?

        Comment

        Working...
        X