BASHCAT
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note No publishing access yet

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.

      Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

      Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

      Explore these features while you wait
      Complete general settings
      Bookmark and like published notes
      Write a few more notes
      Complete general settings
      Write a few more notes
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note No publishing access yet

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.

    Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Explore these features while you wait
    Complete general settings
    Bookmark and like published notes
    Write a few more notes
    Complete general settings
    Write a few more notes
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # SEM 結構方程模型新手指南:從迴歸分析畢業的第一步 ![sem-guide-cover](https://hackmd.io/_uploads/S17u0-o_bg.jpg) 你有沒有遇過這種場景? 論文進度報告的時候,指導教授看了你的研究架構圖,點了點頭說:「這個用迴歸不夠,你去跑個 SEM 吧。」 然後你回到座位上,打開 Google,輸入「SEM 是什麼」——結果跳出來的全是搜尋引擎行銷(Search Engine Marketing)。好不容易找到正確的全名「Structural Equation Modeling」,點進去一看,滿坑滿谷的希臘字母和矩陣符號,瞬間懷疑人生。 說實話,我第一次接觸 SEM 的時候也是這種感覺。但後來回頭看,其實 SEM 的核心概念並不複雜——它只是把你已經知道的幾種統計方法(因子分析、迴歸、路徑分析)縫合在一起,然後多了一個很關鍵的能力:**處理你看不見的東西**。 這篇文章不會丟公式給你,而是用最直覺的方式,讓你搞懂 SEM 到底在幹嘛、什麼時候該用它、以及怎麼開始動手。 --- ## SEM 到底是什麼?把名字拆開來看 **結構方程模型**(Structural Equation Modeling, SEM),由瑞典統計學家 Karl Jöreskog 和 Dag Sörbom 在 1970 年代提出,到 1990 年代開始在社會科學、心理學、管理學等領域廣泛使用。 把名字拆成三塊來理解: - **結構(Structural)**:變數之間的「關係結構」——誰影響誰、誰和誰相關 - **方程(Equation)**:這些關係用數學方程式表達 - **模型(Modeling)**:你建一個「理論模型」,然後看數據支不支持它 用一句話說就是:**SEM 是一種讓你把腦中的理論畫成圖,然後用數據去驗證「這張圖對不對」的統計方法。** 這跟一般統計分析的邏輯很不一樣。迴歸分析是「我有數據,讓我看看哪些變數有關」;SEM 是「我有理論,讓數據告訴我這個理論站不站得住」。 這個差異非常根本,後面會反覆提到。 --- ## 為什麼不用迴歸分析就好? 如果你已經會跑迴歸了,可能會想:「迴歸不也是看變數之間的關係嗎?為什麼還要學一個新東西?」 問得好。迴歸分析有三個根本的限制,而 SEM 就是為了解決這些問題而生的。 ![sem-guide-regression-vs-sem](https://hackmd.io/_uploads/BygKA-sO-g.jpg) ### 痛點一:測量誤差被當空氣 迴歸分析有一個隱含假設:**你的變數測量是完美的,沒有誤差。** 但你想想,用問卷測「工作滿意度」的時候,受訪者可能心情不好亂填、題目可能有歧義、量表本身可能不夠精確。這些都是測量誤差。迴歸分析直接忽略這些,拿原始分數就往公式裡塞。 結果呢?Portland State University 的 Newsom 教授用實際數據做了比較:同一批資料,迴歸分析得出的路徑係數 β = 0.243,用 SEM 潛在變數模型重新跑之後,β 變成 0.099。差了不只一倍。 為什麼?因為迴歸把測量誤差混進了變數裡,讓估計結果產生偏誤([attenuation bias](https://web.pdx.edu/~newsomj/semclass/ho_measurement%20error.pdf)%EF%BC%89%E3%80%82SEM 把測量誤差分離出來,用多個觀察指標去逼近「真正的分數」,估計自然更準確。 ### 痛點二:一次只能看一個因變數 標準的多元迴歸一次只能分析一個因變數。但現實中的理論往往是連鎖的:A 影響 B,B 又影響 C,A 也可能直接影響 C。 要用迴歸處理,你得拆成好幾條方程式分開跑,然後手動拼湊結果。SEM 可以在一個模型裡同時處理所有這些路徑,包括[直接效果、間接效果(中介效果)和總效果](https://pmc.ncbi.nlm.nih.gov/articles/PMC4775080/)。 ### 痛點三:看不見的東西沒辦法測 「自尊」「焦慮」「品牌忠誠度」「教學品質」——這些概念你能直接量出來嗎?不能。它們是**潛在變數**(latent variable),只能透過一系列可觀察的指標(問卷題目、測驗分數)來間接衡量。 迴歸分析通常的做法是把問卷題目加總平均,算出一個「綜合分數」就拿去用。但這等於假設每道題的重要性都一樣,而且把測量誤差全部吃進去了。 SEM 用「因子分析」的概念,讓多個觀察指標共同定義一個潛在變數,每個指標的權重不同,誤差也被分離出來。這才是社會科學中更合理的做法。 | 比較項目 | 迴歸分析 | SEM | |---------|---------|-----| | 測量誤差 | 忽略,假設測量完美 | 明確估計並分離 | | 因變數數量 | 一次一個 | 可同時多個 | | 潛在變數 | 不支援(用加總平均替代)| 原生支援 | | 中介效果 | 需拆成多條方程式 | 單一模型完成 | | 模型適配度 | 只有 R² | 多種適配度指標 | | 理論驗證 | 不直接支援 | 核心功能 | --- ## 核心精神:你必須先有理論 這是 SEM 最重要的一件事,也是新手最容易搞錯的地方。 **SEM 是驗證性(confirmatory)的,不是探索性(exploratory)的。** 怎麼理解?用蓋房子來比喻: - **探索性分析**(像 EFA 探索性因子分析)就像你拿到一堆建材,東拼西湊看能蓋出什麼。「欸這幾根木頭好像可以組成一面牆?那這些磚塊是不是能做個地基?」你是在數據裡「挖掘」結構。 - **SEM** 則相反。你手上已經有一張建築藍圖了——這棟房子應該有三面牆、兩根柱子、一個屋頂,柱子撐著屋頂、牆壁連接柱子。然後你去工地看看,實際的建材和結構是不是真的跟藍圖吻合。 這張「藍圖」就是你的理論模型。它來自文獻回顧、先前的研究、或你的理論推導。SEM 做的事情,就是拿實際數據去檢驗:**你的理論模型和真實世界的數據之間,吻合程度有多高?** ScienceDirect 上的定義寫得很直白:SEM 是 "[a statistical method that applies a confirmatory approach to analyzing structural theories of causal-effect relationships](https://www.sciencedirect.com/topics/computer-science/structural-equation-model)"。 所以在你動手跑 SEM 之前,你應該已經能夠畫出一張清楚的路徑圖:哪些變數影響哪些變數、透過什麼路徑、方向是什麼。如果你連理論架構都還沒有,那你需要的可能是 EFA 而不是 SEM。 > **踩坑提醒**:有些人會用 SEM 軟體的「修正指標」(Modification Indices)不斷調整模型,直到適配度指標好看為止。 > 這其實已經從「驗證」滑進了「探索」的範疇。Arbuckle(2007)特別警告:「研究者不應僅由修正指標引導,任何修正都必須有理論或常識支持。」 > 沒有理論支持的模型修正,就是在 [capitalize on chance](https://pmc.ncbi.nlm.nih.gov/articles/PMC5794813/)——靠運氣湊出好看的數字。 --- ## SEM 的基本元素:看懂那張圖 打開任何一篇用 SEM 的論文,你一定會看到一張由方塊、橢圓和箭頭組成的圖。這不是裝飾,這就是模型本身。 ![sem-guide-components](https://hackmd.io/_uploads/SkPcAZoube.jpg) ### 五種變數類型 在看懂符號之前,先搞清楚 SEM 裡到底有哪些角色。姚開屏(1993)把它們整理成五種: | 變數類型 | 說明 | 舉例 | |---------|------|------| | **觀察變數**(observed) | 你實際測量到的數據 | 問卷的每一道題、測驗分數 | | **潛在變數**(latent) | 無法直接測量的抽象概念 | 工作滿意度、焦慮程度 | | **外衍變數**(exogenous) | 模型裡的「起點」,不被其他變數影響 | 研究中的自變數 | | **內衍變數**(endogenous) | 模型裡「被影響」的變數 | 研究中的因變數或中介變數 | | **誤差變數**(error) | 測量誤差和殘差 | 無法解釋的變異 | 前兩種(觀察 vs 潛在)決定**你怎麼畫符號**,後兩種(外衍 vs 內衍)決定**箭頭怎麼指**,誤差則是每個被預測的變數都會帶著的「尾巴」。 ### 路徑圖符號 | 符號 | 代表 | 說明 | |------|------|------| | **長方形 / 方框** | 觀察變數(observed variable) | 你實際測量到的數據,例如問卷的每一道題 | | **橢圓形 / 圓圈** | 潛在變數(latent variable) | 你無法直接測量的抽象概念,例如「工作滿意度」 | | **單箭頭 →** | 因果 / 解釋關係 | 表示一個變數影響另一個變數 | | **雙箭頭 ↔** | 相關 / 共變關係 | 表示兩個變數之間有關聯,但不指定方向 | | **帶箭頭的小圓圈(e/δ/ε/ζ)** | 誤差項 | 每個被預測的變數都有誤差項 | 如果你之後讀到更進階的文獻,會遇到 LISREL 的希臘字母符號系統:η(內衍潛在變數)、ξ(外衍潛在變數)、λ(因子負荷量)、β 和 γ(路徑係數)、ζ(結構殘差)。現在不用記,碰到的時候回來查就好。 ### 一個潛在變數至少要幾個觀察變數? **至少三個。** 這是一條幾乎所有 SEM 教科書都會強調的基本規則。少於三個的話,模型在數學上可能無法被「識別」(identified),也就是方程式解不出唯一答案。 --- ## 測量模型 vs 結構模型:SEM 的兩大支柱 SEM 其實是兩個模型縫在一起的。理解這一點非常關鍵。 ### 測量模型(Measurement Model) 回答的問題是:**我的觀察變數能不能好好地測量潛在變數?** 這就是**驗證性因子分析**(Confirmatory Factor Analysis, CFA)。你假設「工作滿意度」這個潛在變數可以被「薪資滿意度」「同事關係」「工作自主性」三道題測到,然後用 CFA 確認這三道題是不是真的在測同一個東西。 ### 結構模型(Structural Model) 回答的問題是:**潛在變數之間的因果關係是什麼?** 確認測量沒問題之後,才看潛在變數之間怎麼互相影響。例如「工作壓力」是不是會降低「工作滿意度」,「工作滿意度」又是不是會降低「離職意願」。 ```mermaid graph LR subgraph 測量模型 A1[Q1: 工作量大] --> WS((工作壓力)) A2[Q2: 時間緊迫] --> WS A3[Q3: 責任沉重] --> WS B1[Q4: 薪資滿意] --> JS((工作滿意度)) B2[Q5: 同事關係] --> JS B3[Q6: 工作自主] --> JS C1[Q7: 想離開] --> TI((離職意願)) C2[Q8: 找新工作] --> TI C3[Q9: 不想留] --> TI end subgraph 結構模型 WS -->|負向影響| JS JS -->|負向影響| TI WS -->|直接影響?| TI end ``` **Anderson 和 Gerbing(1988)**建議的標準做法是 [two-step approach](https://www3.nd.edu/~kyuan/courses/sem/readpapers/anderson.pdf):先跑測量模型(CFA),確認沒問題了,再跑結構模型。不要一步到位,因為如果結果不好,你分不清是「測量有問題」還是「理論有問題」。 --- ## 來跑一個實際案例吧 說了這麼多概念,來看看實際跑起來長什麼樣。我們用 R 的 [lavaan](https://lavaan.ugent.be/) 套件,這是目前最多人用的免費 SEM 工具。 > **前置條件** > - R >= 4.0 > - 安裝 lavaan 套件:`install.packages("lavaan")` > - 基本的 R 語法知識 ### 情境設定 假設你在研究「工業化程度如何影響民主程度」,使用 lavaan 內建的政治民主資料集(Bollen, 1989)。理論模型是: - 1960 年的工業化程度(ind60)影響 1960 年的民主程度(dem60) - 1960 年的民主程度(dem60)影響 1965 年的民主程度(dem65) - 1960 年的工業化程度也可能直接影響 1965 年的民主程度 ### 程式碼 ```r library(lavaan) # Step 1: 定義模型 # =~ 表示「被測量為」(measurement model) # ~ 表示「被預測為」(structural model) # ~~ 表示「與...相關」(covariance) model <- ' # 測量模型 ind60 =~ x1 + x2 + x3 # 工業化程度由 x1, x2, x3 測量 dem60 =~ y1 + y2 + y3 + y4 # 1960 民主由 y1-y4 測量 dem65 =~ y5 + y6 + y7 + y8 # 1965 民主由 y5-y8 測量 # 結構模型 dem60 ~ ind60 # 工業化 → 1960 民主 dem65 ~ ind60 + dem60 # 工業化 + 1960 民主 → 1965 民主 # 殘差共變(理論上同一題不同年份的誤差相關) y1 ~~ y5 y2 ~~ y4 + y6 y3 ~~ y7 y4 ~~ y8 y6 ~~ y8 ' # Step 2: 跑模型 fit <- sem(model, data = PoliticalDemocracy) # Step 3: 看結果 summary(fit, standardized = TRUE, fit.measures = TRUE) ``` ### 結果解讀重點 跑出來的結果會有一大堆數字,但你最需要看三個地方: **1. 適配度指標**(模型整體好不好) ``` Model Test User Model: Test statistic 38.125 Degrees of freedom 35 P-value (Chi-square) 0.329 # > 0.05 ✓ ``` P 值 0.329 大於 0.05,代表你的理論模型和實際數據之間**沒有顯著差異**——也就是說,數據支持你的理論。(注意,SEM 的卡方檢定和其他統計相反:你**希望** p > 0.05。) **2. 因子負荷量**(測量模型好不好) 每個觀察變數對潛在變數的標準化負荷量(Std.all)理想上要 > 0.5,越高代表越能反映潛在變數。 **3. 路徑係數**(結構模型 — 你的理論假設成不成立) ``` dem60 ~ ind60 β = 0.447 # 工業化顯著影響 1960 民主 ✓ dem65 ~ dem60 β = 0.885 # 1960 民主強烈影響 1965 民主 ✓ dem65 ~ ind60 β = 0.182 # 工業化對 1965 民主的直接效果較小 ``` --- ## 怎麼判斷模型好不好?適配度指標速查表 SEM 不像迴歸只看 R² 就好,它有一整套適配度指標。不需要每個都完美,但大部分要在參考範圍內。 | 指標 | 全名 | 參考值 | 白話解釋 | |------|------|--------|---------| | χ²/df | 卡方值/自由度 | ≤ 3(寬鬆 ≤ 5) | 模型複雜度的懲罰調整 | | p 值 | Chi-square p-value | > 0.05 | 模型與數據無顯著差異 | | CFI | Comparative Fit Index | ≥ 0.90(優 ≥ 0.95) | 你的模型比「最爛模型」好多少 | | RMSEA | Root Mean Square Error of Approximation | ≤ 0.08(優 ≤ 0.05) | 模型與完美的距離 | | SRMR | Standardized Root Mean Square Residual | ≤ 0.08 | 殘差的平均大小 | | GFI | Goodness-of-Fit Index | ≥ 0.90 | 模型解釋了多少變異 | > **踩坑提醒**:卡方檢定對樣本量極度敏感。當你的樣本數超過 200-300 人時,幾乎任何模型的卡方值都會顯著(p < 0.05)。 > 這不代表你的模型很爛,只是卡方太敏感了。這時候應該以 CFI、RMSEA、SRMR 為主要判斷依據,而不是死盯 p 值。 > 這也是為什麼 SEM 領域有這麼多適配度指標——因為[沒有單一指標能完整評估模型](https://journalajeba.com/index.php/AJEBA/article/view/1430)。 ### RMSEA 的進階解讀 在所有指標裡,RMSEA 值得多說兩句。邱皓政(2008)整理了三種不同層級的適配度假設檢定,全部圍繞 RMSEA 展開: | 檢定類型 | 虛無假設 | 意義 | 白話翻譯 | |---------|---------|------|---------| | **精確適配** | RMSEA = 0 | 模型完美符合 | 「我的理論模型跟真實世界零誤差」 | | **近似適配** | RMSEA ≤ .05 | 模型近似符合 | 「雖然不完美,但誤差在可接受範圍」 | | **非近似適配** | RMSEA ≥ .05 | 模型不夠好 | 「誤差太大了,不能接受」 | 實務上最有用的是看 RMSEA 的 **90% 信賴區間**(lavaan 輸出裡會自動算)。如果下界 < .05 且上界 < .08,你的模型就很穩健了。如果上界飆到 .10 以上,就算點估計值還行,你也不能太安心。 --- ## SEM 的操作五步驟 搞懂了元素和指標,我們把整個 SEM 的流程串起來。姚開屏(1993)歸納了五個步驟,從最初的理論建構到最後的模型修正,形成一個完整的循環: **Step 1: 模型設定(Model Specification)** 根據理論假設畫出路徑圖,決定哪些路徑存在、哪些不存在。這一步完全靠你的理論知識,跟數據無關。 **Step 2: 模型識別(Model Identification)** 檢查模型在數學上能不能解——已知的資訊(觀察變數的變異數和共變數)夠不夠估計所有未知參數。規則很簡單:已知 ≥ 未知。 **Step 3: 模型估計(Model Estimation)** 把數據餵進去,用最大概似法(ML)或其他估計方法算出參數。這就是你在 lavaan 裡按下 `sem()` 的那一步。 **Step 4: 模型評鑑(Model Evaluation)** 看適配度指標、路徑係數、因子負荷量,判斷模型好不好。 **Step 5: 模型修正(Model Modification)** 如果模型不夠好,在**有理論依據**的前提下進行修正。可以用修正指標(MI)作為參考,但記得——每一步修正都必須說得出道理。 這五個步驟不是跑一次就結束的。修正之後要重新估計、重新評鑑,形成迭代循環,直到模型在理論和數據上都站得住。 --- ## 新手最常踩的五個坑 ### 1. 沒有理論就開始建模 最致命的錯誤。你不能把所有變數丟進去,然後靠修正指標東改西改,湊出一個好看的模型。那叫 data dredging,不叫理論驗證。 ### 2. 樣本量不夠 SEM 吃樣本量,而且「到底要多少人」這件事比你想的複雜很多。 很多教科書會告訴你「至少 200」,但這只是粗略的底線。實際需要的樣本量取決於三件事:**模型複雜度**(自由度多少)、**你想偵測多小的效果**(效果量)、以及**你能接受多大的誤判風險**(統計檢定力)。 邱皓政(2008)整理了一套更精確的方法:用 RMSEA 來決定樣本量。他的研究顯示,如果你跑的是一個 4 個潛在變數、12 個觀察指標的 CFA 模型(df = 48),要達到 .80 的檢定力: - **精確適配檢定**(H0: RMSEA = 0):最少需要 **N = 249** - **近似適配檢定**(H0: RMSEA ≤ .05):最少需要 **N = 502** 自由度越小、模型越精簡,需要的樣本量反而越大。直覺上很反常,但原因是:自由度小的時候,卡方分布和非中心卡方分布的差異不明顯,你需要更多數據才能「看出」模型和數據之間的差距。 更實務的經驗法則:每個待估計參數至少 10-20 個觀測值,而[複雜模型可能需要 400-500 以上](https://pmc.ncbi.nlm.nih.gov/articles/PMC4334479/)。鄭中平(2015)也提到,如果你的研究重點是某條特定路徑係數,還需要做路徑層級的檢定力分析(power analysis),lavaan 套件裡的 `SSpower` 和 `SSsamplesize` 函數就是幹這件事的。 ### 3. 把觀察變數直接當潛在變數用 有人把問卷加總平均分數直接放進「SEM」裡,但全部用方框(觀察變數)而不是橢圓(潛在變數),這其實只是在跑路徑分析(path analysis),不是完整的 SEM。你損失了 SEM 最大的優勢:測量誤差校正。 ### 4. 忽略模型識別問題 模型識別(model identification)的意思是:你的方程式有沒有辦法解出唯一答案?如果待估計的參數比已知資訊還多,模型就是「不可識別的」。最常見的問題:一個潛在變數只配了 1-2 個觀察變數。記得前面說的規則:**至少三個**。 ### 5. 過度修改模型 看到適配度不好就狂改,加殘差共變、刪路徑、移觀察變數,改到好為止。這叫 overfitting。你的模型可能完美擬合這批數據,但換一批數據就崩潰。每一次修改都必須有理論依據,而且最好用另一批數據做交叉驗證。 --- ## 工具怎麼選? | 工具 | 費用 | 介面 | 學習曲線 | 適合誰 | |------|------|------|---------|--------| | **AMOS** | 付費(含在 SPSS 裡) | 圖形拖拉 | 低 | 不想寫程式的研究生 | | **lavaan** (R) | 免費開源 | 程式碼 | 中 | 會 R 的研究者,可重現性高 | | **Mplus** | 付費(學生版 ~$195) | 語法檔 | 中高 | 功能最齊全,學術界標準 | | **LISREL** | 付費 | 語法檔 | 高 | 元老級工具,現在用的人少了 | | **SmartPLS** | 付費 | 圖形 | 低 | PLS-SEM 專用 | 怎麼選?如果你是碩士生、不排斥寫程式,**lavaan 是最好的起點**——免費、社群活躍、[官方教學文件](https://lavaan.ugent.be/tutorial/cfa.html)寫得很清楚。如果你的系所慣用 Mplus,那就跟著走,畢竟跟指導教授用同一套工具溝通成本最低。 --- ## Troubleshooting 常見問題 **Q: 我的模型收斂失敗(non-convergence),怎麼辦?** 可能原因:樣本量太小、模型太複雜、起始值不合理、資料有問題(例如共線性)。先檢查資料品質,再考慮簡化模型。 **Q: 因子負荷量出現大於 1 的值(Heywood case),正常嗎?** 不正常。這通常代表模型設定有問題、樣本量不足、或某些觀察變數不屬於該潛在變數。需要重新檢視測量模型。 **Q: CB-SEM 和 PLS-SEM 有什麼差別?我該用哪個?** 這兩個東西名字裡都有 SEM,但骨子裡是完全不同的統計哲學。邱皓政(2011)做了很完整的比較,我把最關鍵的幾點拉出來: | 比較面向 | CB-SEM(本文主角) | PLS-SEM | |---------|-------------------|---------| | **統計基礎** | 共變數為本(因子分析) | 成分為本(迴歸分析) | | **潛在變數本質** | 「真正的」潛在構念 | 觀察變數的加權組合 | | **分布假設** | 要求多元常態 | 不要求 | | **最低樣本量** | 通常 200+ | [「10 倍法則」](https://link.springer.com/chapter/10.1007/978-3-030-80519-7_1),可以更小,但穩定需 150-200 | | **模型適配** | 有完整適配度指標 | 沒有整體適配度 | | **核心用途** | 理論驗證(confirmatory) | 預測與探索 | | **測量模型** | 只支援反映性(reflective) | 同時支援反映性和形成性(formative) | 怎麼選?如果你的目標是**驗證一個既有理論**、你有夠大的樣本量、變數分布大致正常,用 CB-SEM。如果你的研究是**探索性質**、樣本量受限、或你的構念是形成性指標(例如「社經地位」由收入、教育、職業組成,不是它們的共同原因),那 PLS-SEM 可能更合適。但千萬不要因為 CB-SEM 適配度跑不好就「逃」到 PLS-SEM——這是邱皓政特別警告的濫用模式。 **Q: SEM 能證明因果關係嗎?** 不能。SEM 驗證的是「你假設的因果模型是否與數據一致」,但數據一致不代表因果成立——可能存在其他等效模型(equivalent models)也能解釋同樣的數據。真正的因果推論需要實驗設計或其他方法論支撐。 --- ## 下一步該做什麼 如果你讀到這裡覺得「好像可以動手了」,這裡是我建議的學習路徑: 1. **先搞定 CFA**。不要一步到位跑完整 SEM,先用 CFA 確認你的問卷量表好不好用。lavaan 官網的 [CFA 教學](https://lavaan.ugent.be/tutorial/cfa.html)是最好的起點。 2. **讀一本入門書**。推薦 Schumacker & Lomax 的 *[A Beginner's Guide to Structural Equation Modeling](https://www.amazon.com/Beginners-Guide-Structural-Equation-Modeling/dp/1138811939)*,到第五版了,一直是入門首選。中文讀者可以看邱皓政的《結構方程模式》。 3. **用別人的數據練習**。lavaan 內建了好幾個經典資料集(`HolzingerSwineford1939`、`PoliticalDemocracy`),先拿這些跑,搞懂輸出結果的每一行再換自己的數據。 4. **Two-step approach**。永遠先跑測量模型、確認沒問題後再跑結構模型。 SEM 不是銀彈,它有很多限制和假設。但對於「我有一個理論,想知道數據支不支持」這種問題,它真的是目前最系統化的解答方式。 別怕那些希臘字母。它們只是包裝紙,裡面的邏輯其實你早就懂了。 --- ## 延伸閱讀 ### 英文資源 - Schumacker, R. E., & Lomax, R. G. (2016). *A Beginner's Guide to Structural Equation Modeling* (4th ed.). Routledge. - [lavaan 官方教學](https://lavaan.ugent.be/tutorial.pdf) — 免費、完整的 R SEM 教學 - [Newsom, J. — SEM 課程講義](https://web.pdx.edu/~newsomj/semclass/) — Portland State University 的免費線上教材 - Ledgerwood, A., & Shrout, P. E. (2011). [The tradeoff between accuracy and precision in latent variable models](https://pmc.ncbi.nlm.nih.gov/articles/PMC4775080/) - Hoyle, R. H. (2023). *Handbook of Structural Equation Modeling* (2nd ed.). Guilford Press. - [An overview of SEM: its beginnings, historical development, usefulness and controversies](https://pmc.ncbi.nlm.nih.gov/articles/PMC5794813/) — PMC 上的免費回顧文章 ### 中文資源 - 姚開屏(1993)。結構方程模式的基本原則與符號。國立台灣大學心理學系。— SEM 符號系統和基本原則的經典中文教材 - 邱皓政(2008)。結構方程模式檢定力分析與樣本數決定。國立中央大學。— 用 RMSEA 決定樣本量的完整方法論 - 邱皓政(2011)。當 PLS 遇上 SEM:議題與對話。國立臺灣師範大學。— CB-SEM 和 PLS-SEM 的最完整中文比較 - 鄭中平(2015)。結構方程式模型檢定力分析。國立成功大學。— lavaan 套件做檢定力分析的實務教學 - 邱皓政。《結構方程模式:LISREL/SIMPLIS 原理與應用》。— 中文 SEM 教科書的入門首選

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password
    or
    Sign in via Facebook Sign in via X(Twitter) Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    By signing in, you agree to our terms of service.

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully