แก้ไขโมเดลที่มี df เป็นศูนย์
Identification เป็นองค์ประกอบสำคัญในโมเดล SEM และโมเดลควรมีอย่างน้อยหนึ่ง degree of freedom เสมอ ให้นำ text.model จากแบบฝึกหัดที่แล้วมาปรับปรุงเพื่อสร้าง degree of freedom
กำหนด label a ให้กับ coefficient path สองเส้นเพื่อบังคับให้มีค่าเท่ากัน โดย lavaan และชุดข้อมูล HolzingerSwineford1939 ถูกโหลดไว้ให้แล้ว
แบบฝึกหัดนี้เป็นส่วนหนึ่งของหลักสูตร
Structural Equation Modeling ด้วย lavaan ใน R
คำแนะนำการฝึกหัด
- อัปเดต
text.modelให้ path ของx5และx6ทั้งคู่ถูกกำหนดให้เป็นa - วิเคราะห์โมเดลด้วยฟังก์ชัน
cfa() - ดูผลลัพธ์ของโมเดลที่อัปเดตแล้วด้วยฟังก์ชัน
summary()
แบบฝึกหัดเชิงโต้ตอบแบบลงมือทำ
ลองทำแบบฝึกหัดนี้โดยเติมโค้ดตัวอย่างนี้ให้สมบูรณ์
# Update the model specification by setting two paths to the label a
text.model <- 'text =~ x4 + x5 + x6'
# Analyze the model
text.fit <- cfa(model = ___, data = HolzingerSwineford1939)
# Summarize the model
summary(___, standardized = TRUE, fit.measures = TRUE)