Moderated mediation - get details (intercepts) for simple slopes plot

56 views
Skip to first unread message

Lukas Wallrich

unread,
May 24, 2019, 9:53:45 AM5/24/19
to lavaan
Dear all,

I am running the model below to test for moderated serial mediation. With that, I can get the total effects at different levels of the moderator, which I would take to be the slopes for a simple slopes plot of the total effect. However, could you advise how I can get the intercepts for these plots? I.e. in this model the intercepts for UniSelfDiscB at different levels of SixtFNegContBlack.c?

Any advice would be much appreciated.

All the best,

Lukas

--

Path.model <- "
             #Model
             UniSelfDiscB ~ c*SixthFPosContBlack.c  + dd*ActiveAvoidanceBlack_1 +cx*SixthFPosContBlack.c:SixtFNegContBlack.c+cn*SixtFNegContBlack.c #+ bbb*ContSelfEfficBlack_1
             ContSelfEfficBlack_1 ~ a*SixthFPosContBlack.c +ax*SixthFPosContBlack.c:SixtFNegContBlack.c + an*SixtFNegContBlack.c
             ActiveAvoidanceBlack_1 ~ b*ContSelfEfficBlack_1 #+ aa*SixthFPosContBlack.c

              #Covars
             UniSelfDiscB ~ srcINT
             
             #Mean of moderator
             SixtFNegContBlack.c ~ SixtFNegContBlack.c.mean*1
             
             #Variance of moderator
             SixtFNegContBlack.c ~~ SixtFNegContBlack.c.var*SixtFNegContBlack.c
             
             #Indirect
             MMM := a*b*dd
             #M := a*bbb
             #indirect := MMM+M
             
             #Indirect effects conditional on moderator (a + ax*ModValue)*chain
             indirect.SDbelow := (a + ax*(SixtFNegContBlack.c.mean-sqrt(SixtFNegContBlack.c.var)))*b*dd # + (a + ax*(SixtFNegContBlack.c.mean-sqrt(SixtFNegContBlack.c.var)))*bbb
             indirect.mean := (a + ax*(SixtFNegContBlack.c.mean))*b*dd # + (a + ax*(SixtFNegContBlack.c.mean)))*bbb
             indirect.SDabove := (a + ax*(SixtFNegContBlack.c.mean+sqrt(SixtFNegContBlack.c.var)))*b*dd #+ (a + ax*(SixtFNegContBlack.c.mean-sqrt(SixtFNegContBlack.c.var)))*bbb

            #Direct effects conditional on moderator (c + cx*ModValue)
            direct.SDbelow := c + cx*(SixtFNegContBlack.c.mean-sqrt(SixtFNegContBlack.c.var)) 
            direct.mean := c + cx*(SixtFNegContBlack.c.mean)
            direct.SDabove := c + cx*(SixtFNegContBlack.c.mean+sqrt(SixtFNegContBlack.c.var))
            
             #Total effects
             total.SDbelow := direct.SDbelow + indirect.SDbelow
             total.mean := direct.mean + indirect.mean
             total.SDabove := direct.SDabove + indirect.SDabove
             
                          
             #Proportion mediated conditional on moderator  
             prop.mediated.SDbelow := indirect.SDbelow / total.SDbelow
             prop.mediated.mean := indirect.mean / total.mean
             prop.mediated.SDabove := indirect.SDabove / total.SDabove

  "

Terrence Jorgensen

unread,
May 26, 2019, 3:41:51 PM5/26/19
to lavaan
how I can get the intercepts for these plots? I.e. in this model the intercepts for UniSelfDiscB at different levels of SixtFNegContBlack.c?

You would need to add intercepts to the plot, then define simple intercepts just as you define simple slopes (assuming that syntax works).  Find formulas here:


Terrence D. Jorgensen
Assistant Professor, Methods and Statistics
Research Institute for Child Development and Education, the University of Amsterdam

Reply all
Reply to author
Forward
0 new messages