開始使用免費開始

為最終模型繪製圖示

為了幫助視覺化新的 WAIS-III 模型,我們可以使用 semPlot 函式庫來繪製三因子模型的圖。你需要加上標籤與陰影,凸顯模型中最強的路徑,這有助於看出哪些顯變數最能測量潛變數。

本練習屬於課程

在 R 中使用 lavaan 的結構方程模型

檢視課程

練習說明

  • 載入 semPlot 函式庫。
  • 使用 whatLabels 加入標準化負荷量作為標籤,並用 what 加上陰影。
  • edge.color 參數中將圖示著色為黑色。

動手互動練習

試著完成這個範例程式碼,體驗一下這個練習。

# Load the library
library(___)

# Update the default picture
semPaths(object = wais.fit,
         layout = "tree",
         rotation = 1,
         whatLabels = ___,
         edge.label.cex = 1,
         what = ___,
         edge.color = ___)
編輯並執行程式碼