I'm having trouble getting rid of a path when I plot an SEM model using sempaths (package semplots). The path looks to be a covariance between two observed variables (V1_1 and V1_2).
Here is my code for both the model and output plot:
#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)
The output I get looks like this:
The path/edge i'm looking to get rid of goes between nodes 'V1_1' and 'V1_2' and has a value of 0.20. Any help would be greatly appreciated.
You probably already solve this. Either way, you only need to change the "residuals" argument to FALSE.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With