semPaths() के साथ डायग्राम बनाएँ

R में lavaan के साथ Structural Equation Modeling

Erin Buchanan

Professor

semPlot और semPaths()

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)
R में lavaan के साथ Structural Equation Modeling

semPaths() डिफॉल्ट आउटपुट

semPaths से डिफॉल्ट प्लॉट

R में lavaan के साथ Structural Equation Modeling

चित्र एडिट करना

semPaths(object = twofactor.fit,
         whatLabels = "std", 
         edge.label.cex = 1)
#whatLabels में "par" भी हो सकता है 

एज लेबल्स के साथ अपडेटेड मॉडल चित्र

R में lavaan के साथ Structural Equation Modeling

चित्र लेआउट

semPaths(object = twofactor.fit,
          whatLabels = "std", 
          edge.label.cex = 1, 
          layout = "circle")
#layout विकल्प: tree, circle, spring, tree2, circle2

लेआउट को Circle विकल्प में अपडेट किया

R में lavaan के साथ Structural Equation Modeling

चित्र रोटेशन

semPaths(object = twofactor.fit,
          whatLabels = "std", 
          edge.label.cex = 1, 
          layout = "tree", rotation = 2)
#tree लेआउट्स के लिए rotation विकल्प 1, 2, 3, 4 हैं

ट्री रोटेशन अपडेट: बाएँ तरफ latents

R में lavaan के साथ Structural Equation Modeling

रंग विज़ुअलाइज़ेशन

semPaths(object = twofactor.fit,
         whatLabels = "std", 
         edge.label.cex = 1, 
         layout = "tree", rotation = 2,
         what = "std", edge.color = "purple")
#what विकल्पों में par और std शामिल हैं

रंग अपडेट: शेडेड पर्पल

R में lavaan के साथ Structural Equation Modeling

अभ्यास करते हैं!

R में lavaan के साथ Structural Equation Modeling

Preparing Video For Download...