邏輯回歸分析 (Logistic Regression)
套路 45: 邏輯回歸分析 (Logistic Regression) 1. 使用時機 : 以多變數 ( 自變數 ) 預測判斷依變數與自變數之間相關的方向 ( 趨勢 ) 和程度。 2. 分析類型 : 多變量統計分析( Multivariate Statistical Analysis) 。 3. 範例資料 : 以 R 內建資料 mtcars 為例 head(mtcars) # 以 head 函數列出 mtcars 前幾筆資料結果如下 mpg cyl disp hp drat wt qsec vs am gear carb Mazda RX4 21.0 6 160 110 3.90 2.620 16.46 0 1 4 4 Mazda RX4 Wag 21.0 6 160 110 3.90 2.875 17.02 0 1 4 4 Datsun 710 22.8 4 108 93 3.85 2.320 18.61 1 1 4 1 ...