I am trying to plot an SEM model with the manifest variables and latent variable of the outcome variable on one side and the manifest and latent variables of the predictor, which is measured as a 2nd order factor model, on the other side of the plot.
I have tried different layout functions like tree, spring, and circle.
factor.modelSEM5 <- '
ConDCS =~ c1*o1_a+c2*o2_a+c3*o3_a
NegDCS =~ n1*o4_a+n2*o5_a+n3*o6_a
IntDCS =~ i1*o7_a+i2*o8_a+i3*o9_a
DCS =~ DC1*ConDCS+DC2*NegDCS+DC3*IntDCS
DCS ~~ 1*DCS
AUDITC =~ A1*b1_a_R+A2*b2_a_R+A3*b3_a_R
AUDITC ~~ 1*AUDITC
AUDITC ~ DCS
'
mySEM.fit5 <- sem(factor.modelSEM5, SEMProject)
semPaths(mySEM.fit5, whatLabels="std", layout="tree2",curvePivot = TRUE,
rotation=2,sizeMan=6,posCol="black", sizeLat=6, edge.label.cex=.65)
With this code, all manifest variables (o1_a
through b1_a_R
) are lined up next to each other one on side of the plot.
Instead, I want the manifest variables,
o1_a
througho9_a
, to line one side of the plot and the manifest variables, andb1_a_R
throughb3_a_R
, to line the opposite side of the plot.
Thanks for your help.