3

当我使用 sempaths(包 semplots)绘制 SEM 模型时,我无法摆脱路径。路径看起来是两个观察到的变量(V1_1 和 V1_2)之间的协方差。

这是模型和输出图的代码:

#specifying the model using lavaan package
model = '
#define latent variable 
left_right =~ Left_Right1 + Left_Right2 + Left_Right3 + Left_Right4 + 
Left_Right5
#define regression
V1_1 ~ left_right
V1_2 ~ left_right
'
#fitting an sem model
fit <- sem(model, data=data, estimator="DWLS")

#loading semplot package
library(semPlot)

#plotting path diagram
semPaths(fit,label.font = 1,label.norm = "OOOO",label.scale = T, what = 
"est", fade=FALSE,style="lisrel", rotation=4, title = FALSE, sizeLat = 9, 
sizeMan = 5, sizeMan2 =4, sizeInt = 1, sizeInt2 = 10,posCol =c("black"), 
residuals = T, layoutSplit = T, edge.label.cex = 0.6)

我得到的输出如下所示:

示例输出图,在 V1_1 和 V1_2 之间具有不需要的协方差路径

我希望摆脱的路径/边缘位于节点“V1_1”和“V1_2”之间,值为 0.20。任何帮助将不胜感激。

4

3 回答 3

1

从手册:exoCov Should covariances between truly exogenous variables (no incoming directed edge) be plotted? Defaults to TRUE.

因此,添加exoCov = FALSE就可以了。

于 2020-09-22T15:43:15.097 回答
1

你可能已经解决了这个问题。无论哪种方式,您只需将“residuals”参数更改为 FALSE。

于 2018-09-14T14:47:59.783 回答
0

尝试:

fixedStyle = c( "white","0")
于 2020-05-01T10:55:19.790 回答