1st time SEM (Subscale syntax and two mediators?)

48 views
Skip to first unread message

Jace Hargraven

unread,
Jul 5, 2015, 4:50:05 AM7/5/15
to lav...@googlegroups.com

Hi!

Im doing research on the pathways to violence of abused children and im trying to formulate a model.
Child abuse compromised of five subfactors is supposed to be a predictor for potential for violence and is thought to be mediated by two variables: RF and attachment.
Does my syntax match the model or am i totally of the track? This is my first SEM so i basically have no idea what im doing (sadly).

modS = ("Abuse =~ CECA_AntipathyM + CECA_AntipathyV + CECA_NeglectM + CECA_NeglectV + CECA_PhysicalAbuseScreen
ReactiveAggression =~ RPQ1+RPQ2+RPQ3+RPQ4+RPQ5+RPQ6+RPQ7+RPQ8+RPQ9+RPQ10+RPQ11
ProactiveAggression =~ RPQ12+RPQ13+RPQ14+RPQ16+RPQ18+RPQ19+RPQ20+RPQ21+RPQ22+RPQ23
CD =~ 1*CD_Diagnosis
RF =~ 1*RFS
Attachment =~ 1*AAI
AggressionPotential =~ ProactiveAggression + ReactiveAggression + CD
AggressionPotential ~ c*Abuse
RF ~ a*Abuse
RF ~ b*AggressionPotential
Attachment ~ d*Abuse
Attachment ~ e*AggressionPotential
ab:=a*b
de:=d*e
total:=c+(a*b)+(d*e)")

res0=cfa(modS,d2,estimator="DWLS",ordered=c("allot of stuff"))

Im especially sceptic towards my try on modeling subscales of a factor (for the AggressionPotential factor) and my implementation of two mediators.

Thanks allot!

Terrence Jorgensen

unread,
Jul 6, 2015, 9:55:27 AM7/6/15
to lav...@googlegroups.com
modS = ("Abuse =~ CECA_AntipathyM + CECA_AntipathyV + CECA_NeglectM + CECA_NeglectV + CECA_PhysicalAbuseScreen
ReactiveAggression =~ RPQ1+RPQ2+RPQ3+RPQ4+RPQ5+RPQ6+RPQ7+RPQ8+RPQ9+RPQ10+RPQ11
ProactiveAggression =~ RPQ12+RPQ13+RPQ14+RPQ16+RPQ18+RPQ19+RPQ20+RPQ21+RPQ22+RPQ23
CD =~ 1*CD_Diagnosis
RF =~ 1*RFS
Attachment =~ 1*AAI
AggressionPotential =~ ProactiveAggression + ReactiveAggression + CD

Should be good so far.  I don't think it's necessary to create latent equivalents of your observed variables (CD_Diagnosis, RFS, and AAI) because lavaan will do that automatically.  But the way you did it should work too, because lavaan will automatically fix the indicator residual variance to zero when there is only one indicator, so your model should be identified.

But you don't need to put a single character string in parentheses, and you should assign data to objects using the assignment operator (<-), not the equals sign:

modS <- "Abuse =~ ... "

 
AggressionPotential ~ c*Abuse
RF ~ a*Abuse
RF ~ b*AggressionPotential
Attachment ~ d*Abuse
Attachment ~ e*AggressionPotential


This is backward from your picture.  RF and Attachment predict AggressionPotential, so you need to put outcomes on the left side of the "~" operator.  You can also specify all predictors for an outcome on the same line:

AggressionPotential ~ b*RF + c*Abuse + e*Attachment
RF ~ a*Abuse
Attachment ~ d*Abuse
 
 
ab:=a*b
de:=d*e
total:=c+(a*b)+(d*e)")

You can use the indirect paths you already defined above:

total := c + ab + de 
 
res0=cfa(modS,d2,estimator="DWLS",ordered=c("allot of stuff"))

Again, this should work, but get in the habit of using the assignment operator:

res0 <- cfa(...)

Terry

Jace Hargraven

unread,
Jul 6, 2015, 3:06:47 PM7/6/15
to lav...@googlegroups.com
Thank you Terry, that was exactly the kind of feedback i hoped for, and quick to boot! Much obliged!
Reply all
Reply to author
Forward
0 new messages