Greetings,
I am probably missing something pretty obvious but I was wondering how to reconcile the indirect effects generated by the estat teffects post-estimation command in a moderated mediation model with the calculations using the nlcom command as demonstrated here:
http://www.ats.ucla.edu/Stat/stata/faq/modmed.htm
More specifically, when I run Model 2 using the following syntax:
use http://www.ats.ucla.edu/stat/data/hsb2, clear
rename science y /* dependent variable *
rename math x /* independent variable */
rename read m /* mediator variable */
rename write w /* moderator variable 1 */
rename socst z /* moderator variable 2 */
quietly summarize w
global m=r(mean)
global s=r(sd)
generate wx=w*x /* moderator 1 by iv interaction */
generate mx=m*x /* mv by iv interaction */
sem (m <- x w wx)(y <- m x w wx)
estat teffects
I get the following coefficient estimates for indirect effects (none of which is significant):
x .083
w .032
wx .001
And if I use the nlcom command:
nlcom (_b[m:x]+($m-$s)*_b[m:wx])*_b[y:m] /* mean - 1 sd */
I get the following:
_nl_1: (_b[m:x]+(52.775-9.47858602138653)*_b[m:wx])*_b[y:m]
with a coefficient estimate of .142 and std err of .046.
I would have thought I could use the results from estat teffects to get a similar estimate, .083 + .001(52.775-9.479) but this isn’t the case. Any insights would be much appreciated.
Regards,
Michael Ciuchta
University of Massachusetts Lowell
I am probably missing something pretty obvious but I was wondering how to reconcile the indirect effects generated by the estat teffects post-estimation command in a moderated mediation model with the calculations using the nlcom command as demonstrated here:
http://www.ats.ucla.edu/Stat/stata/faq/modmed.htm
More specifically, when I run Model 2 using the following syntax:
use http://www.ats.ucla.edu/stat/data/hsb2, clear
rename science y /* dependent variable *
rename math x /* independent variable */
rename read m /* mediator variable */
rename write w /* moderator variable 1 */
rename socst z /* moderator variable 2 */
quietly summarize w
global m=r(mean)
global s=r(sd)
generate wx=w*x /* moderator 1 by iv interaction */
generate mx=m*x /* mv by iv interaction */
sem (m <- x w wx)(y <- m x w wx)
estat teffects
I get the following coefficient estimates for indirect effects (none of which is significant):
x .083
w .032
wx .001
And if I use the nlcom command:
nlcom (_b[m:x]+($m-$s)*_b[m:wx])*_b[y:m] /* mean - 1 sd */
I get the following:
_nl_1: (_b[m:x]+(52.775-9.47858602138653)*_b[m:wx])*_b[y:m]
with a coefficient estimate of .142 and std err of .046.
I would have thought I could use the results from estat teffects to get a similar estimate, .083 + .001(52.775-9.479) but this isn’t the case. Any insights would be much appreciated.
Regards,
Michael Ciuchta
University of Massachusetts Lowell