編輯版面配置
semPaths() 的預設檢視是 tree 版面,其中 rotation 設為 1。將 rotation 設為 2,常能幫助非統計背景的讀者理解模型,因為模型會由左到右呈現:左側的潛在變數用來預測右側的顯變數反應。請更新模型圖以套用這些設定。
本練習屬於課程
在 R 中使用 lavaan 的結構方程模型
練習說明
- 在
semPaths()函式中加入layout引數。 - 在
semPaths()函式中加入rotation引數。 - 將
layout設為"tree",並將rotation設為2。
動手互動練習
試著完成這個範例程式碼,體驗一下這個練習。
# Load the semPlot library
library(semPlot)
# Update the default picture
semPaths(object = adopt.fit,
___,
___)