1. 案例定位

整合 Table 7.7、Figures 7.15–7.16 與 Table 7.8,理解 Generalized Linear Model(GLM)與 Logistic Regression 的關係。

2. 學習目標

能選擇 Distribution 與 Link Function,並理解 GLM 如何 Generalize Regression。

3. 案例情境

SAS VA 可用 GLM 重建 MLR 與 Logistic Regression;不同 Response Data 需要不同 Distribution/Link。

4. 開始資料

Distribution Data Values Link Functions
Binary Two distinct values Logit、Probit、Log-log、C-log-log
Normal Real values Identity、Log
Poisson Non-negative integers Log、Identity
Gamma Non-negative real numbers Log、Identity、Recip

5. 分析方法

要重建 Logistic Regression,選 Binary Distribution+Logit Link;GLM 要求 Response Numeric,因此 Survived=1、Perished=0。

6. 計算結果

原書指出 GLM 與 Logistic Regression 產生相同 Parameter Estimates;AIC=1221.27 亦相同。GLM 不產生 Pseudo R²。

7. 結果分析與管理解讀

GLM 的價值在於可處理 MLR/LR 之外的資料型態,例如 Count Data 可考慮 Poisson;原書另提 Zero-inflated Poisson,但指出 SAS VA 不提供。

8. AI Prompt

根據原書 Table 7.7 與我提供的 Response Data Type,說明可用的 Distribution/Link 選項;不要加入原書未列的方法。

9. 思考/What-if

如何用 GLM 重建本章 Titanic Logistic Regression?

參考解答: Response recode 為 Survived=1、Perished=0,選 Binary Distribution 與 Logit Link。

10. 資料說明