原書 Exercise 7.2,驗證 GLM 與前述 Regression Models 的一致性。
透過模型重建理解 Distribution 與 Link Function 的選擇。
Exercise 要求用 GLM 重建 Employee Attrition Logistic Regression,以及 Chapter 6 House Price Regression。
| 任務 | GLM 設定 |
|---|---|
| Employee Attrition | 依 Exercise 7.1 重建 Logistic Regression |
| House Price | Normal Distribution+Identity Link |
分別重建兩個模型,將 GLM Parameter Estimates/Fit Output 與原模型比較。
原書要求「Verify that you get the same results」,但正文未提供 Exercise 7.1 Attrition 與此 Exercise 的完整數值輸出,因此不自行補造。
重建的教學價值在於確認 Logistic Regression 與 MLR 可視為 GLM Framework 下的特定設定。
比較我提供的原模型與 GLM Output,逐項檢查 Parameter Estimates 與 Fit Results 是否一致;若資料不足請明確標示。
House Price GLM 應選什麼設定?
參考解答: 原書指定 Normal Distribution+Identity Link。