Announcement

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

  • sem - visualizing interaction between latent variables

    Dear all,

    I would like to visualize a latent variable interaction after running sem in Stata 14. To interpret the interaction effect, I would like to plot the effects of the latent predictors on the latent dependent variable for different levels of the moderators (i.e., at 1 SD below and above the mean of the respective moderator). I first thought about using margins in combination with xblatent to get the values for drawing the interaction plot. However, I learnt that using margins in combination with xblatent is not possible.

    More detailed illustration: Following Marsh et al. 2004 (please find the reference below), the indicators of the latent interaction term were calculated by multiplying pairs of the (mean-centered) indicators involved in the interaction before running sem. The following code illustrates my model:

    Code:
    sem (A -> a1 a2 a3 a4) ///
    (B -> b1 b2 b3 b4)  ///
    (C -> c1 c2 c3 c4) /// mean-centered indicator variables
    (D -> d1 d2 d3 d4) /// mean-centered indicator variables
    (Interaction_C*D -> ia1 ia2 ia3 ia4) /// The indicators ia1-4 were calculated by multiplying matched pairs of the indicators of C & D before running sem (Marsh et al. 2004)
    (E -> f1 f2 f3 f4) ///
    (F -> g1 g2 g3 g4) ///
    (G -> h1 h2 h3 h4) ///
    (C <- A B) ///
    (E <- A B C D Interaction_C*D) ///
    (F <- A B C D) ///
    (G <- E F), cov(e.E*e.F) vce(sbentler) standardized
    Referring to the code above, what I would like to do is to visualize the effect of the latent variable interaction on E. Is there a way to get the values for the effects of the latent predictors (C & D) on the latent dependent variable (E) when the moderators are at 1 SD below or above their means?

    Reference:
    MARSH, Herbert W., WEN, Zhonglin, et HAU, Kit-Tai. Structural equation models of latent interactions: evaluation of alternative estimation strategies and indicator construction. Psychological methods, 2004, vol. 9, no 3, p. 275.

  • #2
    You will increase your chances of useful answer by following the FAQ on asking questions. You don't need to post the full model – a simple model with an interaction would illustrate your problem.

    I don't work with SEM, but if you look at the post estimation documentation you can generate scores for the latent variables. Given those, I would assume you can generate the interactions. You may need to artificially create observations for different values of those latent variables scores to do your plots.

    There may be a more efficient way, but I'm not particularly conversant with structural equation estimating. I should note that the SEM post estimation tools do not allow for margins on latent variables. Often when Stata does not calculate something it means that calculating that would probably not be sensible. So, I would be very careful about trying to gin up something that is essentially doing prediction of margins on latent variables.

    Comment


    • #3
      I wonder whether either the concept of variance-covariance or the concept of indirect and direct path would suit your needs.
      Best regards,

      Marcos

      Comment


      • #4
        Thank you very much for your helpful answers!

        I may have found a simple workaround to plot the latent interactions with an Excel template that is available on the web: http://www.jeremydawson.co.uk/slopes.htm

        To plot the interaction, the Excel template requires the following information:
        - unstandardized regression coefficient of the independent variable
        - unstandardized regression coefficient of the moderator
        - unstandardized regression coefficient of the interaction
        - intercept/constant
        - mean of independent variable
        - mean of the moderator
        - standard deviation of the independent variable
        - standard deviation of the moderator

        The unstandardized regression coefficients are included in the Stata output. However, I am still struggeling to solve the following issues:
        - How/Where can I see the intercept of the moderated path in the Stata output of my SEM?
        - What mean values and standard deviations should be filled in the template (estimated/predicted vs. observed values)?

        Thank you again for your help!
        Best,
        Daniel

        Comment


        • #5
          I fail to understand what you really wish. Stata has a whole machinery concerning SEM. You don't need other package for that matter. The link you shared didn't mention SEM. Please type - help sem postestimation. Please make sure you have a good grasp of the SEM commands as shown in the Stata Manual. That said, the sem graphs may be provided by typing - sembuilder - in the command window.
          Best regards,

          Marcos

          Comment


          • #6
            Thank you for your reply! I will check the sem postestimation commands in greater detail and share the code once I found a solution.

            Comment


            • #7
              Hi Daniel. In the following lines of code...

              Code:
              (E -> f1 f2 f3 f4) ///
              (F -> g1 g2 g3 g4) ///
              (G -> h1 h2 h3 h4) ///
              ...why have the letter mismatch? In other words, why not do this?

              Code:
              (E -> e1 e2 e3 e4) ///
              (F -> f1 f2 f3 f4) ///
              (G -> g1 g2 g3 g4) ///
              The mismatch, it seems to me, is a likely source of confusion and silly mistakes.

              Thanks for clarifying.
              --
              Bruce Weaver
              Email: [email protected]
              Version: Stata/MP 18.5 (Windows)

              Comment


              • #8
                Thank you for pointing this out! You are completely right. Please excuse the confusion!

                Comment

                Working...
                X