Announcement

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

  • Moderated treatment effect in mediation model

    Dear all,

    I am currently estimating a multiple mediation model using the user written command CMP. My model looks like this:

    Code:
    cmp (outcome= i.treatment i.mediator1 i.mediator2 i.mediator3 age female income) ///
        (mediator1= i.treatment age female income) ///
        (mediator2= i.treatment age female income) ///
        (mediator3= i.treatment age female income) ///
        , indicator($cmp_oprobit $cmp_probit $cmp_probit $cmp_probit) covariance(unstructured)
    Where "outcome" has 3 ordered categories, the mediators are binary, and three control variables are included (age female income).

    Using lincom, I have no problems deriving the direct and indirect treatment effects. However, what I would now like to derive are moderated mediation effects.
    In other words, I would like to know whether the direct and indirect treatment effects differ between, e.g., female and male participants.

    My guess is, that I need to include "i.treatment##i.female" into my model, but do I then need to include this in all 4 equations? And how would I compute the direct and indirect effects conditional on "female = 0" and "female = 1"?

    Any help is greatly appreciated.

  • #2
    Paul,

    You will need to add interactions to your model, but it is not clear to me which parts of the mediation you want to test for moderation. I suggest you take a long look at the UCLA OARC pages on moderated mediation in Stata. The first link has all the potential places in the SEM (similar to yours) in which the mediation could be moderated. The second link shows an example of a model with a categorical moderator. Since you are looking at a 0/1 moderator, you should be fine building off the syntax in the first link.

    Comment


    • #3
      Dear Erik,

      thank you for that link, what I want to examine is whether the path between the treatment and the mediatior is moderated (Model 2 on the UCLA website). In other words, I want to test whether the effect of the treatment on the mediators (treatment --> mediator1/2/3) is different between male and female participants.

      Kind regards

      Comment


      • #4
        Paul,

        Their code examines the mediation effect at different values of the continuous moderator (-1 SD, mean, and +1 SD). In your case, you are looking at a 0/1 moderator, so you will get mediated effects that contrast the X-->M effect for whichever group is the 1 category relative to the group that is the 0 category. You can drop the summarize and global coding and instead focus on creating the interaction manually or perhaps with Stata's # operator (I don't know if cmp accepts that). And then you will have three nlcom calls to test for moderated mediation (one for each mediator).

        Unfortunately, I don't know enough about how cmp saves results to be able to give you the exact code to give you further guidance. Note that in most base Stata commands such as sem/gsem (the latter of which you could use instead of cmp), the option coeflegend will provide you with details about how the coefficients are stored.
        Last edited by Erik Ruzek; 04 Dec 2024, 10:30. Reason: Syntax correction

        Comment


        • #5
          Update: I worked through the UCLA website and managed to get conditional indirect effects. However, this only led to another question: Since my mediators and moderator are binary and my outcome is ordinal, how would I interpret the indirect effects?

          Almost all sources consider continuous variables for both the outcome and the mediators (and the moderator), and so far, I have read that interpretation can get quite tricky when using different types of variables. Sadly, the book I read these past few days also only works with continuous variables (Hayes 2022 "Introduction to Mediation, Moderation, and Conditional Process Analysis: A Regression-Based Approach"). Is there any go-to literature that explains how to work with variables that are not continuous? And the UCLA website also only considers continuous outcomes and only ordinal moderators but not mediators.

          I tried to search the forum but didn't get far.

          Thank you

          Comment


          • #6
            Hi Paul,

            I'm sorry that I didn't read carefully enough on your first post. With non-continuous mediators and outcomes, the mediation estimation problem is complicated. You need to approach it from a different paradigm, unfortunately. Please see this earlier thread in which Marteen Buis posted a number of relevant references and also search Statalist for khb. I do not recall the degree to which the references in the thread I linked address the question of moderated mediation. That seems to be more prevalent in the SEM literature than the causal literature. Note that the causal mediation literature is another source you can turn to. In Stata 18, they introduced the mediate command, but there are user-written programs that do very similar things (medeff, med4way, etc).

            Comment

            Working...
            X