We will now build a logistic regression model here:
- Using the glm function, we build a logistic regression model for the training dataset GC_Train and then apply the summary function to get the details of the fitted model:
GC_Logistic <- glm (good_bad~., data= GC_Train, family= 'binomial' ) summary (GC_Logistic) ## ## Call: ## glm(formula = good_bad ~ ., family = "binomial", data = GC_Train) ## ## Deviance Residuals: ## Min 1Q Median 3Q Max ## -2.428 -0.725 0.374 0.715 2.222 ## ## Coefficients: ## Estimate Std. Error z value Pr(>|z|) ## (Intercept) 1.42e+00 1.35e+00 1.05 0.2927 ## checking0 <= ... < 200 DM 1.24e-01 2.86e-01 0.44 0.6634 ## checking>= 200 DM 5.08e-01 4.81e-01 1.06 0.2913 ## checkingNo Acc 1.65e+00 3.06e-01 ...