I am trying to run Hayes' PROCESS Model 14 in STATA using SEM and I am getting stuck on how to interpret the results. PROCESS throws out a 'ModMedIndex' which in essence is a single beta coefficient (with std. error and p-value) that tells us if the moderation is significant.
I tried following the instructions on STATA's webpage: https://stats.oarc.ucla.edu/stata/fa...tion-in-stata/ and it runs fine, just that I am unable to interpret if the moderation is significant. For context, I am running multiple such moderated mediations and trying to summarize them in excel so having a 'ModMedIndex' similar to SPSS would be fantastic. Mike Crowson has a youtube video with a STATA do file on model 7 (https://www.youtube.com/watch?v=i1NaI3FbLCk) but I could not figure out how to replicate this for Model 14.
Any help would be much appreciated! Here is my current code.
*********************
Code:
foreach dv in dv1 dv2 dv3 { //three DVs
foreach iv in iv1 iv2 iv3 { //three IVs
foreach mod in mod1 mod2 { //two moderators
quietly summarize `mod'
global m=r(mean)
global s=r(sd)
local i=1
foreach med in med1 med2 { //two mediators
generate s2int=`med'*`mod' //* mediator by moderator interaction * s2int is short for stage 2 interaction
sem (`med' <- `iv')(`dv' <- `med' `iv' `mod' s2int)
nlcom (ints2low`i':_b[`med':`iv']*(_b[`dv':`med']+($m-$s)*_b[`dv':s2int])) (ints2mid`i':_b[`med':`iv']*(_b[`dv':`med']+($m)*_b[`dv':s2int]))(ints2high`i':_b[`med':`iv']*(_b[`dv':`med']+($m+$s)*_b[`dv':s2int])), post //post estimation calculates the total conditional indirect effect at three levels of the moderator
local i=`i'+1
drop s2int
}
}
estout . using sample.xls, cells(b(star fmt(3)) se(par fmt(2))) append unstack drop($cntrl, relax)
}
}
0 Response to Second stage moderated mediation in STATA using SEM
Post a Comment