I am trying to make a moderated mediation, where the moderator (W) is categorical and Y and X are latent variables. However, none of the approaches I found either here or in Pubmed.
Please consider the model from the paper linked:
Whose specification looks like:
> model7 <- “
+ del ~ cprime * male
+ del ~ b * respect
+ del ~ bprime * maleXResp
+ respect ~ a * male
+ respect ~~ maleXResp
+ male ~~ maleXResp
+
+ bmale:= b + bprime
+ indMale:= bmale * a
+ indFemale:= b * a
+ indDiff:= indMale – indFemale
+ ”
>
> fit7 <- sem(model7, data=d, fixed.x=FALSE,
+ se=“bootstrap”)
> summary(fit7)
Full citation for this paper is:
Jeremy N.V Miles, Magdalena Kulesza, Brett Ewing, Regina A Shih, Joan S Tucker, Elizabeth J D'Amico, (2015) "Moderated
mediation analysis: an illustration using the association of gender with delinquency and mental health", Journal of Criminal
Psychology, Vol. 5 Issue: 2, pp.99-123, https://doi.org/10.1108/JCP-02-2015-0010
In the data I have access to, both Deliquency and Respect are latent variables.
- How would I specify the mediation in the case where deliquency and respect are latent variables?
In my attempt, lavaan complains of Respect not being an observed variable, I can't figure out how to approach this issue.