【发布时间】:2019-11-08 21:07:04
【问题描述】:
我不熟悉使用 semPlots,但找到了一种方法来按照我想要的方式使用自定义布局 sempathmatrix 来组织变量。变量的布局很好,可能需要稍作调整,但我希望向量是弯曲的。使用曲线、曲率或其他与曲线相关的参数对自定义布局没有任何作用。
关于如何使用自定义布局在此 semplot 中获取曲线向量有什么想法吗?
我尝试添加 curve 或 curvature 和 curveAdjacent 参数,但我的 sempathmatrix 布局没有做任何事情。如果我切换回树或树 2,曲线就会出现。似乎无法弄清楚。
########Creating the Manual Lables and Layout Matrix for Cope Model Plot
lbls<-c("Depression","Flourishing","Active\nCoping","Beh\nDisengage","Self\nCompassion","Self\nColdness")
sempathmatrix<-matrix(c(.5,.5, .5,-.5, 0,.4, 0,-.4, -.5,.5, -.5,-.5, .5,.5, .5,-.5), ncol=2,byrow=T)
####Path analysis Plot for Coping Model ######
semPaths(fit, "std", residuals = F, intercepts = F, layout = sempathmatrix, fade=F, rotation = 3, nCharNodes= 0, nodeLabels=lbls, edge.label.cex=0.7, freeStyle = T, title=F, sizeMan = 9, mar = c(5,5,5,5))
SemPlot:
【问题讨论】: