Modeli di equazioni strutturali con lavaan in R
Erin Buchanan
Professor
library(lavaan)
library(semPlot)
twofactor.model <- 'text =~ x4 + x5 + x6
speed =~ x7 + x8 + x9'
twofactor.fit <- cfa(model = twofactor.model,
data = HolzingerSwineford1939)
semPaths(object = twofactor.fit)

semPaths(object = twofactor.fit,
whatLabels = "std",
edge.label.cex = 1)
#whatLabels può anche essere "par"

semPaths(object = twofactor.fit,
whatLabels = "std",
edge.label.cex = 1,
layout = "circle")
#le opzioni di layout sono tree, circle, spring, tree2, circle2

semPaths(object = twofactor.fit,
whatLabels = "std",
edge.label.cex = 1,
layout = "tree", rotation = 2)
#le opzioni di rotation sono 1, 2, 3, 4 per i layout tree

semPaths(object = twofactor.fit,
whatLabels = "std",
edge.label.cex = 1,
layout = "tree", rotation = 2,
what = "std", edge.color = "purple")
#le opzioni di what includono par e std

Modeli di equazioni strutturali con lavaan in R