Reading the data

Converting some data columns into factors

Running Binomial Logistic Regression Model (Model1)

## 
## Call:
## glm(formula = Default ~ CreditLimit + Education, family = binomial(), 
##     data = CCdefault.dt)
## 
## Deviance Residuals: 
##     Min       1Q   Median       3Q      Max  
## -0.8824  -0.7812  -0.6503  -0.4299   2.5123  
## 
## Coefficients:
##               Estimate Std. Error z value Pr(>|z|)    
## (Intercept) -8.089e-01  3.421e-02 -23.646  < 2e-16 ***
## CreditLimit -3.199e-06  1.307e-07 -24.482  < 2e-16 ***
## Education2   7.351e-02  3.284e-02   2.239 0.025164 *  
## Education3   9.840e-02  4.266e-02   2.307 0.021059 *  
## Education4  -1.342e+00  3.909e-01  -3.432 0.000599 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 31427  on 29600  degrees of freedom
## Residual deviance: 30629  on 29596  degrees of freedom
## AIC: 30639
## 
## Number of Fisher Scoring iterations: 5

Running Binomial Logistic Regression Model With Interaction (Model2)

## 
## Call:
## glm(formula = Default ~ CreditLimit + Education + CreditLimit * 
##     Education, family = binomial(), data = CCdefault.dt)
## 
## Deviance Residuals: 
##     Min       1Q   Median       3Q      Max  
## -0.8940  -0.7733  -0.6529  -0.4536   2.8191  
## 
## Coefficients:
##                          Estimate Std. Error z value Pr(>|z|)    
## (Intercept)            -9.262e-01  4.470e-02 -20.719  < 2e-16 ***
## CreditLimit            -2.555e-06  2.005e-07 -12.747  < 2e-16 ***
## Education2              2.493e-01  5.453e-02   4.572 4.83e-06 ***
## Education3              2.507e-01  6.689e-02   3.748 0.000178 ***
## Education4              1.318e-01  9.503e-01   0.139 0.889700    
## CreditLimit:Education2 -1.125e-06  2.824e-07  -3.983 6.80e-05 ***
## CreditLimit:Education3 -9.762e-07  4.067e-07  -2.400 0.016390 *  
## CreditLimit:Education4 -8.732e-06  5.802e-06  -1.505 0.132360    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 31427  on 29600  degrees of freedom
## Residual deviance: 30610  on 29593  degrees of freedom
## AIC: 30626
## 
## Number of Fisher Scoring iterations: 6

Full Model – Running Binomial Logistic Regression Model With Interactions (Model3)

## 
## Call:
## glm(formula = Default ~ CreditLimit + Male + Education + MaritalStatus + 
##     Age + BillOutstanding + LastPayment + CreditLimit * Male + 
##     CreditLimit * Education + CreditLimit * MaritalStatus + CreditLimit * 
##     Age + CreditLimit * BillOutstanding + CreditLimit * LastPayment, 
##     family = binomial(), data = CCdefault.dt)
## 
## Deviance Residuals: 
##     Min       1Q   Median       3Q      Max  
## -1.8760  -0.7729  -0.6405  -0.3706   3.9782  
## 
## Coefficients:
##                               Estimate Std. Error z value Pr(>|z|)    
## (Intercept)                 -4.497e-01  1.157e-01  -3.887 0.000102 ***
## CreditLimit                 -6.111e-06  6.773e-07  -9.023  < 2e-16 ***
## Male1                        1.640e-01  4.533e-02   3.619 0.000296 ***
## Education2                   1.535e-01  5.523e-02   2.780 0.005442 ** 
## Education3                   1.489e-01  6.952e-02   2.142 0.032222 *  
## Education4                   5.819e-02  9.464e-01   0.061 0.950977    
## MaritalStatus2              -2.545e-01  5.204e-02  -4.891 1.00e-06 ***
## MaritalStatus3              -4.309e-02  1.879e-01  -0.229 0.818591    
## Age                         -6.267e-03  2.605e-03  -2.406 0.016146 *  
## BillOutstanding              2.053e-07  4.769e-07   0.431 0.666816    
## LastPayment                 -3.292e-05  4.886e-06  -6.738 1.61e-11 ***
## CreditLimit:Male1           -7.796e-08  2.528e-07  -0.308 0.757817    
## CreditLimit:Education2      -9.232e-07  2.851e-07  -3.238 0.001204 ** 
## CreditLimit:Education3      -1.028e-06  4.104e-07  -2.504 0.012296 *  
## CreditLimit:Education4      -8.349e-06  5.773e-06  -1.446 0.148108    
## CreditLimit:MaritalStatus2   3.766e-07  2.864e-07   1.315 0.188434    
## CreditLimit:MaritalStatus3  -8.342e-07  1.686e-06  -0.495 0.620816    
## CreditLimit:Age              7.844e-08  1.526e-08   5.139 2.76e-07 ***
## CreditLimit:BillOutstanding  5.185e-12  1.432e-12   3.622 0.000292 ***
## CreditLimit:LastPayment      2.387e-11  1.803e-11   1.324 0.185499    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 31427  on 29600  degrees of freedom
## Residual deviance: 30250  on 29581  degrees of freedom
## AIC: 30290
## 
## Number of Fisher Scoring iterations: 6

