I’m trying to run a moderated mediation model with three moderators. I was unable to identify a model in PROCESS (Hayes) taht allows for this.
I’ve been told that it’s possible in lavaan
however, I’m having very little work.
Does anyone know how you could include three moderators for a moderated mediation model?
I was unable to find anything online!
Thank you!
# Create interaction terms
data$XW1 <- data$irs * data$asian
data$XW2 <- data$irs * data$black
data$XW3 <- data$irs * data$hispanic
data$MW1 <- data$ih * data$asian
data$MW2 <- data$ih * data$black
data$MW3 <- data$ih * data$hispanic
# Specify the moderated mediation model
model <- '
ih ~ a*irs + am1*XW1 + am2*XW2 + am3*XW3
dep ~ c*irs + b*ih + bm1*MW1 + bm2*MW2 + bm3*MW3 + cp1*asian + cp2*black + cp3*hispanic
indirect := a*b
total := c + (a*b)
'
I don’t know if what I’ve attempted above is accurate.
New contributor
SJ Kim is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.