library(lavaan)
library(semPlot)
mod <-
'f1 =~ x01 + x02 + x03 + x06
f2 =~ x04 + x05 + x06 + x07
f3 =~ x08 + x09 + x10 + x03
f4 =~ x11 + x12 + x13 + x14
'
fit <- lavaan::cfa(mod, cfa_example)
p <- semPaths(fit,
whatLabels = "est",
sizeMan = 3.25,
node.width = 1,
edge.label.cex = .75,
mar = c(10, 5, 10, 5),
DoNotPlot = TRUE)
p <- add_object(p, fit)
attr(p, "semptools_fit_object")
Run the code above in your browser using DataLab