我用 sem 拟合了一个结构方程模型,现在我试图用 semPaths 可视化模型:
semPaths(fit1b_rh, "path", "stand",layout="tree", edge.color = "black", residuals = FALSE, layoutSplit = TRUE, subRes = 360, asize = 1 , sizeMan = 15,sizeMan2 = 4, sizeLat = 18, sizeLat2 = 7,rescale= TRUE, edge.width=TRUE, asize = 3, label.scale = TRUE,font = 7, label.prop= .7, overlap = FALSE, nodeLabels = c("HC", "HE","caudalACC","rostralACC","caudalmidfront","parsorb","parstri","rostralmidfront","supfront","age", "sex", "BMI", "suptemp","midtemp","age x HC","age x HE","intemp" , "bankssts","fusiform", "Chronic Stress","ACC","FrontLobe","TempLobe","Interaction stress x age"))
到目前为止它工作正常,但是我的潜在变量的节点以及指标变量的一些节点保持重叠。Sacha Epskamp 建议尝试 Fruchterman Reingold 算法(布局?)https://github.com/SachaEpskamp/qgraph/issues/5#issuecomment-260288621,但我不确定如何在我的代码中实现它,只需更改布局即可不行。