StepAIC Model – Running Binomial Logistic Regression Model With Interactions (Model4)

## Start:  AIC=30290.43
## Default ~ CreditLimit + Male + Education + MaritalStatus + Age + 
##     BillOutstanding + LastPayment + CreditLimit * Male + CreditLimit * 
##     Education + CreditLimit * MaritalStatus + CreditLimit * Age + 
##     CreditLimit * BillOutstanding + CreditLimit * LastPayment
## 
##                               Df Deviance   AIC
## - CreditLimit:MaritalStatus    2    30253 30289
## - CreditLimit:Male             1    30251 30289
## - CreditLimit:LastPayment      1    30252 30290
## <none>                              30250 30290
## - CreditLimit:Education        3    30265 30299
## - CreditLimit:BillOutstanding  1    30264 30302
## - CreditLimit:Age              1    30276 30314
## 
## Step:  AIC=30288.49
## Default ~ CreditLimit + Male + Education + MaritalStatus + Age + 
##     BillOutstanding + LastPayment + CreditLimit:Male + CreditLimit:Education + 
##     CreditLimit:Age + CreditLimit:BillOutstanding + CreditLimit:LastPayment
## 
##                               Df Deviance   AIC
## - CreditLimit:Male             1    30253 30287
## - CreditLimit:LastPayment      1    30254 30288
## <none>                              30253 30289
## - CreditLimit:Education        3    30269 30299
## - CreditLimit:BillOutstanding  1    30266 30300
## - CreditLimit:Age              1    30278 30312
## - MaritalStatus                2    30290 30322
## 
## Step:  AIC=30286.55
## Default ~ CreditLimit + Male + Education + MaritalStatus + Age + 
##     BillOutstanding + LastPayment + CreditLimit:Education + CreditLimit:Age + 
##     CreditLimit:BillOutstanding + CreditLimit:LastPayment
## 
##                               Df Deviance   AIC
## - CreditLimit:LastPayment      1    30254 30286
## <none>                              30253 30287
## - CreditLimit:Education        3    30269 30297
## - CreditLimit:BillOutstanding  1    30266 30298
## - CreditLimit:Age              1    30278 30310
## - Male                         1    30279 30311
## - MaritalStatus                2    30290 30320
## 
## Step:  AIC=30286.22
## Default ~ CreditLimit + Male + Education + MaritalStatus + Age + 
##     BillOutstanding + LastPayment + CreditLimit:Education + CreditLimit:Age + 
##     CreditLimit:BillOutstanding
## 
##                               Df Deviance   AIC
## <none>                              30254 30286
## - CreditLimit:Education        3    30271 30297
## - CreditLimit:BillOutstanding  1    30275 30305
## - CreditLimit:Age              1    30280 30310
## - Male                         1    30281 30311
## - MaritalStatus                2    30292 30320
## - LastPayment                  1    30434 30464
## 
## Call:
## glm(formula = Default ~ CreditLimit + Male + Education + MaritalStatus + 
##     Age + BillOutstanding + LastPayment + CreditLimit:Education + 
##     CreditLimit:Age + CreditLimit:BillOutstanding, family = binomial(), 
##     data = CCdefault.dt)
## 
## Deviance Residuals: 
##     Min       1Q   Median       3Q      Max  
## -1.7631  -0.7746  -0.6425  -0.3637   4.3991  
## 
## Coefficients:
##                               Estimate Std. Error z value Pr(>|z|)    
## (Intercept)                 -5.332e-01  1.007e-01  -5.296 1.18e-07 ***
## CreditLimit                 -5.537e-06  5.391e-07 -10.271  < 2e-16 ***
## Male1                        1.509e-01  2.921e-02   5.164 2.42e-07 ***
## Education2                   1.655e-01  5.483e-02   3.018 0.002546 ** 
## Education3                   1.601e-01  6.927e-02   2.311 0.020827 *  
## Education4                   6.554e-02  9.466e-01   0.069 0.944803    
## MaritalStatus2              -2.010e-01  3.298e-02  -6.095 1.10e-09 ***
## MaritalStatus3              -1.026e-01  1.311e-01  -0.783 0.433761    
## Age                         -5.040e-03  2.426e-03  -2.077 0.037778 *  
## BillOutstanding              4.235e-08  4.562e-07   0.093 0.926033    
## LastPayment                 -2.771e-05  2.683e-06 -10.327  < 2e-16 ***
## CreditLimit:Education2      -9.933e-07  2.818e-07  -3.525 0.000424 ***
## CreditLimit:Education3      -1.087e-06  4.097e-07  -2.653 0.007988 ** 
## CreditLimit:Education4      -8.406e-06  5.774e-06  -1.456 0.145449    
## CreditLimit:Age              6.942e-08  1.352e-08   5.136 2.81e-07 ***
## CreditLimit:BillOutstanding  5.939e-12  1.307e-12   4.544 5.51e-06 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 31427  on 29600  degrees of freedom
## Residual deviance: 30254  on 29585  degrees of freedom
## AIC: 30286
## 
## Number of Fisher Scoring iterations: 6