Dalam menentukan kelayakan kredit maka dilakukan proses klasifikasi pelanggan yang berisiko dengan yang tidak dan metode yang digunakan adalah metode regresi logistik. Data yang digunakan adalah data penilaian kredit Jerman yang disediakan oleh Dr. Hans Hofmann di University of Hamburg #Pengenalan Data

Memanggil data GermanCredit

library(caret)
## Warning: package 'caret' was built under R version 3.5.3
## Loading required package: lattice
## Loading required package: ggplot2
## Warning: package 'ggplot2' was built under R version 3.5.3
# Memanggil data GermanCredit
# Data dari Dr. Hans Hofmann di University of Hamburg
data(GermanCredit)
head(GermanCredit,10)
##    Duration Amount InstallmentRatePercentage ResidenceDuration Age
## 1         6   1169                         4                 4  67
## 2        48   5951                         2                 2  22
## 3        12   2096                         2                 3  49
## 4        42   7882                         2                 4  45
## 5        24   4870                         3                 4  53
## 6        36   9055                         2                 4  35
## 7        24   2835                         3                 4  53
## 8        36   6948                         2                 2  35
## 9        12   3059                         2                 4  61
## 10       30   5234                         4                 2  28
##    NumberExistingCredits NumberPeopleMaintenance Telephone ForeignWorker
## 1                      2                       1         0             1
## 2                      1                       1         1             1
## 3                      1                       2         1             1
## 4                      1                       2         1             1
## 5                      2                       2         1             1
## 6                      1                       2         0             1
## 7                      1                       1         1             1
## 8                      1                       1         0             1
## 9                      1                       1         1             1
## 10                     2                       1         1             1
##    Class CheckingAccountStatus.lt.0 CheckingAccountStatus.0.to.200
## 1   Good                          1                              0
## 2    Bad                          0                              1
## 3   Good                          0                              0
## 4   Good                          1                              0
## 5    Bad                          1                              0
## 6   Good                          0                              0
## 7   Good                          0                              0
## 8   Good                          0                              1
## 9   Good                          0                              0
## 10   Bad                          0                              1
##    CheckingAccountStatus.gt.200 CheckingAccountStatus.none
## 1                             0                          0
## 2                             0                          0
## 3                             0                          1
## 4                             0                          0
## 5                             0                          0
## 6                             0                          1
## 7                             0                          1
## 8                             0                          0
## 9                             0                          1
## 10                            0                          0
##    CreditHistory.NoCredit.AllPaid CreditHistory.ThisBank.AllPaid
## 1                               0                              0
## 2                               0                              0
## 3                               0                              0
## 4                               0                              0
## 5                               0                              0
## 6                               0                              0
## 7                               0                              0
## 8                               0                              0
## 9                               0                              0
## 10                              0                              0
##    CreditHistory.PaidDuly CreditHistory.Delay CreditHistory.Critical
## 1                       0                   0                      1
## 2                       1                   0                      0
## 3                       0                   0                      1
## 4                       1                   0                      0
## 5                       0                   1                      0
## 6                       1                   0                      0
## 7                       1                   0                      0
## 8                       1                   0                      0
## 9                       1                   0                      0
## 10                      0                   0                      1
##    Purpose.NewCar Purpose.UsedCar Purpose.Furniture.Equipment
## 1               0               0                           0
## 2               0               0                           0
## 3               0               0                           0
## 4               0               0                           1
## 5               1               0                           0
## 6               0               0                           0
## 7               0               0                           1
## 8               0               1                           0
## 9               0               0                           0
## 10              1               0                           0
##    Purpose.Radio.Television Purpose.DomesticAppliance Purpose.Repairs
## 1                         1                         0               0
## 2                         1                         0               0
## 3                         0                         0               0
## 4                         0                         0               0
## 5                         0                         0               0
## 6                         0                         0               0
## 7                         0                         0               0
## 8                         0                         0               0
## 9                         1                         0               0
## 10                        0                         0               0
##    Purpose.Education Purpose.Vacation Purpose.Retraining Purpose.Business
## 1                  0                0                  0                0
## 2                  0                0                  0                0
## 3                  1                0                  0                0
## 4                  0                0                  0                0
## 5                  0                0                  0                0
## 6                  1                0                  0                0
## 7                  0                0                  0                0
## 8                  0                0                  0                0
## 9                  0                0                  0                0
## 10                 0                0                  0                0
##    Purpose.Other SavingsAccountBonds.lt.100 SavingsAccountBonds.100.to.500
## 1              0                          0                              0
## 2              0                          1                              0
## 3              0                          1                              0
## 4              0                          1                              0
## 5              0                          1                              0
## 6              0                          0                              0
## 7              0                          0                              0
## 8              0                          1                              0
## 9              0                          0                              0
## 10             0                          1                              0
##    SavingsAccountBonds.500.to.1000 SavingsAccountBonds.gt.1000
## 1                                0                           0
## 2                                0                           0
## 3                                0                           0
## 4                                0                           0
## 5                                0                           0
## 6                                0                           0
## 7                                1                           0
## 8                                0                           0
## 9                                0                           1
## 10                               0                           0
##    SavingsAccountBonds.Unknown EmploymentDuration.lt.1
## 1                            1                       0
## 2                            0                       0
## 3                            0                       0
## 4                            0                       0
## 5                            0                       0
## 6                            1                       0
## 7                            0                       0
## 8                            0                       0
## 9                            0                       0
## 10                           0                       0
##    EmploymentDuration.1.to.4 EmploymentDuration.4.to.7
## 1                          0                         0
## 2                          1                         0
## 3                          0                         1
## 4                          0                         1
## 5                          1                         0
## 6                          1                         0
## 7                          0                         0
## 8                          1                         0
## 9                          0                         1
## 10                         0                         0
##    EmploymentDuration.gt.7 EmploymentDuration.Unemployed
## 1                        1                             0
## 2                        0                             0
## 3                        0                             0
## 4                        0                             0
## 5                        0                             0
## 6                        0                             0
## 7                        1                             0
## 8                        0                             0
## 9                        0                             0
## 10                       0                             1
##    Personal.Male.Divorced.Seperated Personal.Female.NotSingle
## 1                                 0                         0
## 2                                 0                         1
## 3                                 0                         0
## 4                                 0                         0
## 5                                 0                         0
## 6                                 0                         0
## 7                                 0                         0
## 8                                 0                         0
## 9                                 1                         0
## 10                                0                         0
##    Personal.Male.Single Personal.Male.Married.Widowed
## 1                     1                             0
## 2                     0                             0
## 3                     1                             0
## 4                     1                             0
## 5                     1                             0
## 6                     1                             0
## 7                     1                             0
## 8                     1                             0
## 9                     0                             0
## 10                    0                             1
##    Personal.Female.Single OtherDebtorsGuarantors.None
## 1                       0                           1
## 2                       0                           1
## 3                       0                           1
## 4                       0                           0
## 5                       0                           1
## 6                       0                           1
## 7                       0                           1
## 8                       0                           1
## 9                       0                           1
## 10                      0                           1
##    OtherDebtorsGuarantors.CoApplicant OtherDebtorsGuarantors.Guarantor
## 1                                   0                                0
## 2                                   0                                0
## 3                                   0                                0
## 4                                   0                                1
## 5                                   0                                0
## 6                                   0                                0
## 7                                   0                                0
## 8                                   0                                0
## 9                                   0                                0
## 10                                  0                                0
##    Property.RealEstate Property.Insurance Property.CarOther
## 1                    1                  0                 0
## 2                    1                  0                 0
## 3                    1                  0                 0
## 4                    0                  1                 0
## 5                    0                  0                 0
## 6                    0                  0                 0
## 7                    0                  1                 0
## 8                    0                  0                 1
## 9                    1                  0                 0
## 10                   0                  0                 1
##    Property.Unknown OtherInstallmentPlans.Bank
## 1                 0                          0
## 2                 0                          0
## 3                 0                          0
## 4                 0                          0
## 5                 1                          0
## 6                 1                          0
## 7                 0                          0
## 8                 0                          0
## 9                 0                          0
## 10                0                          0
##    OtherInstallmentPlans.Stores OtherInstallmentPlans.None Housing.Rent
## 1                             0                          1            0
## 2                             0                          1            0
## 3                             0                          1            0
## 4                             0                          1            0
## 5                             0                          1            0
## 6                             0                          1            0
## 7                             0                          1            0
## 8                             0                          1            1
## 9                             0                          1            0
## 10                            0                          1            0
##    Housing.Own Housing.ForFree Job.UnemployedUnskilled
## 1            1               0                       0
## 2            1               0                       0
## 3            1               0                       0
## 4            0               1                       0
## 5            0               1                       0
## 6            0               1                       0
## 7            1               0                       0
## 8            0               0                       0
## 9            1               0                       0
## 10           1               0                       0
##    Job.UnskilledResident Job.SkilledEmployee
## 1                      0                   1
## 2                      0                   1
## 3                      1                   0
## 4                      0                   1
## 5                      0                   1
## 6                      1                   0
## 7                      0                   1
## 8                      0                   0
## 9                      1                   0
## 10                     0                   0
##    Job.Management.SelfEmp.HighlyQualified
## 1                                       0
## 2                                       0
## 3                                       0
## 4                                       0
## 5                                       0
## 6                                       0
## 7                                       0
## 8                                       1
## 9                                       0
## 10                                      1

Struktur data GermanCredit

dim(GermanCredit)
## [1] 1000   62
str(GermanCredit)
## 'data.frame':    1000 obs. of  62 variables:
##  $ Duration                              : int  6 48 12 42 24 36 24 36 12 30 ...
##  $ Amount                                : int  1169 5951 2096 7882 4870 9055 2835 6948 3059 5234 ...
##  $ InstallmentRatePercentage             : int  4 2 2 2 3 2 3 2 2 4 ...
##  $ ResidenceDuration                     : int  4 2 3 4 4 4 4 2 4 2 ...
##  $ Age                                   : int  67 22 49 45 53 35 53 35 61 28 ...
##  $ NumberExistingCredits                 : int  2 1 1 1 2 1 1 1 1 2 ...
##  $ NumberPeopleMaintenance               : int  1 1 2 2 2 2 1 1 1 1 ...
##  $ Telephone                             : num  0 1 1 1 1 0 1 0 1 1 ...
##  $ ForeignWorker                         : num  1 1 1 1 1 1 1 1 1 1 ...
##  $ Class                                 : Factor w/ 2 levels "Bad","Good": 2 1 2 2 1 2 2 2 2 1 ...
##  $ CheckingAccountStatus.lt.0            : num  1 0 0 1 1 0 0 0 0 0 ...
##  $ CheckingAccountStatus.0.to.200        : num  0 1 0 0 0 0 0 1 0 1 ...
##  $ CheckingAccountStatus.gt.200          : num  0 0 0 0 0 0 0 0 0 0 ...
##  $ CheckingAccountStatus.none            : num  0 0 1 0 0 1 1 0 1 0 ...
##  $ CreditHistory.NoCredit.AllPaid        : num  0 0 0 0 0 0 0 0 0 0 ...
##  $ CreditHistory.ThisBank.AllPaid        : num  0 0 0 0 0 0 0 0 0 0 ...
##  $ CreditHistory.PaidDuly                : num  0 1 0 1 0 1 1 1 1 0 ...
##  $ CreditHistory.Delay                   : num  0 0 0 0 1 0 0 0 0 0 ...
##  $ CreditHistory.Critical                : num  1 0 1 0 0 0 0 0 0 1 ...
##  $ Purpose.NewCar                        : num  0 0 0 0 1 0 0 0 0 1 ...
##  $ Purpose.UsedCar                       : num  0 0 0 0 0 0 0 1 0 0 ...
##  $ Purpose.Furniture.Equipment           : num  0 0 0 1 0 0 1 0 0 0 ...
##  $ Purpose.Radio.Television              : num  1 1 0 0 0 0 0 0 1 0 ...
##  $ Purpose.DomesticAppliance             : num  0 0 0 0 0 0 0 0 0 0 ...
##  $ Purpose.Repairs                       : num  0 0 0 0 0 0 0 0 0 0 ...
##  $ Purpose.Education                     : num  0 0 1 0 0 1 0 0 0 0 ...
##  $ Purpose.Vacation                      : num  0 0 0 0 0 0 0 0 0 0 ...
##  $ Purpose.Retraining                    : num  0 0 0 0 0 0 0 0 0 0 ...
##  $ Purpose.Business                      : num  0 0 0 0 0 0 0 0 0 0 ...
##  $ Purpose.Other                         : num  0 0 0 0 0 0 0 0 0 0 ...
##  $ SavingsAccountBonds.lt.100            : num  0 1 1 1 1 0 0 1 0 1 ...
##  $ SavingsAccountBonds.100.to.500        : num  0 0 0 0 0 0 0 0 0 0 ...
##  $ SavingsAccountBonds.500.to.1000       : num  0 0 0 0 0 0 1 0 0 0 ...
##  $ SavingsAccountBonds.gt.1000           : num  0 0 0 0 0 0 0 0 1 0 ...
##  $ SavingsAccountBonds.Unknown           : num  1 0 0 0 0 1 0 0 0 0 ...
##  $ EmploymentDuration.lt.1               : num  0 0 0 0 0 0 0 0 0 0 ...
##  $ EmploymentDuration.1.to.4             : num  0 1 0 0 1 1 0 1 0 0 ...
##  $ EmploymentDuration.4.to.7             : num  0 0 1 1 0 0 0 0 1 0 ...
##  $ EmploymentDuration.gt.7               : num  1 0 0 0 0 0 1 0 0 0 ...
##  $ EmploymentDuration.Unemployed         : num  0 0 0 0 0 0 0 0 0 1 ...
##  $ Personal.Male.Divorced.Seperated      : num  0 0 0 0 0 0 0 0 1 0 ...
##  $ Personal.Female.NotSingle             : num  0 1 0 0 0 0 0 0 0 0 ...
##  $ Personal.Male.Single                  : num  1 0 1 1 1 1 1 1 0 0 ...
##  $ Personal.Male.Married.Widowed         : num  0 0 0 0 0 0 0 0 0 1 ...
##  $ Personal.Female.Single                : num  0 0 0 0 0 0 0 0 0 0 ...
##  $ OtherDebtorsGuarantors.None           : num  1 1 1 0 1 1 1 1 1 1 ...
##  $ OtherDebtorsGuarantors.CoApplicant    : num  0 0 0 0 0 0 0 0 0 0 ...
##  $ OtherDebtorsGuarantors.Guarantor      : num  0 0 0 1 0 0 0 0 0 0 ...
##  $ Property.RealEstate                   : num  1 1 1 0 0 0 0 0 1 0 ...
##  $ Property.Insurance                    : num  0 0 0 1 0 0 1 0 0 0 ...
##  $ Property.CarOther                     : num  0 0 0 0 0 0 0 1 0 1 ...
##  $ Property.Unknown                      : num  0 0 0 0 1 1 0 0 0 0 ...
##  $ OtherInstallmentPlans.Bank            : num  0 0 0 0 0 0 0 0 0 0 ...
##  $ OtherInstallmentPlans.Stores          : num  0 0 0 0 0 0 0 0 0 0 ...
##  $ OtherInstallmentPlans.None            : num  1 1 1 1 1 1 1 1 1 1 ...
##  $ Housing.Rent                          : num  0 0 0 0 0 0 0 1 0 0 ...
##  $ Housing.Own                           : num  1 1 1 0 0 0 1 0 1 1 ...
##  $ Housing.ForFree                       : num  0 0 0 1 1 1 0 0 0 0 ...
##  $ Job.UnemployedUnskilled               : num  0 0 0 0 0 0 0 0 0 0 ...
##  $ Job.UnskilledResident                 : num  0 0 1 0 0 1 0 0 1 0 ...
##  $ Job.SkilledEmployee                   : num  1 1 0 1 1 0 1 0 0 0 ...
##  $ Job.Management.SelfEmp.HighlyQualified: num  0 0 0 0 0 0 0 1 0 1 ...

Deskripsi statistik data

summary(GermanCredit)
##     Duration        Amount      InstallmentRatePercentage
##  Min.   : 4.0   Min.   :  250   Min.   :1.000            
##  1st Qu.:12.0   1st Qu.: 1366   1st Qu.:2.000            
##  Median :18.0   Median : 2320   Median :3.000            
##  Mean   :20.9   Mean   : 3271   Mean   :2.973            
##  3rd Qu.:24.0   3rd Qu.: 3972   3rd Qu.:4.000            
##  Max.   :72.0   Max.   :18424   Max.   :4.000            
##  ResidenceDuration      Age        NumberExistingCredits
##  Min.   :1.000     Min.   :19.00   Min.   :1.000        
##  1st Qu.:2.000     1st Qu.:27.00   1st Qu.:1.000        
##  Median :3.000     Median :33.00   Median :1.000        
##  Mean   :2.845     Mean   :35.55   Mean   :1.407        
##  3rd Qu.:4.000     3rd Qu.:42.00   3rd Qu.:2.000        
##  Max.   :4.000     Max.   :75.00   Max.   :4.000        
##  NumberPeopleMaintenance   Telephone     ForeignWorker    Class    
##  Min.   :1.000           Min.   :0.000   Min.   :0.000   Bad :300  
##  1st Qu.:1.000           1st Qu.:0.000   1st Qu.:1.000   Good:700  
##  Median :1.000           Median :1.000   Median :1.000             
##  Mean   :1.155           Mean   :0.596   Mean   :0.963             
##  3rd Qu.:1.000           3rd Qu.:1.000   3rd Qu.:1.000             
##  Max.   :2.000           Max.   :1.000   Max.   :1.000             
##  CheckingAccountStatus.lt.0 CheckingAccountStatus.0.to.200
##  Min.   :0.000              Min.   :0.000                 
##  1st Qu.:0.000              1st Qu.:0.000                 
##  Median :0.000              Median :0.000                 
##  Mean   :0.274              Mean   :0.269                 
##  3rd Qu.:1.000              3rd Qu.:1.000                 
##  Max.   :1.000              Max.   :1.000                 
##  CheckingAccountStatus.gt.200 CheckingAccountStatus.none
##  Min.   :0.000                Min.   :0.000             
##  1st Qu.:0.000                1st Qu.:0.000             
##  Median :0.000                Median :0.000             
##  Mean   :0.063                Mean   :0.394             
##  3rd Qu.:0.000                3rd Qu.:1.000             
##  Max.   :1.000                Max.   :1.000             
##  CreditHistory.NoCredit.AllPaid CreditHistory.ThisBank.AllPaid
##  Min.   :0.00                   Min.   :0.000                 
##  1st Qu.:0.00                   1st Qu.:0.000                 
##  Median :0.00                   Median :0.000                 
##  Mean   :0.04                   Mean   :0.049                 
##  3rd Qu.:0.00                   3rd Qu.:0.000                 
##  Max.   :1.00                   Max.   :1.000                 
##  CreditHistory.PaidDuly CreditHistory.Delay CreditHistory.Critical
##  Min.   :0.00           Min.   :0.000       Min.   :0.000         
##  1st Qu.:0.00           1st Qu.:0.000       1st Qu.:0.000         
##  Median :1.00           Median :0.000       Median :0.000         
##  Mean   :0.53           Mean   :0.088       Mean   :0.293         
##  3rd Qu.:1.00           3rd Qu.:0.000       3rd Qu.:1.000         
##  Max.   :1.00           Max.   :1.000       Max.   :1.000         
##  Purpose.NewCar  Purpose.UsedCar Purpose.Furniture.Equipment
##  Min.   :0.000   Min.   :0.000   Min.   :0.000              
##  1st Qu.:0.000   1st Qu.:0.000   1st Qu.:0.000              
##  Median :0.000   Median :0.000   Median :0.000              
##  Mean   :0.234   Mean   :0.103   Mean   :0.181              
##  3rd Qu.:0.000   3rd Qu.:0.000   3rd Qu.:0.000              
##  Max.   :1.000   Max.   :1.000   Max.   :1.000              
##  Purpose.Radio.Television Purpose.DomesticAppliance Purpose.Repairs
##  Min.   :0.00             Min.   :0.000             Min.   :0.000  
##  1st Qu.:0.00             1st Qu.:0.000             1st Qu.:0.000  
##  Median :0.00             Median :0.000             Median :0.000  
##  Mean   :0.28             Mean   :0.012             Mean   :0.022  
##  3rd Qu.:1.00             3rd Qu.:0.000             3rd Qu.:0.000  
##  Max.   :1.00             Max.   :1.000             Max.   :1.000  
##  Purpose.Education Purpose.Vacation Purpose.Retraining Purpose.Business
##  Min.   :0.00      Min.   :0        Min.   :0.000      Min.   :0.000   
##  1st Qu.:0.00      1st Qu.:0        1st Qu.:0.000      1st Qu.:0.000   
##  Median :0.00      Median :0        Median :0.000      Median :0.000   
##  Mean   :0.05      Mean   :0        Mean   :0.009      Mean   :0.097   
##  3rd Qu.:0.00      3rd Qu.:0        3rd Qu.:0.000      3rd Qu.:0.000   
##  Max.   :1.00      Max.   :0        Max.   :1.000      Max.   :1.000   
##  Purpose.Other   SavingsAccountBonds.lt.100 SavingsAccountBonds.100.to.500
##  Min.   :0.000   Min.   :0.000              Min.   :0.000                 
##  1st Qu.:0.000   1st Qu.:0.000              1st Qu.:0.000                 
##  Median :0.000   Median :1.000              Median :0.000                 
##  Mean   :0.012   Mean   :0.603              Mean   :0.103                 
##  3rd Qu.:0.000   3rd Qu.:1.000              3rd Qu.:0.000                 
##  Max.   :1.000   Max.   :1.000              Max.   :1.000                 
##  SavingsAccountBonds.500.to.1000 SavingsAccountBonds.gt.1000
##  Min.   :0.000                   Min.   :0.000              
##  1st Qu.:0.000                   1st Qu.:0.000              
##  Median :0.000                   Median :0.000              
##  Mean   :0.063                   Mean   :0.048              
##  3rd Qu.:0.000                   3rd Qu.:0.000              
##  Max.   :1.000                   Max.   :1.000              
##  SavingsAccountBonds.Unknown EmploymentDuration.lt.1
##  Min.   :0.000               Min.   :0.000          
##  1st Qu.:0.000               1st Qu.:0.000          
##  Median :0.000               Median :0.000          
##  Mean   :0.183               Mean   :0.172          
##  3rd Qu.:0.000               3rd Qu.:0.000          
##  Max.   :1.000               Max.   :1.000          
##  EmploymentDuration.1.to.4 EmploymentDuration.4.to.7
##  Min.   :0.000             Min.   :0.000            
##  1st Qu.:0.000             1st Qu.:0.000            
##  Median :0.000             Median :0.000            
##  Mean   :0.339             Mean   :0.174            
##  3rd Qu.:1.000             3rd Qu.:0.000            
##  Max.   :1.000             Max.   :1.000            
##  EmploymentDuration.gt.7 EmploymentDuration.Unemployed
##  Min.   :0.000           Min.   :0.000                
##  1st Qu.:0.000           1st Qu.:0.000                
##  Median :0.000           Median :0.000                
##  Mean   :0.253           Mean   :0.062                
##  3rd Qu.:1.000           3rd Qu.:0.000                
##  Max.   :1.000           Max.   :1.000                
##  Personal.Male.Divorced.Seperated Personal.Female.NotSingle
##  Min.   :0.00                     Min.   :0.00             
##  1st Qu.:0.00                     1st Qu.:0.00             
##  Median :0.00                     Median :0.00             
##  Mean   :0.05                     Mean   :0.31             
##  3rd Qu.:0.00                     3rd Qu.:1.00             
##  Max.   :1.00                     Max.   :1.00             
##  Personal.Male.Single Personal.Male.Married.Widowed Personal.Female.Single
##  Min.   :0.000        Min.   :0.000                 Min.   :0             
##  1st Qu.:0.000        1st Qu.:0.000                 1st Qu.:0             
##  Median :1.000        Median :0.000                 Median :0             
##  Mean   :0.548        Mean   :0.092                 Mean   :0             
##  3rd Qu.:1.000        3rd Qu.:0.000                 3rd Qu.:0             
##  Max.   :1.000        Max.   :1.000                 Max.   :0             
##  OtherDebtorsGuarantors.None OtherDebtorsGuarantors.CoApplicant
##  Min.   :0.000               Min.   :0.000                     
##  1st Qu.:1.000               1st Qu.:0.000                     
##  Median :1.000               Median :0.000                     
##  Mean   :0.907               Mean   :0.041                     
##  3rd Qu.:1.000               3rd Qu.:0.000                     
##  Max.   :1.000               Max.   :1.000                     
##  OtherDebtorsGuarantors.Guarantor Property.RealEstate Property.Insurance
##  Min.   :0.000                    Min.   :0.000       Min.   :0.000     
##  1st Qu.:0.000                    1st Qu.:0.000       1st Qu.:0.000     
##  Median :0.000                    Median :0.000       Median :0.000     
##  Mean   :0.052                    Mean   :0.282       Mean   :0.232     
##  3rd Qu.:0.000                    3rd Qu.:1.000       3rd Qu.:0.000     
##  Max.   :1.000                    Max.   :1.000       Max.   :1.000     
##  Property.CarOther Property.Unknown OtherInstallmentPlans.Bank
##  Min.   :0.000     Min.   :0.000    Min.   :0.000             
##  1st Qu.:0.000     1st Qu.:0.000    1st Qu.:0.000             
##  Median :0.000     Median :0.000    Median :0.000             
##  Mean   :0.332     Mean   :0.154    Mean   :0.139             
##  3rd Qu.:1.000     3rd Qu.:0.000    3rd Qu.:0.000             
##  Max.   :1.000     Max.   :1.000    Max.   :1.000             
##  OtherInstallmentPlans.Stores OtherInstallmentPlans.None  Housing.Rent  
##  Min.   :0.000                Min.   :0.000              Min.   :0.000  
##  1st Qu.:0.000                1st Qu.:1.000              1st Qu.:0.000  
##  Median :0.000                Median :1.000              Median :0.000  
##  Mean   :0.047                Mean   :0.814              Mean   :0.179  
##  3rd Qu.:0.000                3rd Qu.:1.000              3rd Qu.:0.000  
##  Max.   :1.000                Max.   :1.000              Max.   :1.000  
##   Housing.Own    Housing.ForFree Job.UnemployedUnskilled
##  Min.   :0.000   Min.   :0.000   Min.   :0.000          
##  1st Qu.:0.000   1st Qu.:0.000   1st Qu.:0.000          
##  Median :1.000   Median :0.000   Median :0.000          
##  Mean   :0.713   Mean   :0.108   Mean   :0.022          
##  3rd Qu.:1.000   3rd Qu.:0.000   3rd Qu.:0.000          
##  Max.   :1.000   Max.   :1.000   Max.   :1.000          
##  Job.UnskilledResident Job.SkilledEmployee
##  Min.   :0.0           Min.   :0.00       
##  1st Qu.:0.0           1st Qu.:0.00       
##  Median :0.0           Median :1.00       
##  Mean   :0.2           Mean   :0.63       
##  3rd Qu.:0.0           3rd Qu.:1.00       
##  Max.   :1.0           Max.   :1.00       
##  Job.Management.SelfEmp.HighlyQualified
##  Min.   :0.000                         
##  1st Qu.:0.000                         
##  Median :0.000                         
##  Mean   :0.148                         
##  3rd Qu.:0.000                         
##  Max.   :1.000

Eksplorasi data

Mengubah nilai data dari bad/good ke 0/1

GermanCredit$Class=ifelse(GermanCredit$Class=="Bad",1,0)

Melihat data yang telah diubah pada variabel class

GermanCredit$Class[1:100]
##   [1] 0 1 0 0 1 0 0 0 0 1 1 1 0 1 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0
##  [36] 1 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 1 0 0 1 0 0 1 1 0 0 0 0 1 0
##  [71] 0 0 0 0 1 0 1 0 0 0 1 0 0 0 0 0 0 1 0 1 0 0 1 0 0 1 0 0 0 0

Persiapan Data Training dan Testing

Cara yang digunakan adalah dengan pengambilan acak

set.seed(1234)
inTrain=createDataPartition(GermanCredit$Class, p=0.7, list=FALSE)

Membuat data training

Training=GermanCredit[inTrain,]

Membuat data testing

Testing=GermanCredit[-inTrain,]

Hasil dari data training dan testing

dim(Training)
## [1] 700  62
dim(Testing)
## [1] 300  62

Membangun Model Regresi Logistik

Membangun model awal

library(usdm)
## Warning: package 'usdm' was built under R version 3.5.3
## Loading required package: sp
## Loading required package: raster
fit=glm(Class~ Duration+InstallmentRatePercentage+ResidenceDuration+Age+NumberExistingCredits+
           NumberPeopleMaintenance+Telephone+ForeignWorker+CheckingAccountStatus.0.to.200+
           CheckingAccountStatus.gt.200+CheckingAccountStatus.none+CreditHistory.ThisBank.AllPaid+
           CreditHistory.Delay+CreditHistory.Critical+Purpose.UsedCar+Purpose.Furniture.Equipment+
           Purpose.Radio.Television+Purpose.DomesticAppliance+Purpose.Repairs+Purpose.Education+
           Purpose.Retraining+Purpose.Business+ Purpose.Other+SavingsAccountBonds.100.to.500+
           SavingsAccountBonds.500.to.1000+SavingsAccountBonds.gt.1000+SavingsAccountBonds.Unknown+
           EmploymentDuration.1.to.4+EmploymentDuration.4.to.7+
           EmploymentDuration.Unemployed+Personal.Female.NotSingle+Personal.Male.Married.Widowed+
           OtherDebtorsGuarantors.CoApplicant+OtherDebtorsGuarantors.Guarantor+Property.Insurance+
           Property.CarOther+OtherInstallmentPlans.Stores+OtherInstallmentPlans.None+
           Housing.Own+Job.UnskilledResident+Job.Management.SelfEmp.HighlyQualified,
         data=Training,family=binomial(link="logit"))

Analisis model dan variabel bebas untuk menghapus yang tak berpengaruh dengan melihat nilai AIC yang untuk mengurangi variabel dan melihat model berdasarkan nilai signfikansi terhadap nilai Pr(>|z|) < 0.05 variabel untuk mendapatkan nilai aic terkeci.

library(MASS)
## Warning: package 'MASS' was built under R version 3.5.3
## 
## Attaching package: 'MASS'
## The following objects are masked from 'package:raster':
## 
##     area, select
step=stepAIC(fit, direction="both")
## Start:  AIC=692.3
## Class ~ Duration + InstallmentRatePercentage + ResidenceDuration + 
##     Age + NumberExistingCredits + NumberPeopleMaintenance + Telephone + 
##     ForeignWorker + CheckingAccountStatus.0.to.200 + CheckingAccountStatus.gt.200 + 
##     CheckingAccountStatus.none + CreditHistory.ThisBank.AllPaid + 
##     CreditHistory.Delay + CreditHistory.Critical + Purpose.UsedCar + 
##     Purpose.Furniture.Equipment + Purpose.Radio.Television + 
##     Purpose.DomesticAppliance + Purpose.Repairs + Purpose.Education + 
##     Purpose.Retraining + Purpose.Business + Purpose.Other + SavingsAccountBonds.100.to.500 + 
##     SavingsAccountBonds.500.to.1000 + SavingsAccountBonds.gt.1000 + 
##     SavingsAccountBonds.Unknown + EmploymentDuration.1.to.4 + 
##     EmploymentDuration.4.to.7 + EmploymentDuration.Unemployed + 
##     Personal.Female.NotSingle + Personal.Male.Married.Widowed + 
##     OtherDebtorsGuarantors.CoApplicant + OtherDebtorsGuarantors.Guarantor + 
##     Property.Insurance + Property.CarOther + OtherInstallmentPlans.Stores + 
##     OtherInstallmentPlans.None + Housing.Own + Job.UnskilledResident + 
##     Job.Management.SelfEmp.HighlyQualified
## 
##                                          Df Deviance    AIC
## - OtherInstallmentPlans.Stores            1   608.32 690.32
## - NumberPeopleMaintenance                 1   608.34 690.34
## - OtherDebtorsGuarantors.CoApplicant      1   608.42 690.42
## - Job.UnskilledResident                   1   608.47 690.47
## - EmploymentDuration.Unemployed           1   608.47 690.47
## - Purpose.Education                       1   608.51 690.51
## - ResidenceDuration                       1   608.58 690.58
## - CreditHistory.Delay                     1   608.62 690.62
## - EmploymentDuration.1.to.4               1   608.70 690.70
## - Personal.Male.Married.Widowed           1   608.70 690.70
## - Purpose.DomesticAppliance               1   608.83 690.83
## - Purpose.Repairs                         1   608.98 690.98
## - Job.Management.SelfEmp.HighlyQualified  1   609.13 691.13
## - ForeignWorker                           1   609.47 691.47
## - CreditHistory.ThisBank.AllPaid          1   609.49 691.49
## - Purpose.Other                           1   609.72 691.72
## - SavingsAccountBonds.100.to.500          1   609.78 691.78
## - OtherInstallmentPlans.None              1   609.80 691.80
## - Purpose.Business                        1   609.94 691.94
## - CheckingAccountStatus.0.to.200          1   609.94 691.94
## - Property.Insurance                      1   610.29 692.29
## <none>                                        608.30 692.30
## - Age                                     1   610.91 692.91
## - Telephone                               1   611.07 693.07
## - Property.CarOther                       1   611.20 693.20
## - Purpose.Retraining                      1   611.40 693.40
## - SavingsAccountBonds.500.to.1000         1   611.40 693.40
## - Personal.Female.NotSingle               1   611.48 693.48
## - NumberExistingCredits                   1   611.75 693.75
## - OtherDebtorsGuarantors.Guarantor        1   612.26 694.26
## - Housing.Own                             1   612.33 694.33
## - CheckingAccountStatus.gt.200            1   612.89 694.89
## - Purpose.Furniture.Equipment             1   614.70 696.70
## - SavingsAccountBonds.gt.1000             1   617.21 699.21
## - InstallmentRatePercentage               1   618.08 700.08
## - CreditHistory.Critical                  1   619.32 701.32
## - Purpose.Radio.Television                1   619.64 701.64
## - EmploymentDuration.4.to.7               1   620.66 702.66
## - Purpose.UsedCar                         1   623.01 705.01
## - SavingsAccountBonds.Unknown             1   627.14 709.14
## - Duration                                1   639.71 721.71
## - CheckingAccountStatus.none              1   640.48 722.48
## 
## Step:  AIC=690.32
## Class ~ Duration + InstallmentRatePercentage + ResidenceDuration + 
##     Age + NumberExistingCredits + NumberPeopleMaintenance + Telephone + 
##     ForeignWorker + CheckingAccountStatus.0.to.200 + CheckingAccountStatus.gt.200 + 
##     CheckingAccountStatus.none + CreditHistory.ThisBank.AllPaid + 
##     CreditHistory.Delay + CreditHistory.Critical + Purpose.UsedCar + 
##     Purpose.Furniture.Equipment + Purpose.Radio.Television + 
##     Purpose.DomesticAppliance + Purpose.Repairs + Purpose.Education + 
##     Purpose.Retraining + Purpose.Business + Purpose.Other + SavingsAccountBonds.100.to.500 + 
##     SavingsAccountBonds.500.to.1000 + SavingsAccountBonds.gt.1000 + 
##     SavingsAccountBonds.Unknown + EmploymentDuration.1.to.4 + 
##     EmploymentDuration.4.to.7 + EmploymentDuration.Unemployed + 
##     Personal.Female.NotSingle + Personal.Male.Married.Widowed + 
##     OtherDebtorsGuarantors.CoApplicant + OtherDebtorsGuarantors.Guarantor + 
##     Property.Insurance + Property.CarOther + OtherInstallmentPlans.None + 
##     Housing.Own + Job.UnskilledResident + Job.Management.SelfEmp.HighlyQualified
## 
##                                          Df Deviance    AIC
## - NumberPeopleMaintenance                 1   608.35 688.35
## - OtherDebtorsGuarantors.CoApplicant      1   608.43 688.43
## - Job.UnskilledResident                   1   608.47 688.47
## - EmploymentDuration.Unemployed           1   608.48 688.48
## - Purpose.Education                       1   608.53 688.53
## - ResidenceDuration                       1   608.59 688.59
## - CreditHistory.Delay                     1   608.62 688.62
## - EmploymentDuration.1.to.4               1   608.70 688.70
## - Personal.Male.Married.Widowed           1   608.71 688.71
## - Purpose.DomesticAppliance               1   608.85 688.85
## - Purpose.Repairs                         1   609.00 689.00
## - Job.Management.SelfEmp.HighlyQualified  1   609.14 689.14
## - ForeignWorker                           1   609.49 689.49
## - CreditHistory.ThisBank.AllPaid          1   609.55 689.55
## - Purpose.Other                           1   609.74 689.74
## - SavingsAccountBonds.100.to.500          1   609.80 689.80
## - Purpose.Business                        1   609.96 689.96
## - CheckingAccountStatus.0.to.200          1   609.96 689.96
## - OtherInstallmentPlans.None              1   610.21 690.21
## - Property.Insurance                      1   610.29 690.29
## <none>                                        608.32 690.32
## - Age                                     1   610.93 690.93
## - Telephone                               1   611.07 691.07
## - Property.CarOther                       1   611.22 691.22
## - SavingsAccountBonds.500.to.1000         1   611.41 691.41
## - Purpose.Retraining                      1   611.43 691.43
## - Personal.Female.NotSingle               1   611.49 691.49
## - NumberExistingCredits                   1   611.75 691.75
## + OtherInstallmentPlans.Stores            1   608.30 692.30
## - OtherDebtorsGuarantors.Guarantor        1   612.31 692.31
## - Housing.Own                             1   612.33 692.33
## - CheckingAccountStatus.gt.200            1   612.90 692.90
## - Purpose.Furniture.Equipment             1   614.70 694.70
## - SavingsAccountBonds.gt.1000             1   617.21 697.21
## - InstallmentRatePercentage               1   618.20 698.20
## - CreditHistory.Critical                  1   619.32 699.32
## - Purpose.Radio.Television                1   619.67 699.67
## - EmploymentDuration.4.to.7               1   620.73 700.73
## - Purpose.UsedCar                         1   623.02 703.02
## - SavingsAccountBonds.Unknown             1   627.25 707.25
## - Duration                                1   639.85 719.85
## - CheckingAccountStatus.none              1   640.49 720.49
## 
## Step:  AIC=688.35
## Class ~ Duration + InstallmentRatePercentage + ResidenceDuration + 
##     Age + NumberExistingCredits + Telephone + ForeignWorker + 
##     CheckingAccountStatus.0.to.200 + CheckingAccountStatus.gt.200 + 
##     CheckingAccountStatus.none + CreditHistory.ThisBank.AllPaid + 
##     CreditHistory.Delay + CreditHistory.Critical + Purpose.UsedCar + 
##     Purpose.Furniture.Equipment + Purpose.Radio.Television + 
##     Purpose.DomesticAppliance + Purpose.Repairs + Purpose.Education + 
##     Purpose.Retraining + Purpose.Business + Purpose.Other + SavingsAccountBonds.100.to.500 + 
##     SavingsAccountBonds.500.to.1000 + SavingsAccountBonds.gt.1000 + 
##     SavingsAccountBonds.Unknown + EmploymentDuration.1.to.4 + 
##     EmploymentDuration.4.to.7 + EmploymentDuration.Unemployed + 
##     Personal.Female.NotSingle + Personal.Male.Married.Widowed + 
##     OtherDebtorsGuarantors.CoApplicant + OtherDebtorsGuarantors.Guarantor + 
##     Property.Insurance + Property.CarOther + OtherInstallmentPlans.None + 
##     Housing.Own + Job.UnskilledResident + Job.Management.SelfEmp.HighlyQualified
## 
##                                          Df Deviance    AIC
## - OtherDebtorsGuarantors.CoApplicant      1   608.47 686.47
## - Job.UnskilledResident                   1   608.49 686.49
## - EmploymentDuration.Unemployed           1   608.51 686.51
## - Purpose.Education                       1   608.56 686.56
## - ResidenceDuration                       1   608.62 686.62
## - CreditHistory.Delay                     1   608.65 686.65
## - Personal.Male.Married.Widowed           1   608.72 686.72
## - EmploymentDuration.1.to.4               1   608.73 686.73
## - Purpose.DomesticAppliance               1   608.90 686.90
## - Purpose.Repairs                         1   609.02 687.02
## - Job.Management.SelfEmp.HighlyQualified  1   609.15 687.15
## - ForeignWorker                           1   609.52 687.52
## - CreditHistory.ThisBank.AllPaid          1   609.60 687.60
## - Purpose.Other                           1   609.79 687.79
## - SavingsAccountBonds.100.to.500          1   609.82 687.82
## - CheckingAccountStatus.0.to.200          1   610.00 688.00
## - Purpose.Business                        1   610.01 688.01
## - OtherInstallmentPlans.None              1   610.24 688.24
## - Property.Insurance                      1   610.33 688.33
## <none>                                        608.35 688.35
## - Age                                     1   610.94 688.94
## - Telephone                               1   611.10 689.10
## - Property.CarOther                       1   611.26 689.26
## - Purpose.Retraining                      1   611.48 689.48
## - SavingsAccountBonds.500.to.1000         1   611.48 689.48
## - Personal.Female.NotSingle               1   611.57 689.57
## - NumberExistingCredits                   1   611.87 689.87
## + NumberPeopleMaintenance                 1   608.32 690.32
## - OtherDebtorsGuarantors.Guarantor        1   612.33 690.33
## + OtherInstallmentPlans.Stores            1   608.34 690.34
## - Housing.Own                             1   612.39 690.39
## - CheckingAccountStatus.gt.200            1   612.96 690.96
## - Purpose.Furniture.Equipment             1   614.88 692.88
## - SavingsAccountBonds.gt.1000             1   617.21 695.21
## - InstallmentRatePercentage               1   618.22 696.22
## - CreditHistory.Critical                  1   619.44 697.44
## - Purpose.Radio.Television                1   619.87 697.87
## - EmploymentDuration.4.to.7               1   620.76 698.76
## - Purpose.UsedCar                         1   623.13 701.13
## - SavingsAccountBonds.Unknown             1   627.30 705.30
## - Duration                                1   639.86 717.86
## - CheckingAccountStatus.none              1   640.69 718.69
## 
## Step:  AIC=686.47
## Class ~ Duration + InstallmentRatePercentage + ResidenceDuration + 
##     Age + NumberExistingCredits + Telephone + ForeignWorker + 
##     CheckingAccountStatus.0.to.200 + CheckingAccountStatus.gt.200 + 
##     CheckingAccountStatus.none + CreditHistory.ThisBank.AllPaid + 
##     CreditHistory.Delay + CreditHistory.Critical + Purpose.UsedCar + 
##     Purpose.Furniture.Equipment + Purpose.Radio.Television + 
##     Purpose.DomesticAppliance + Purpose.Repairs + Purpose.Education + 
##     Purpose.Retraining + Purpose.Business + Purpose.Other + SavingsAccountBonds.100.to.500 + 
##     SavingsAccountBonds.500.to.1000 + SavingsAccountBonds.gt.1000 + 
##     SavingsAccountBonds.Unknown + EmploymentDuration.1.to.4 + 
##     EmploymentDuration.4.to.7 + EmploymentDuration.Unemployed + 
##     Personal.Female.NotSingle + Personal.Male.Married.Widowed + 
##     OtherDebtorsGuarantors.Guarantor + Property.Insurance + Property.CarOther + 
##     OtherInstallmentPlans.None + Housing.Own + Job.UnskilledResident + 
##     Job.Management.SelfEmp.HighlyQualified
## 
##                                          Df Deviance    AIC
## - Job.UnskilledResident                   1   608.60 684.60
## - EmploymentDuration.Unemployed           1   608.65 684.65
## - Purpose.Education                       1   608.70 684.70
## - ResidenceDuration                       1   608.73 684.73
## - CreditHistory.Delay                     1   608.77 684.77
## - Personal.Male.Married.Widowed           1   608.83 684.83
## - EmploymentDuration.1.to.4               1   608.84 684.84
## - Purpose.DomesticAppliance               1   609.00 685.00
## - Purpose.Repairs                         1   609.15 685.15
## - Job.Management.SelfEmp.HighlyQualified  1   609.27 685.27
## - CreditHistory.ThisBank.AllPaid          1   609.66 685.66
## - ForeignWorker                           1   609.69 685.69
## - SavingsAccountBonds.100.to.500          1   609.89 685.89
## - Purpose.Other                           1   610.01 686.01
## - CheckingAccountStatus.0.to.200          1   610.07 686.07
## - Purpose.Business                        1   610.12 686.12
## - Property.Insurance                      1   610.44 686.44
## - OtherInstallmentPlans.None              1   610.45 686.45
## <none>                                        608.47 686.47
## - Age                                     1   611.09 687.09
## - Telephone                               1   611.18 687.18
## - Property.CarOther                       1   611.40 687.40
## - SavingsAccountBonds.500.to.1000         1   611.54 687.54
## - Purpose.Retraining                      1   611.56 687.56
## - Personal.Female.NotSingle               1   611.73 687.73
## - NumberExistingCredits                   1   612.00 688.00
## + OtherDebtorsGuarantors.CoApplicant      1   608.35 688.35
## - OtherDebtorsGuarantors.Guarantor        1   612.37 688.37
## + NumberPeopleMaintenance                 1   608.43 688.43
## + OtherInstallmentPlans.Stores            1   608.46 688.46
## - Housing.Own                             1   612.46 688.46
## - CheckingAccountStatus.gt.200            1   613.01 689.01
## - Purpose.Furniture.Equipment             1   615.03 691.03
## - SavingsAccountBonds.gt.1000             1   617.25 693.25
## - InstallmentRatePercentage               1   618.36 694.36
## - CreditHistory.Critical                  1   619.57 695.57
## - Purpose.Radio.Television                1   619.96 695.96
## - EmploymentDuration.4.to.7               1   620.82 696.82
## - Purpose.UsedCar                         1   623.13 699.13
## - SavingsAccountBonds.Unknown             1   627.32 703.32
## - Duration                                1   640.03 716.03
## - CheckingAccountStatus.none              1   640.74 716.74
## 
## Step:  AIC=684.6
## Class ~ Duration + InstallmentRatePercentage + ResidenceDuration + 
##     Age + NumberExistingCredits + Telephone + ForeignWorker + 
##     CheckingAccountStatus.0.to.200 + CheckingAccountStatus.gt.200 + 
##     CheckingAccountStatus.none + CreditHistory.ThisBank.AllPaid + 
##     CreditHistory.Delay + CreditHistory.Critical + Purpose.UsedCar + 
##     Purpose.Furniture.Equipment + Purpose.Radio.Television + 
##     Purpose.DomesticAppliance + Purpose.Repairs + Purpose.Education + 
##     Purpose.Retraining + Purpose.Business + Purpose.Other + SavingsAccountBonds.100.to.500 + 
##     SavingsAccountBonds.500.to.1000 + SavingsAccountBonds.gt.1000 + 
##     SavingsAccountBonds.Unknown + EmploymentDuration.1.to.4 + 
##     EmploymentDuration.4.to.7 + EmploymentDuration.Unemployed + 
##     Personal.Female.NotSingle + Personal.Male.Married.Widowed + 
##     OtherDebtorsGuarantors.Guarantor + Property.Insurance + Property.CarOther + 
##     OtherInstallmentPlans.None + Housing.Own + Job.Management.SelfEmp.HighlyQualified
## 
##                                          Df Deviance    AIC
## - EmploymentDuration.Unemployed           1   608.75 682.75
## - Purpose.Education                       1   608.86 682.86
## - ResidenceDuration                       1   608.89 682.89
## - CreditHistory.Delay                     1   608.91 682.91
## - Personal.Male.Married.Widowed           1   608.95 682.95
## - EmploymentDuration.1.to.4               1   608.97 682.97
## - Purpose.DomesticAppliance               1   609.12 683.12
## - Purpose.Repairs                         1   609.27 683.27
## - Job.Management.SelfEmp.HighlyQualified  1   609.48 683.48
## - CreditHistory.ThisBank.AllPaid          1   609.74 683.74
## - ForeignWorker                           1   609.86 683.86
## - SavingsAccountBonds.100.to.500          1   610.07 684.07
## - Purpose.Other                           1   610.16 684.16
## - CheckingAccountStatus.0.to.200          1   610.22 684.22
## - Purpose.Business                        1   610.23 684.23
## - OtherInstallmentPlans.None              1   610.53 684.53
## - Property.Insurance                      1   610.60 684.60
## <none>                                        608.60 684.60
## - Telephone                               1   611.18 685.18
## - Age                                     1   611.43 685.43
## - SavingsAccountBonds.500.to.1000         1   611.61 685.61
## - Property.CarOther                       1   611.68 685.68
## - Purpose.Retraining                      1   611.80 685.80
## - Personal.Female.NotSingle               1   611.93 685.93
## - NumberExistingCredits                   1   612.24 686.24
## - OtherDebtorsGuarantors.Guarantor        1   612.45 686.45
## + Job.UnskilledResident                   1   608.47 686.47
## + OtherDebtorsGuarantors.CoApplicant      1   608.49 686.49
## + NumberPeopleMaintenance                 1   608.58 686.58
## + OtherInstallmentPlans.Stores            1   608.59 686.59
## - Housing.Own                             1   612.70 686.70
## - CheckingAccountStatus.gt.200            1   613.08 687.08
## - Purpose.Furniture.Equipment             1   615.06 689.06
## - SavingsAccountBonds.gt.1000             1   617.27 691.27
## - InstallmentRatePercentage               1   618.60 692.60
## - CreditHistory.Critical                  1   619.70 693.70
## - Purpose.Radio.Television                1   619.99 693.99
## - EmploymentDuration.4.to.7               1   620.99 694.99
## - Purpose.UsedCar                         1   623.16 697.16
## - SavingsAccountBonds.Unknown             1   627.32 701.32
## - CheckingAccountStatus.none              1   640.79 714.79
## - Duration                                1   641.37 715.37
## 
## Step:  AIC=682.75
## Class ~ Duration + InstallmentRatePercentage + ResidenceDuration + 
##     Age + NumberExistingCredits + Telephone + ForeignWorker + 
##     CheckingAccountStatus.0.to.200 + CheckingAccountStatus.gt.200 + 
##     CheckingAccountStatus.none + CreditHistory.ThisBank.AllPaid + 
##     CreditHistory.Delay + CreditHistory.Critical + Purpose.UsedCar + 
##     Purpose.Furniture.Equipment + Purpose.Radio.Television + 
##     Purpose.DomesticAppliance + Purpose.Repairs + Purpose.Education + 
##     Purpose.Retraining + Purpose.Business + Purpose.Other + SavingsAccountBonds.100.to.500 + 
##     SavingsAccountBonds.500.to.1000 + SavingsAccountBonds.gt.1000 + 
##     SavingsAccountBonds.Unknown + EmploymentDuration.1.to.4 + 
##     EmploymentDuration.4.to.7 + Personal.Female.NotSingle + Personal.Male.Married.Widowed + 
##     OtherDebtorsGuarantors.Guarantor + Property.Insurance + Property.CarOther + 
##     OtherInstallmentPlans.None + Housing.Own + Job.Management.SelfEmp.HighlyQualified
## 
##                                          Df Deviance    AIC
## - Purpose.Education                       1   609.03 681.03
## - ResidenceDuration                       1   609.03 681.03
## - EmploymentDuration.1.to.4               1   609.05 681.05
## - CreditHistory.Delay                     1   609.06 681.06
## - Personal.Male.Married.Widowed           1   609.07 681.07
## - Purpose.DomesticAppliance               1   609.29 681.29
## - Purpose.Repairs                         1   609.36 681.36
## - Job.Management.SelfEmp.HighlyQualified  1   609.51 681.51
## - CreditHistory.ThisBank.AllPaid          1   609.83 681.83
## - ForeignWorker                           1   609.95 681.95
## - SavingsAccountBonds.100.to.500          1   610.26 682.26
## - CheckingAccountStatus.0.to.200          1   610.34 682.34
## - Purpose.Business                        1   610.36 682.36
## - Purpose.Other                           1   610.45 682.45
## <none>                                        608.75 682.75
## - OtherInstallmentPlans.None              1   610.77 682.77
## - Property.Insurance                      1   610.77 682.77
## - Telephone                               1   611.27 683.27
## - Age                                     1   611.63 683.63
## - SavingsAccountBonds.500.to.1000         1   611.76 683.76
## - Property.CarOther                       1   611.83 683.83
## - Purpose.Retraining                      1   611.91 683.91
## - Personal.Female.NotSingle               1   612.00 684.00
## - NumberExistingCredits                   1   612.37 684.37
## - OtherDebtorsGuarantors.Guarantor        1   612.55 684.55
## + EmploymentDuration.Unemployed           1   608.60 684.60
## + OtherDebtorsGuarantors.CoApplicant      1   608.62 684.62
## + Job.UnskilledResident                   1   608.65 684.65
## + NumberPeopleMaintenance                 1   608.73 684.73
## + OtherInstallmentPlans.Stores            1   608.74 684.74
## - Housing.Own                             1   612.77 684.77
## - CheckingAccountStatus.gt.200            1   613.11 685.11
## - Purpose.Furniture.Equipment             1   615.23 687.23
## - SavingsAccountBonds.gt.1000             1   617.33 689.33
## - InstallmentRatePercentage               1   618.96 690.96
## - CreditHistory.Critical                  1   619.88 691.88
## - Purpose.Radio.Television                1   620.05 692.05
## - EmploymentDuration.4.to.7               1   621.01 693.01
## - Purpose.UsedCar                         1   623.27 695.27
## - SavingsAccountBonds.Unknown             1   627.55 699.55
## - CheckingAccountStatus.none              1   640.82 712.82
## - Duration                                1   641.53 713.53
## 
## Step:  AIC=681.03
## Class ~ Duration + InstallmentRatePercentage + ResidenceDuration + 
##     Age + NumberExistingCredits + Telephone + ForeignWorker + 
##     CheckingAccountStatus.0.to.200 + CheckingAccountStatus.gt.200 + 
##     CheckingAccountStatus.none + CreditHistory.ThisBank.AllPaid + 
##     CreditHistory.Delay + CreditHistory.Critical + Purpose.UsedCar + 
##     Purpose.Furniture.Equipment + Purpose.Radio.Television + 
##     Purpose.DomesticAppliance + Purpose.Repairs + Purpose.Retraining + 
##     Purpose.Business + Purpose.Other + SavingsAccountBonds.100.to.500 + 
##     SavingsAccountBonds.500.to.1000 + SavingsAccountBonds.gt.1000 + 
##     SavingsAccountBonds.Unknown + EmploymentDuration.1.to.4 + 
##     EmploymentDuration.4.to.7 + Personal.Female.NotSingle + Personal.Male.Married.Widowed + 
##     OtherDebtorsGuarantors.Guarantor + Property.Insurance + Property.CarOther + 
##     OtherInstallmentPlans.None + Housing.Own + Job.Management.SelfEmp.HighlyQualified
## 
##                                          Df Deviance    AIC
## - ResidenceDuration                       1   609.30 679.30
## - CreditHistory.Delay                     1   609.31 679.31
## - EmploymentDuration.1.to.4               1   609.31 679.31
## - Personal.Male.Married.Widowed           1   609.32 679.32
## - Purpose.Repairs                         1   609.54 679.54
## - Purpose.DomesticAppliance               1   609.64 679.64
## - Job.Management.SelfEmp.HighlyQualified  1   609.78 679.78
## - CreditHistory.ThisBank.AllPaid          1   610.12 680.12
## - ForeignWorker                           1   610.31 680.31
## - CheckingAccountStatus.0.to.200          1   610.57 680.57
## - SavingsAccountBonds.100.to.500          1   610.58 680.58
## - Purpose.Other                           1   610.91 680.91
## <none>                                        609.03 681.03
## - OtherInstallmentPlans.None              1   611.10 681.10
## - Purpose.Business                        1   611.11 681.11
## - Property.Insurance                      1   611.18 681.18
## - Telephone                               1   611.44 681.44
## - Age                                     1   611.93 681.93
## - SavingsAccountBonds.500.to.1000         1   612.04 682.04
## - Property.CarOther                       1   612.13 682.13
## - Purpose.Retraining                      1   612.35 682.35
## - Personal.Female.NotSingle               1   612.43 682.43
## - NumberExistingCredits                   1   612.58 682.58
## + Purpose.Education                       1   608.75 682.75
## - OtherDebtorsGuarantors.Guarantor        1   612.86 682.86
## + EmploymentDuration.Unemployed           1   608.86 682.86
## + OtherDebtorsGuarantors.CoApplicant      1   608.88 682.88
## + Job.UnskilledResident                   1   608.90 682.90
## + NumberPeopleMaintenance                 1   609.01 683.01
## + OtherInstallmentPlans.Stores            1   609.02 683.02
## - CheckingAccountStatus.gt.200            1   613.30 683.30
## - Housing.Own                             1   613.32 683.32
## - Purpose.Furniture.Equipment             1   617.11 687.11
## - SavingsAccountBonds.gt.1000             1   617.57 687.57
## - InstallmentRatePercentage               1   619.35 689.35
## - CreditHistory.Critical                  1   619.99 689.99
## - EmploymentDuration.4.to.7               1   621.29 691.29
## - Purpose.Radio.Television                1   622.62 692.62
## - Purpose.UsedCar                         1   625.45 695.45
## - SavingsAccountBonds.Unknown             1   627.81 697.81
## - CheckingAccountStatus.none              1   640.92 710.92
## - Duration                                1   641.72 711.72
## 
## Step:  AIC=679.3
## Class ~ Duration + InstallmentRatePercentage + Age + NumberExistingCredits + 
##     Telephone + ForeignWorker + CheckingAccountStatus.0.to.200 + 
##     CheckingAccountStatus.gt.200 + CheckingAccountStatus.none + 
##     CreditHistory.ThisBank.AllPaid + CreditHistory.Delay + CreditHistory.Critical + 
##     Purpose.UsedCar + Purpose.Furniture.Equipment + Purpose.Radio.Television + 
##     Purpose.DomesticAppliance + Purpose.Repairs + Purpose.Retraining + 
##     Purpose.Business + Purpose.Other + SavingsAccountBonds.100.to.500 + 
##     SavingsAccountBonds.500.to.1000 + SavingsAccountBonds.gt.1000 + 
##     SavingsAccountBonds.Unknown + EmploymentDuration.1.to.4 + 
##     EmploymentDuration.4.to.7 + Personal.Female.NotSingle + Personal.Male.Married.Widowed + 
##     OtherDebtorsGuarantors.Guarantor + Property.Insurance + Property.CarOther + 
##     OtherInstallmentPlans.None + Housing.Own + Job.Management.SelfEmp.HighlyQualified
## 
##                                          Df Deviance    AIC
## - EmploymentDuration.1.to.4               1   609.56 677.56
## - CreditHistory.Delay                     1   609.59 677.59
## - Personal.Male.Married.Widowed           1   609.61 677.61
## - Purpose.Repairs                         1   609.80 677.80
## - Purpose.DomesticAppliance               1   609.89 677.89
## - Job.Management.SelfEmp.HighlyQualified  1   610.18 678.18
## - CreditHistory.ThisBank.AllPaid          1   610.38 678.38
## - ForeignWorker                           1   610.54 678.54
## - CheckingAccountStatus.0.to.200          1   610.81 678.81
## - SavingsAccountBonds.100.to.500          1   610.89 678.89
## - Purpose.Other                           1   611.27 679.27
## - Purpose.Business                        1   611.29 679.29
## <none>                                        609.30 679.30
## - OtherInstallmentPlans.None              1   611.43 679.43
## - Property.Insurance                      1   611.47 679.47
## - Telephone                               1   611.89 679.89
## - Property.CarOther                       1   612.33 680.33
## - SavingsAccountBonds.500.to.1000         1   612.45 680.45
## - Purpose.Retraining                      1   612.65 680.65
## - Personal.Female.NotSingle               1   612.66 680.66
## - Age                                     1   612.71 680.71
## - NumberExistingCredits                   1   612.79 680.79
## + ResidenceDuration                       1   609.03 681.03
## + Purpose.Education                       1   609.03 681.03
## + EmploymentDuration.Unemployed           1   609.14 681.14
## + Job.UnskilledResident                   1   609.15 681.15
## + OtherDebtorsGuarantors.CoApplicant      1   609.16 681.16
## - OtherDebtorsGuarantors.Guarantor        1   613.21 681.21
## + NumberPeopleMaintenance                 1   609.28 681.28
## + OtherInstallmentPlans.Stores            1   609.29 681.29
## - Housing.Own                             1   613.33 681.33
## - CheckingAccountStatus.gt.200            1   613.44 681.44
## - Purpose.Furniture.Equipment             1   617.61 685.61
## - SavingsAccountBonds.gt.1000             1   617.84 685.84
## - InstallmentRatePercentage               1   619.45 687.45
## - CreditHistory.Critical                  1   620.40 688.40
## - EmploymentDuration.4.to.7               1   621.50 689.50
## - Purpose.Radio.Television                1   622.92 690.92
## - Purpose.UsedCar                         1   625.95 693.95
## - SavingsAccountBonds.Unknown             1   628.56 696.56
## - CheckingAccountStatus.none              1   640.99 708.99
## - Duration                                1   641.87 709.87
## 
## Step:  AIC=677.56
## Class ~ Duration + InstallmentRatePercentage + Age + NumberExistingCredits + 
##     Telephone + ForeignWorker + CheckingAccountStatus.0.to.200 + 
##     CheckingAccountStatus.gt.200 + CheckingAccountStatus.none + 
##     CreditHistory.ThisBank.AllPaid + CreditHistory.Delay + CreditHistory.Critical + 
##     Purpose.UsedCar + Purpose.Furniture.Equipment + Purpose.Radio.Television + 
##     Purpose.DomesticAppliance + Purpose.Repairs + Purpose.Retraining + 
##     Purpose.Business + Purpose.Other + SavingsAccountBonds.100.to.500 + 
##     SavingsAccountBonds.500.to.1000 + SavingsAccountBonds.gt.1000 + 
##     SavingsAccountBonds.Unknown + EmploymentDuration.4.to.7 + 
##     Personal.Female.NotSingle + Personal.Male.Married.Widowed + 
##     OtherDebtorsGuarantors.Guarantor + Property.Insurance + Property.CarOther + 
##     OtherInstallmentPlans.None + Housing.Own + Job.Management.SelfEmp.HighlyQualified
## 
##                                          Df Deviance    AIC
## - Personal.Male.Married.Widowed           1   609.84 675.84
## - CreditHistory.Delay                     1   609.89 675.89
## - Purpose.Repairs                         1   610.08 676.08
## - Purpose.DomesticAppliance               1   610.14 676.14
## - Job.Management.SelfEmp.HighlyQualified  1   610.53 676.53
## - CreditHistory.ThisBank.AllPaid          1   610.65 676.65
## - ForeignWorker                           1   610.83 676.83
## - CheckingAccountStatus.0.to.200          1   610.96 676.96
## - SavingsAccountBonds.100.to.500          1   611.09 677.09
## - Purpose.Other                           1   611.51 677.51
## - Purpose.Business                        1   611.52 677.52
## <none>                                        609.56 677.56
## - OtherInstallmentPlans.None              1   611.65 677.65
## - Property.Insurance                      1   611.83 677.83
## - Telephone                               1   612.25 678.25
## - Property.CarOther                       1   612.63 678.63
## - Age                                     1   612.74 678.74
## - SavingsAccountBonds.500.to.1000         1   612.74 678.74
## - Purpose.Retraining                      1   612.83 678.83
## - Personal.Female.NotSingle               1   613.00 679.00
## - NumberExistingCredits                   1   613.24 679.24
## + Purpose.Education                       1   609.29 679.29
## + EmploymentDuration.1.to.4               1   609.30 679.30
## + ResidenceDuration                       1   609.31 679.31
## + Job.UnskilledResident                   1   609.41 679.41
## + OtherDebtorsGuarantors.CoApplicant      1   609.43 679.43
## + EmploymentDuration.Unemployed           1   609.47 679.47
## + NumberPeopleMaintenance                 1   609.54 679.54
## + OtherInstallmentPlans.Stores            1   609.56 679.56
## - CheckingAccountStatus.gt.200            1   613.59 679.59
## - OtherDebtorsGuarantors.Guarantor        1   613.69 679.69
## - Housing.Own                             1   613.77 679.77
## - Purpose.Furniture.Equipment             1   617.86 683.86
## - SavingsAccountBonds.gt.1000             1   618.24 684.24
## - InstallmentRatePercentage               1   619.84 685.84
## - CreditHistory.Critical                  1   620.77 686.77
## - EmploymentDuration.4.to.7               1   621.91 687.91
## - Purpose.Radio.Television                1   623.09 689.09
## - Purpose.UsedCar                         1   626.01 692.01
## - SavingsAccountBonds.Unknown             1   629.08 695.08
## - CheckingAccountStatus.none              1   641.34 707.34
## - Duration                                1   642.23 708.23
## 
## Step:  AIC=675.84
## Class ~ Duration + InstallmentRatePercentage + Age + NumberExistingCredits + 
##     Telephone + ForeignWorker + CheckingAccountStatus.0.to.200 + 
##     CheckingAccountStatus.gt.200 + CheckingAccountStatus.none + 
##     CreditHistory.ThisBank.AllPaid + CreditHistory.Delay + CreditHistory.Critical + 
##     Purpose.UsedCar + Purpose.Furniture.Equipment + Purpose.Radio.Television + 
##     Purpose.DomesticAppliance + Purpose.Repairs + Purpose.Retraining + 
##     Purpose.Business + Purpose.Other + SavingsAccountBonds.100.to.500 + 
##     SavingsAccountBonds.500.to.1000 + SavingsAccountBonds.gt.1000 + 
##     SavingsAccountBonds.Unknown + EmploymentDuration.4.to.7 + 
##     Personal.Female.NotSingle + OtherDebtorsGuarantors.Guarantor + 
##     Property.Insurance + Property.CarOther + OtherInstallmentPlans.None + 
##     Housing.Own + Job.Management.SelfEmp.HighlyQualified
## 
##                                          Df Deviance    AIC
## - CreditHistory.Delay                     1   610.19 674.19
## - Purpose.Repairs                         1   610.38 674.38
## - Purpose.DomesticAppliance               1   610.39 674.39
## - Job.Management.SelfEmp.HighlyQualified  1   610.79 674.79
## - CreditHistory.ThisBank.AllPaid          1   610.86 674.86
## - ForeignWorker                           1   611.13 675.13
## - CheckingAccountStatus.0.to.200          1   611.17 675.17
## - SavingsAccountBonds.100.to.500          1   611.37 675.37
## - Purpose.Business                        1   611.76 675.76
## - Purpose.Other                           1   611.82 675.82
## <none>                                        609.84 675.84
## - OtherInstallmentPlans.None              1   611.90 675.90
## - Property.Insurance                      1   612.08 676.08
## - Telephone                               1   612.46 676.46
## - Property.CarOther                       1   612.86 676.86
## - Purpose.Retraining                      1   612.87 676.87
## - Personal.Female.NotSingle               1   613.00 677.00
## - SavingsAccountBonds.500.to.1000         1   613.05 677.05
## - Age                                     1   613.41 677.41
## - NumberExistingCredits                   1   613.46 677.46
## + Personal.Male.Married.Widowed           1   609.56 677.56
## + ResidenceDuration                       1   609.59 677.59
## + EmploymentDuration.1.to.4               1   609.61 677.61
## + Purpose.Education                       1   609.61 677.61
## + Job.UnskilledResident                   1   609.71 677.71
## + OtherDebtorsGuarantors.CoApplicant      1   609.73 677.73
## + EmploymentDuration.Unemployed           1   609.78 677.78
## + NumberPeopleMaintenance                 1   609.84 677.84
## + OtherInstallmentPlans.Stores            1   609.84 677.84
## - CheckingAccountStatus.gt.200            1   613.97 677.97
## - OtherDebtorsGuarantors.Guarantor        1   613.98 677.98
## - Housing.Own                             1   613.99 677.99
## - Purpose.Furniture.Equipment             1   618.38 682.38
## - SavingsAccountBonds.gt.1000             1   618.38 682.38
## - InstallmentRatePercentage               1   620.18 684.18
## - CreditHistory.Critical                  1   621.21 685.21
## - EmploymentDuration.4.to.7               1   622.50 686.50
## - Purpose.Radio.Television                1   623.16 687.16
## - Purpose.UsedCar                         1   626.15 690.15
## - SavingsAccountBonds.Unknown             1   629.51 693.51
## - CheckingAccountStatus.none              1   641.46 705.46
## - Duration                                1   642.35 706.35
## 
## Step:  AIC=674.19
## Class ~ Duration + InstallmentRatePercentage + Age + NumberExistingCredits + 
##     Telephone + ForeignWorker + CheckingAccountStatus.0.to.200 + 
##     CheckingAccountStatus.gt.200 + CheckingAccountStatus.none + 
##     CreditHistory.ThisBank.AllPaid + CreditHistory.Critical + 
##     Purpose.UsedCar + Purpose.Furniture.Equipment + Purpose.Radio.Television + 
##     Purpose.DomesticAppliance + Purpose.Repairs + Purpose.Retraining + 
##     Purpose.Business + Purpose.Other + SavingsAccountBonds.100.to.500 + 
##     SavingsAccountBonds.500.to.1000 + SavingsAccountBonds.gt.1000 + 
##     SavingsAccountBonds.Unknown + EmploymentDuration.4.to.7 + 
##     Personal.Female.NotSingle + OtherDebtorsGuarantors.Guarantor + 
##     Property.Insurance + Property.CarOther + OtherInstallmentPlans.None + 
##     Housing.Own + Job.Management.SelfEmp.HighlyQualified
## 
##                                          Df Deviance    AIC
## - Purpose.DomesticAppliance               1   610.71 672.71
## - Purpose.Repairs                         1   610.71 672.71
## - Job.Management.SelfEmp.HighlyQualified  1   611.21 673.21
## - CreditHistory.ThisBank.AllPaid          1   611.32 673.32
## - ForeignWorker                           1   611.43 673.43
## - CheckingAccountStatus.0.to.200          1   611.60 673.60
## - SavingsAccountBonds.100.to.500          1   611.77 673.77
## <none>                                        610.19 674.19
## - Purpose.Business                        1   612.24 674.24
## - Purpose.Other                           1   612.27 674.27
## - OtherInstallmentPlans.None              1   612.28 674.28
## - Property.Insurance                      1   612.41 674.41
## - Telephone                               1   613.02 675.02
## - Purpose.Retraining                      1   613.15 675.15
## - Property.CarOther                       1   613.24 675.24
## - SavingsAccountBonds.500.to.1000         1   613.35 675.35
## - NumberExistingCredits                   1   613.46 675.46
## - Personal.Female.NotSingle               1   613.48 675.48
## - Age                                     1   613.78 675.78
## + CreditHistory.Delay                     1   609.84 675.84
## + Personal.Male.Married.Widowed           1   609.89 675.89
## + EmploymentDuration.1.to.4               1   609.91 675.91
## + ResidenceDuration                       1   609.93 675.93
## + Purpose.Education                       1   609.98 675.98
## + Job.UnskilledResident                   1   610.04 676.04
## + OtherDebtorsGuarantors.CoApplicant      1   610.08 676.08
## + EmploymentDuration.Unemployed           1   610.13 676.13
## + NumberPeopleMaintenance                 1   610.19 676.19
## + OtherInstallmentPlans.Stores            1   610.19 676.19
## - OtherDebtorsGuarantors.Guarantor        1   614.19 676.19
## - Housing.Own                             1   614.29 676.29
## - CheckingAccountStatus.gt.200            1   614.44 676.44
## - Purpose.Furniture.Equipment             1   618.59 680.59
## - SavingsAccountBonds.gt.1000             1   618.81 680.81
## - InstallmentRatePercentage               1   620.70 682.70
## - CreditHistory.Critical                  1   621.44 683.44
## - EmploymentDuration.4.to.7               1   622.91 684.91
## - Purpose.Radio.Television                1   623.45 685.45
## - Purpose.UsedCar                         1   626.34 688.34
## - SavingsAccountBonds.Unknown             1   629.94 691.94
## - CheckingAccountStatus.none              1   642.09 704.09
## - Duration                                1   642.36 704.36
## 
## Step:  AIC=672.71
## Class ~ Duration + InstallmentRatePercentage + Age + NumberExistingCredits + 
##     Telephone + ForeignWorker + CheckingAccountStatus.0.to.200 + 
##     CheckingAccountStatus.gt.200 + CheckingAccountStatus.none + 
##     CreditHistory.ThisBank.AllPaid + CreditHistory.Critical + 
##     Purpose.UsedCar + Purpose.Furniture.Equipment + Purpose.Radio.Television + 
##     Purpose.Repairs + Purpose.Retraining + Purpose.Business + 
##     Purpose.Other + SavingsAccountBonds.100.to.500 + SavingsAccountBonds.500.to.1000 + 
##     SavingsAccountBonds.gt.1000 + SavingsAccountBonds.Unknown + 
##     EmploymentDuration.4.to.7 + Personal.Female.NotSingle + OtherDebtorsGuarantors.Guarantor + 
##     Property.Insurance + Property.CarOther + OtherInstallmentPlans.None + 
##     Housing.Own + Job.Management.SelfEmp.HighlyQualified
## 
##                                          Df Deviance    AIC
## - Purpose.Repairs                         1   611.30 671.30
## - CreditHistory.ThisBank.AllPaid          1   611.78 671.78
## - Job.Management.SelfEmp.HighlyQualified  1   611.82 671.82
## - ForeignWorker                           1   611.90 671.90
## - CheckingAccountStatus.0.to.200          1   612.02 672.02
## - SavingsAccountBonds.100.to.500          1   612.35 672.35
## - Purpose.Business                        1   612.59 672.59
## <none>                                        610.71 672.71
## - Purpose.Other                           1   612.71 672.71
## - OtherInstallmentPlans.None              1   612.85 672.85
## - Property.Insurance                      1   613.04 673.04
## - Purpose.Retraining                      1   613.56 673.56
## - Telephone                               1   613.60 673.60
## - Personal.Female.NotSingle               1   613.83 673.83
## - Property.CarOther                       1   613.92 673.92
## - SavingsAccountBonds.500.to.1000         1   613.95 673.95
## - NumberExistingCredits                   1   614.06 674.06
## + Purpose.DomesticAppliance               1   610.19 674.19
## - Age                                     1   614.25 674.25
## + CreditHistory.Delay                     1   610.39 674.39
## + Purpose.Education                       1   610.44 674.44
## + EmploymentDuration.1.to.4               1   610.44 674.44
## + Personal.Male.Married.Widowed           1   610.45 674.45
## + ResidenceDuration                       1   610.47 674.47
## + Job.UnskilledResident                   1   610.58 674.58
## + OtherDebtorsGuarantors.CoApplicant      1   610.61 674.61
## + EmploymentDuration.Unemployed           1   610.63 674.63
## - OtherDebtorsGuarantors.Guarantor        1   614.64 674.64
## + NumberPeopleMaintenance                 1   610.70 674.70
## + OtherInstallmentPlans.Stores            1   610.71 674.71
## - CheckingAccountStatus.gt.200            1   614.94 674.94
## - Housing.Own                             1   615.21 675.21
## - Purpose.Furniture.Equipment             1   618.71 678.71
## - SavingsAccountBonds.gt.1000             1   619.20 679.20
## - InstallmentRatePercentage               1   621.03 681.03
## - CreditHistory.Critical                  1   621.73 681.73
## - EmploymentDuration.4.to.7               1   623.25 683.25
## - Purpose.Radio.Television                1   623.49 683.49
## - Purpose.UsedCar                         1   626.55 686.55
## - SavingsAccountBonds.Unknown             1   630.58 690.58
## - CheckingAccountStatus.none              1   642.19 702.19
## - Duration                                1   642.75 702.75
## 
## Step:  AIC=671.3
## Class ~ Duration + InstallmentRatePercentage + Age + NumberExistingCredits + 
##     Telephone + ForeignWorker + CheckingAccountStatus.0.to.200 + 
##     CheckingAccountStatus.gt.200 + CheckingAccountStatus.none + 
##     CreditHistory.ThisBank.AllPaid + CreditHistory.Critical + 
##     Purpose.UsedCar + Purpose.Furniture.Equipment + Purpose.Radio.Television + 
##     Purpose.Retraining + Purpose.Business + Purpose.Other + SavingsAccountBonds.100.to.500 + 
##     SavingsAccountBonds.500.to.1000 + SavingsAccountBonds.gt.1000 + 
##     SavingsAccountBonds.Unknown + EmploymentDuration.4.to.7 + 
##     Personal.Female.NotSingle + OtherDebtorsGuarantors.Guarantor + 
##     Property.Insurance + Property.CarOther + OtherInstallmentPlans.None + 
##     Housing.Own + Job.Management.SelfEmp.HighlyQualified
## 
##                                          Df Deviance    AIC
## - Job.Management.SelfEmp.HighlyQualified  1   612.31 670.31
## - CreditHistory.ThisBank.AllPaid          1   612.33 670.33
## - CheckingAccountStatus.0.to.200          1   612.49 670.49
## - ForeignWorker                           1   612.52 670.52
## - SavingsAccountBonds.100.to.500          1   613.09 671.09
## <none>                                        611.30 671.30
## - OtherInstallmentPlans.None              1   613.32 671.32
## - Purpose.Other                           1   613.42 671.42
## - Property.Insurance                      1   613.55 671.55
## - Purpose.Business                        1   613.55 671.55
## - Telephone                               1   614.22 672.22
## - Purpose.Retraining                      1   614.30 672.30
## - Personal.Female.NotSingle               1   614.38 672.38
## - Property.CarOther                       1   614.47 672.47
## - Age                                     1   614.65 672.65
## - SavingsAccountBonds.500.to.1000         1   614.67 672.67
## + Purpose.Repairs                         1   610.71 672.71
## + Purpose.DomesticAppliance               1   610.71 672.71
## - NumberExistingCredits                   1   614.82 672.82
## + CreditHistory.Delay                     1   611.00 673.00
## + EmploymentDuration.1.to.4               1   611.01 673.01
## + Personal.Male.Married.Widowed           1   611.02 673.02
## + ResidenceDuration                       1   611.07 673.07
## + Purpose.Education                       1   611.12 673.12
## + Job.UnskilledResident                   1   611.18 673.18
## + OtherDebtorsGuarantors.CoApplicant      1   611.20 673.20
## + EmploymentDuration.Unemployed           1   611.26 673.26
## - OtherDebtorsGuarantors.Guarantor        1   615.29 673.29
## + NumberPeopleMaintenance                 1   611.29 673.29
## + OtherInstallmentPlans.Stores            1   611.29 673.29
## - Housing.Own                             1   615.59 673.59
## - CheckingAccountStatus.gt.200            1   615.64 673.64
## - SavingsAccountBonds.gt.1000             1   619.59 677.59
## - Purpose.Furniture.Equipment             1   620.28 678.28
## - InstallmentRatePercentage               1   621.58 679.58
## - CreditHistory.Critical                  1   622.83 680.83
## - EmploymentDuration.4.to.7               1   623.87 681.87
## - Purpose.Radio.Television                1   625.58 683.58
## - Purpose.UsedCar                         1   627.99 685.99
## - SavingsAccountBonds.Unknown             1   632.00 690.00
## - CheckingAccountStatus.none              1   642.75 700.75
## - Duration                                1   643.36 701.36
## 
## Step:  AIC=670.31
## Class ~ Duration + InstallmentRatePercentage + Age + NumberExistingCredits + 
##     Telephone + ForeignWorker + CheckingAccountStatus.0.to.200 + 
##     CheckingAccountStatus.gt.200 + CheckingAccountStatus.none + 
##     CreditHistory.ThisBank.AllPaid + CreditHistory.Critical + 
##     Purpose.UsedCar + Purpose.Furniture.Equipment + Purpose.Radio.Television + 
##     Purpose.Retraining + Purpose.Business + Purpose.Other + SavingsAccountBonds.100.to.500 + 
##     SavingsAccountBonds.500.to.1000 + SavingsAccountBonds.gt.1000 + 
##     SavingsAccountBonds.Unknown + EmploymentDuration.4.to.7 + 
##     Personal.Female.NotSingle + OtherDebtorsGuarantors.Guarantor + 
##     Property.Insurance + Property.CarOther + OtherInstallmentPlans.None + 
##     Housing.Own
## 
##                                          Df Deviance    AIC
## - CreditHistory.ThisBank.AllPaid          1   613.45 669.45
## - CheckingAccountStatus.0.to.200          1   613.46 669.46
## - ForeignWorker                           1   613.49 669.49
## - Purpose.Other                           1   614.11 670.11
## - SavingsAccountBonds.100.to.500          1   614.16 670.16
## - OtherInstallmentPlans.None              1   614.30 670.30
## <none>                                        612.31 670.31
## - Telephone                               1   614.38 670.38
## - Purpose.Business                        1   614.52 670.52
## - Property.Insurance                      1   614.62 670.62
## + Job.Management.SelfEmp.HighlyQualified  1   611.30 671.30
## - Personal.Female.NotSingle               1   615.32 671.32
## - Age                                     1   615.33 671.33
## - Purpose.Retraining                      1   615.36 671.36
## - Property.CarOther                       1   615.46 671.46
## - NumberExistingCredits                   1   615.59 671.59
## + Purpose.DomesticAppliance               1   611.64 671.64
## + Purpose.Repairs                         1   611.82 671.82
## - SavingsAccountBonds.500.to.1000         1   615.83 671.83
## + EmploymentDuration.1.to.4               1   611.92 671.92
## + CreditHistory.Delay                     1   611.94 671.94
## + ResidenceDuration                       1   611.97 671.97
## + Personal.Male.Married.Widowed           1   612.07 672.07
## + Job.UnskilledResident                   1   612.09 672.09
## + Purpose.Education                       1   612.12 672.12
## + OtherDebtorsGuarantors.CoApplicant      1   612.24 672.24
## + EmploymentDuration.Unemployed           1   612.31 672.31
## + NumberPeopleMaintenance                 1   612.31 672.31
## + OtherInstallmentPlans.Stores            1   612.31 672.31
## - CheckingAccountStatus.gt.200            1   616.45 672.45
## - OtherDebtorsGuarantors.Guarantor        1   616.63 672.63
## - Housing.Own                             1   616.89 672.89
## - Purpose.Furniture.Equipment             1   621.17 677.17
## - SavingsAccountBonds.gt.1000             1   621.19 677.19
## - InstallmentRatePercentage               1   622.64 678.64
## - CreditHistory.Critical                  1   623.78 679.78
## - EmploymentDuration.4.to.7               1   625.21 681.21
## - Purpose.Radio.Television                1   626.71 682.71
## - Purpose.UsedCar                         1   628.20 684.20
## - SavingsAccountBonds.Unknown             1   633.18 689.18
## - CheckingAccountStatus.none              1   644.16 700.16
## - Duration                                1   645.31 701.31
## 
## Step:  AIC=669.45
## Class ~ Duration + InstallmentRatePercentage + Age + NumberExistingCredits + 
##     Telephone + ForeignWorker + CheckingAccountStatus.0.to.200 + 
##     CheckingAccountStatus.gt.200 + CheckingAccountStatus.none + 
##     CreditHistory.Critical + Purpose.UsedCar + Purpose.Furniture.Equipment + 
##     Purpose.Radio.Television + Purpose.Retraining + Purpose.Business + 
##     Purpose.Other + SavingsAccountBonds.100.to.500 + SavingsAccountBonds.500.to.1000 + 
##     SavingsAccountBonds.gt.1000 + SavingsAccountBonds.Unknown + 
##     EmploymentDuration.4.to.7 + Personal.Female.NotSingle + OtherDebtorsGuarantors.Guarantor + 
##     Property.Insurance + Property.CarOther + OtherInstallmentPlans.None + 
##     Housing.Own
## 
##                                          Df Deviance    AIC
## - ForeignWorker                           1   614.62 668.62
## - CheckingAccountStatus.0.to.200          1   614.71 668.71
## - SavingsAccountBonds.100.to.500          1   615.16 669.16
## - Purpose.Other                           1   615.17 669.17
## <none>                                        613.45 669.45
## - Property.Insurance                      1   615.60 669.60
## - Purpose.Business                        1   615.64 669.64
## - Telephone                               1   615.70 669.70
## - Purpose.Retraining                      1   616.16 670.16
## + CreditHistory.ThisBank.AllPaid          1   612.31 670.31
## + Job.Management.SelfEmp.HighlyQualified  1   612.33 670.33
## - NumberExistingCredits                   1   616.48 670.48
## - Age                                     1   616.49 670.49
## - Property.CarOther                       1   616.50 670.50
## - OtherInstallmentPlans.None              1   616.60 670.60
## - Personal.Female.NotSingle               1   616.67 670.67
## - SavingsAccountBonds.500.to.1000         1   616.81 670.81
## + Purpose.DomesticAppliance               1   612.86 670.86
## + CreditHistory.Delay                     1   612.96 670.96
## + Purpose.Repairs                         1   613.00 671.00
## + EmploymentDuration.1.to.4               1   613.03 671.03
## + ResidenceDuration                       1   613.12 671.12
## + Purpose.Education                       1   613.25 671.25
## + Personal.Male.Married.Widowed           1   613.27 671.27
## + Job.UnskilledResident                   1   613.28 671.28
## + OtherDebtorsGuarantors.CoApplicant      1   613.42 671.42
## + EmploymentDuration.Unemployed           1   613.43 671.43
## + OtherInstallmentPlans.Stores            1   613.44 671.44
## + NumberPeopleMaintenance                 1   613.45 671.45
## - OtherDebtorsGuarantors.Guarantor        1   617.60 671.60
## - CheckingAccountStatus.gt.200            1   617.77 671.77
## - Housing.Own                             1   618.16 672.16
## - SavingsAccountBonds.gt.1000             1   622.07 676.07
## - Purpose.Furniture.Equipment             1   622.48 676.48
## - InstallmentRatePercentage               1   624.19 678.19
## - CreditHistory.Critical                  1   625.42 679.42
## - EmploymentDuration.4.to.7               1   625.99 679.99
## - Purpose.Radio.Television                1   628.09 682.09
## - Purpose.UsedCar                         1   629.24 683.24
## - SavingsAccountBonds.Unknown             1   634.04 688.04
## - CheckingAccountStatus.none              1   646.77 700.77
## - Duration                                1   646.89 700.89
## 
## Step:  AIC=668.62
## Class ~ Duration + InstallmentRatePercentage + Age + NumberExistingCredits + 
##     Telephone + CheckingAccountStatus.0.to.200 + CheckingAccountStatus.gt.200 + 
##     CheckingAccountStatus.none + CreditHistory.Critical + Purpose.UsedCar + 
##     Purpose.Furniture.Equipment + Purpose.Radio.Television + 
##     Purpose.Retraining + Purpose.Business + Purpose.Other + SavingsAccountBonds.100.to.500 + 
##     SavingsAccountBonds.500.to.1000 + SavingsAccountBonds.gt.1000 + 
##     SavingsAccountBonds.Unknown + EmploymentDuration.4.to.7 + 
##     Personal.Female.NotSingle + OtherDebtorsGuarantors.Guarantor + 
##     Property.Insurance + Property.CarOther + OtherInstallmentPlans.None + 
##     Housing.Own
## 
##                                          Df Deviance    AIC
## - CheckingAccountStatus.0.to.200          1   615.82 667.82
## - SavingsAccountBonds.100.to.500          1   616.37 668.37
## - Purpose.Other                           1   616.56 668.56
## <none>                                        614.62 668.62
## - Property.Insurance                      1   616.64 668.64
## - Purpose.Business                        1   616.67 668.67
## - Telephone                               1   616.74 668.74
## - Purpose.Retraining                      1   617.22 669.22
## + ForeignWorker                           1   613.45 669.45
## + CreditHistory.ThisBank.AllPaid          1   613.49 669.49
## + Job.Management.SelfEmp.HighlyQualified  1   613.54 669.54
## - Age                                     1   617.64 669.64
## - Property.CarOther                       1   617.79 669.79
## - OtherInstallmentPlans.None              1   617.79 669.79
## - NumberExistingCredits                   1   617.90 669.90
## - SavingsAccountBonds.500.to.1000         1   617.96 669.96
## - Personal.Female.NotSingle               1   617.97 669.97
## + Purpose.DomesticAppliance               1   614.08 670.08
## + Purpose.Repairs                         1   614.14 670.14
## + EmploymentDuration.1.to.4               1   614.15 670.15
## + CreditHistory.Delay                     1   614.17 670.17
## + Purpose.Education                       1   614.35 670.35
## + ResidenceDuration                       1   614.35 670.35
## + Job.UnskilledResident                   1   614.40 670.40
## + Personal.Male.Married.Widowed           1   614.43 670.43
## + OtherDebtorsGuarantors.CoApplicant      1   614.56 670.56
## + EmploymentDuration.Unemployed           1   614.57 670.57
## + OtherInstallmentPlans.Stores            1   614.59 670.59
## + NumberPeopleMaintenance                 1   614.62 670.62
## - CheckingAccountStatus.gt.200            1   618.91 670.91
## - OtherDebtorsGuarantors.Guarantor        1   619.21 671.21
## - Housing.Own                             1   619.39 671.39
## - SavingsAccountBonds.gt.1000             1   623.22 675.22
## - Purpose.Furniture.Equipment             1   623.36 675.36
## - InstallmentRatePercentage               1   626.39 678.39
## - CreditHistory.Critical                  1   626.65 678.65
## - EmploymentDuration.4.to.7               1   627.41 679.41
## - Purpose.Radio.Television                1   628.80 680.80
## - Purpose.UsedCar                         1   630.37 682.37
## - SavingsAccountBonds.Unknown             1   635.58 687.58
## - CheckingAccountStatus.none              1   648.28 700.28
## - Duration                                1   649.58 701.58
## 
## Step:  AIC=667.82
## Class ~ Duration + InstallmentRatePercentage + Age + NumberExistingCredits + 
##     Telephone + CheckingAccountStatus.gt.200 + CheckingAccountStatus.none + 
##     CreditHistory.Critical + Purpose.UsedCar + Purpose.Furniture.Equipment + 
##     Purpose.Radio.Television + Purpose.Retraining + Purpose.Business + 
##     Purpose.Other + SavingsAccountBonds.100.to.500 + SavingsAccountBonds.500.to.1000 + 
##     SavingsAccountBonds.gt.1000 + SavingsAccountBonds.Unknown + 
##     EmploymentDuration.4.to.7 + Personal.Female.NotSingle + OtherDebtorsGuarantors.Guarantor + 
##     Property.Insurance + Property.CarOther + OtherInstallmentPlans.None + 
##     Housing.Own
## 
##                                          Df Deviance    AIC
## <none>                                        615.82 667.82
## - Purpose.Other                           1   617.89 667.89
## - Property.Insurance                      1   618.12 668.12
## - Telephone                               1   618.19 668.19
## - SavingsAccountBonds.100.to.500          1   618.22 668.22
## - Purpose.Business                        1   618.37 668.37
## - Purpose.Retraining                      1   618.47 668.47
## + CreditHistory.ThisBank.AllPaid          1   614.59 668.59
## + CheckingAccountStatus.0.to.200          1   614.62 668.62
## - Age                                     1   618.69 668.69
## + ForeignWorker                           1   614.71 668.71
## + Job.Management.SelfEmp.HighlyQualified  1   614.78 668.78
## - Property.CarOther                       1   618.97 668.97
## - OtherInstallmentPlans.None              1   619.01 669.01
## - Personal.Female.NotSingle               1   619.05 669.05
## - CheckingAccountStatus.gt.200            1   619.17 669.17
## - NumberExistingCredits                   1   619.22 669.22
## + CreditHistory.Delay                     1   615.28 669.28
## + Purpose.DomesticAppliance               1   615.39 669.39
## + Purpose.Repairs                         1   615.44 669.44
## - SavingsAccountBonds.500.to.1000         1   619.45 669.45
## + EmploymentDuration.1.to.4               1   615.49 669.49
## + ResidenceDuration                       1   615.59 669.59
## + Purpose.Education                       1   615.60 669.60
## + Job.UnskilledResident                   1   615.60 669.60
## + Personal.Male.Married.Widowed           1   615.69 669.69
## + EmploymentDuration.Unemployed           1   615.77 669.77
## + OtherInstallmentPlans.Stores            1   615.79 669.79
## + OtherDebtorsGuarantors.CoApplicant      1   615.80 669.80
## + NumberPeopleMaintenance                 1   615.82 669.82
## - OtherDebtorsGuarantors.Guarantor        1   620.39 670.39
## - Housing.Own                             1   620.85 670.85
## - Purpose.Furniture.Equipment             1   624.10 674.10
## - SavingsAccountBonds.gt.1000             1   625.47 675.47
## - InstallmentRatePercentage               1   627.79 677.79
## - CreditHistory.Critical                  1   628.24 678.24
## - EmploymentDuration.4.to.7               1   628.29 678.29
## - Purpose.Radio.Television                1   630.74 680.74
## - Purpose.UsedCar                         1   631.51 681.51
## - SavingsAccountBonds.Unknown             1   637.88 687.88
## - Duration                                1   650.35 700.35
## - CheckingAccountStatus.none              1   653.04 703.04
summary(fit)
## 
## Call:
## glm(formula = Class ~ Duration + InstallmentRatePercentage + 
##     ResidenceDuration + Age + NumberExistingCredits + NumberPeopleMaintenance + 
##     Telephone + ForeignWorker + CheckingAccountStatus.0.to.200 + 
##     CheckingAccountStatus.gt.200 + CheckingAccountStatus.none + 
##     CreditHistory.ThisBank.AllPaid + CreditHistory.Delay + CreditHistory.Critical + 
##     Purpose.UsedCar + Purpose.Furniture.Equipment + Purpose.Radio.Television + 
##     Purpose.DomesticAppliance + Purpose.Repairs + Purpose.Education + 
##     Purpose.Retraining + Purpose.Business + Purpose.Other + SavingsAccountBonds.100.to.500 + 
##     SavingsAccountBonds.500.to.1000 + SavingsAccountBonds.gt.1000 + 
##     SavingsAccountBonds.Unknown + EmploymentDuration.1.to.4 + 
##     EmploymentDuration.4.to.7 + EmploymentDuration.Unemployed + 
##     Personal.Female.NotSingle + Personal.Male.Married.Widowed + 
##     OtherDebtorsGuarantors.CoApplicant + OtherDebtorsGuarantors.Guarantor + 
##     Property.Insurance + Property.CarOther + OtherInstallmentPlans.Stores + 
##     OtherInstallmentPlans.None + Housing.Own + Job.UnskilledResident + 
##     Job.Management.SelfEmp.HighlyQualified, family = binomial(link = "logit"), 
##     data = Training)
## 
## Deviance Residuals: 
##     Min       1Q   Median       3Q      Max  
## -1.8435  -0.6875  -0.3391   0.6805   2.7705  
## 
## Coefficients:
##                                        Estimate Std. Error z value
## (Intercept)                            -1.46054    1.09793  -1.330
## Duration                                0.05112    0.00942   5.427
## InstallmentRatePercentage               0.30268    0.09838   3.077
## ResidenceDuration                      -0.05227    0.09968  -0.524
## Age                                    -0.01727    0.01081  -1.597
## NumberExistingCredits                   0.42642    0.23156   1.842
## NumberPeopleMaintenance                 0.05504    0.30057   0.183
## Telephone                               0.40828    0.24717   1.652
## ForeignWorker                           0.72148    0.70701   1.020
## CheckingAccountStatus.0.to.200         -0.34034    0.26629  -1.278
## CheckingAccountStatus.gt.200           -0.94507    0.45605  -2.072
## CheckingAccountStatus.none             -1.51489    0.27546  -5.500
## CreditHistory.ThisBank.AllPaid          0.50373    0.46427   1.085
## CreditHistory.Delay                    -0.21291    0.38252  -0.557
## CreditHistory.Critical                 -0.97655    0.30181  -3.236
## Purpose.UsedCar                        -1.67679    0.46622  -3.597
## Purpose.Furniture.Equipment            -0.81315    0.32469  -2.504
## Purpose.Radio.Television               -1.01608    0.30585  -3.322
## Purpose.DomesticAppliance              -0.65373    0.90153  -0.725
## Purpose.Repairs                         0.53074    0.64572   0.822
## Purpose.Education                       0.21093    0.45916   0.459
## Purpose.Retraining                     -1.94465    1.25080  -1.555
## Purpose.Business                       -0.48122    0.37881  -1.270
## Purpose.Other                          -0.98019    0.83278  -1.177
## SavingsAccountBonds.100.to.500         -0.41569    0.34634  -1.200
## SavingsAccountBonds.500.to.1000        -0.92693    0.56373  -1.644
## SavingsAccountBonds.gt.1000            -1.69968    0.63991  -2.656
## SavingsAccountBonds.Unknown            -1.34022    0.32782  -4.088
## EmploymentDuration.1.to.4              -0.15077    0.23977  -0.629
## EmploymentDuration.4.to.7              -1.14649    0.33965  -3.375
## EmploymentDuration.Unemployed          -0.18378    0.44937  -0.409
## Personal.Female.NotSingle               0.43426    0.24380   1.781
## Personal.Male.Married.Widowed           0.24003    0.37694   0.637
## OtherDebtorsGuarantors.CoApplicant     -0.16775    0.49994  -0.336
## OtherDebtorsGuarantors.Guarantor       -1.06300    0.57038  -1.864
## Property.Insurance                      0.39873    0.28272   1.410
## Property.CarOther                       0.43117    0.25405   1.697
## OtherInstallmentPlans.Stores            0.05727    0.51655   0.111
## OtherInstallmentPlans.None             -0.34832    0.28343  -1.229
## Housing.Own                            -0.51547    0.25710  -2.005
## Job.UnskilledResident                  -0.11775    0.29178  -0.404
## Job.Management.SelfEmp.HighlyQualified  0.30495    0.33501   0.910
##                                        Pr(>|z|)    
## (Intercept)                            0.183429    
## Duration                               5.74e-08 ***
## InstallmentRatePercentage              0.002093 ** 
## ResidenceDuration                      0.600013    
## Age                                    0.110183    
## NumberExistingCredits                  0.065545 .  
## NumberPeopleMaintenance                0.854713    
## Telephone                              0.098572 .  
## ForeignWorker                          0.307510    
## CheckingAccountStatus.0.to.200         0.201229    
## CheckingAccountStatus.gt.200           0.038239 *  
## CheckingAccountStatus.none             3.81e-08 ***
## CreditHistory.ThisBank.AllPaid         0.277920    
## CreditHistory.Delay                    0.577801    
## CreditHistory.Critical                 0.001214 ** 
## Purpose.UsedCar                        0.000322 ***
## Purpose.Furniture.Equipment            0.012265 *  
## Purpose.Radio.Television               0.000893 ***
## Purpose.DomesticAppliance              0.468367    
## Purpose.Repairs                        0.411114    
## Purpose.Education                      0.645965    
## Purpose.Retraining                     0.120011    
## Purpose.Business                       0.203955    
## Purpose.Other                          0.239190    
## SavingsAccountBonds.100.to.500         0.230042    
## SavingsAccountBonds.500.to.1000        0.100119    
## SavingsAccountBonds.gt.1000            0.007904 ** 
## SavingsAccountBonds.Unknown            4.35e-05 ***
## EmploymentDuration.1.to.4              0.529455    
## EmploymentDuration.4.to.7              0.000737 ***
## EmploymentDuration.Unemployed          0.682554    
## Personal.Female.NotSingle              0.074877 .  
## Personal.Male.Married.Widowed          0.524259    
## OtherDebtorsGuarantors.CoApplicant     0.737218    
## OtherDebtorsGuarantors.Guarantor       0.062365 .  
## Property.Insurance                     0.158444    
## Property.CarOther                      0.089663 .  
## OtherInstallmentPlans.Stores           0.911722    
## OtherInstallmentPlans.None             0.219091    
## Housing.Own                            0.044967 *  
## Job.UnskilledResident                  0.686540    
## Job.Management.SelfEmp.HighlyQualified 0.362670    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 839.4  on 699  degrees of freedom
## Residual deviance: 608.3  on 658  degrees of freedom
## AIC: 692.3
## 
## Number of Fisher Scoring iterations: 5

Hasil model yang didapat.

fit_final= glm(Class~ Duration + InstallmentRatePercentage + NumberExistingCredits + CheckingAccountStatus.none +
            CreditHistory.Critical + Purpose.UsedCar + Purpose.Radio.Television + 
            SavingsAccountBonds.gt.1000 + SavingsAccountBonds.Unknown + EmploymentDuration.4.to.7 + 
            Personal.Female.NotSingle + OtherDebtorsGuarantors.Guarantor ,
          data=Training,family=binomial(link="logit"))
summary(fit_final)
## 
## Call:
## glm(formula = Class ~ Duration + InstallmentRatePercentage + 
##     NumberExistingCredits + CheckingAccountStatus.none + CreditHistory.Critical + 
##     Purpose.UsedCar + Purpose.Radio.Television + SavingsAccountBonds.gt.1000 + 
##     SavingsAccountBonds.Unknown + EmploymentDuration.4.to.7 + 
##     Personal.Female.NotSingle + OtherDebtorsGuarantors.Guarantor, 
##     family = binomial(link = "logit"), data = Training)
## 
## Deviance Residuals: 
##     Min       1Q   Median       3Q      Max  
## -1.9909  -0.7600  -0.4072   0.7684   2.8115  
## 
## Coefficients:
##                                   Estimate Std. Error z value Pr(>|z|)    
## (Intercept)                      -2.468812   0.456273  -5.411 6.27e-08 ***
## Duration                          0.051233   0.008419   6.085 1.16e-09 ***
## InstallmentRatePercentage         0.335585   0.091353   3.674 0.000239 ***
## NumberExistingCredits             0.484316   0.202394   2.393 0.016714 *  
## CheckingAccountStatus.none       -1.454046   0.227158  -6.401 1.54e-10 ***
## CreditHistory.Critical           -1.022213   0.270278  -3.782 0.000156 ***
## Purpose.UsedCar                  -1.177503   0.407459  -2.890 0.003854 ** 
## Purpose.Radio.Television         -0.681120   0.238236  -2.859 0.004250 ** 
## SavingsAccountBonds.gt.1000      -1.442411   0.593740  -2.429 0.015125 *  
## SavingsAccountBonds.Unknown      -1.215718   0.300093  -4.051 5.10e-05 ***
## EmploymentDuration.4.to.7        -0.994675   0.295471  -3.366 0.000762 ***
## Personal.Female.NotSingle         0.539016   0.208117   2.590 0.009598 ** 
## OtherDebtorsGuarantors.Guarantor -1.133165   0.540434  -2.097 0.036014 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 839.40  on 699  degrees of freedom
## Residual deviance: 647.97  on 687  degrees of freedom
## AIC: 673.97
## 
## Number of Fisher Scoring iterations: 5

Selanjutnya untuk menguji nilai signfikansi variabel dengan uji Wald variabel “Duration”

library(survey)
## Loading required package: grid
## Loading required package: Matrix
## Loading required package: survival
## 
## Attaching package: 'survival'
## The following object is masked from 'package:caret':
## 
##     cluster
## 
## Attaching package: 'survey'
## The following object is masked from 'package:raster':
## 
##     cv
## The following object is masked from 'package:graphics':
## 
##     dotchart
regTermTest(fit_final,"Duration")
## Wald test for Duration
##  in glm(formula = Class ~ Duration + InstallmentRatePercentage + 
##     NumberExistingCredits + CheckingAccountStatus.none + CreditHistory.Critical + 
##     Purpose.UsedCar + Purpose.Radio.Television + SavingsAccountBonds.gt.1000 + 
##     SavingsAccountBonds.Unknown + EmploymentDuration.4.to.7 + 
##     Personal.Female.NotSingle + OtherDebtorsGuarantors.Guarantor, 
##     family = binomial(link = "logit"), data = Training)
## F =  37.03034  on  1  and  687  df: p= 1.9324e-09

Hasil yang didapat nilai p-vaue 0.0000000019324 dibawah nilai signifikansi 0.05 dan menolak H0. Sehingga H1 diterima dengan variabel Duration berpengaruh signfikan terhadap variabel Class

variabel “InstallmentRatePercentage”

regTermTest(fit_final,"InstallmentRatePercentage")
## Wald test for InstallmentRatePercentage
##  in glm(formula = Class ~ Duration + InstallmentRatePercentage + 
##     NumberExistingCredits + CheckingAccountStatus.none + CreditHistory.Critical + 
##     Purpose.UsedCar + Purpose.Radio.Television + SavingsAccountBonds.gt.1000 + 
##     SavingsAccountBonds.Unknown + EmploymentDuration.4.to.7 + 
##     Personal.Female.NotSingle + OtherDebtorsGuarantors.Guarantor, 
##     family = binomial(link = "logit"), data = Training)
## F =  13.49471  on  1  and  687  df: p= 0.00025785

Hasil yang didapat nilai p-vaue 0.00025785 dibawah nilai signifikansi 0.05 dan menolak H0. Sehinga H1 diterima dengan variabel InstallmentRatePercentage berpengaruh signfikan terhadap variabel Class

variabel “NumberExistingCredits”

regTermTest(fit_final,"NumberExistingCredits")
## Wald test for NumberExistingCredits
##  in glm(formula = Class ~ Duration + InstallmentRatePercentage + 
##     NumberExistingCredits + CheckingAccountStatus.none + CreditHistory.Critical + 
##     Purpose.UsedCar + Purpose.Radio.Television + SavingsAccountBonds.gt.1000 + 
##     SavingsAccountBonds.Unknown + EmploymentDuration.4.to.7 + 
##     Personal.Female.NotSingle + OtherDebtorsGuarantors.Guarantor, 
##     family = binomial(link = "logit"), data = Training)
## F =  5.726164  on  1  and  687  df: p= 0.016981

Hasil yang didapat nilai p-vaue p= 0.016981 dibawah nilai signifikansi 0.05 dan menolak H0. Sehinga H1 diterima dengan variabel NumberExistingCredits berpengaruh signfikan terhadap variabel Class

variabel “CheckingAccountStatus.none”

regTermTest(fit_final,"CheckingAccountStatus.none")
## Wald test for CheckingAccountStatus.none
##  in glm(formula = Class ~ Duration + InstallmentRatePercentage + 
##     NumberExistingCredits + CheckingAccountStatus.none + CreditHistory.Critical + 
##     Purpose.UsedCar + Purpose.Radio.Television + SavingsAccountBonds.gt.1000 + 
##     SavingsAccountBonds.Unknown + EmploymentDuration.4.to.7 + 
##     Personal.Female.NotSingle + OtherDebtorsGuarantors.Guarantor, 
##     family = binomial(link = "logit"), data = Training)
## F =  40.97322  on  1  and  687  df: p= 2.8584e-10

Hasil yang didapat nilai p-vaue p= 0.00000000028584 dibawah nilai signifikansi 0.05 dan menolak H0. Sehinga H1 diterima dengan variabel CheckingAccountStatus.none berpengaruh signfikan terhadap variabel Class

variabel “CreditHistory.Critical”

regTermTest(fit_final,"CreditHistory.Critical")
## Wald test for CreditHistory.Critical
##  in glm(formula = Class ~ Duration + InstallmentRatePercentage + 
##     NumberExistingCredits + CheckingAccountStatus.none + CreditHistory.Critical + 
##     Purpose.UsedCar + Purpose.Radio.Television + SavingsAccountBonds.gt.1000 + 
##     SavingsAccountBonds.Unknown + EmploymentDuration.4.to.7 + 
##     Personal.Female.NotSingle + OtherDebtorsGuarantors.Guarantor, 
##     family = binomial(link = "logit"), data = Training)
## F =  14.30411  on  1  and  687  df: p= 0.00016907

Hasil yang didapat nilai p-vaue p= 0.00016907 dibawah nilai signifikansi 0.05 dan menolak H0. Sehinga H1 diterima dengan variabel CreditHistory.Critical berpengaruh signfikan terhadap variabel Class

variabel “Purpose.UsedCar”

regTermTest(fit_final,"Purpose.UsedCar")
## Wald test for Purpose.UsedCar
##  in glm(formula = Class ~ Duration + InstallmentRatePercentage + 
##     NumberExistingCredits + CheckingAccountStatus.none + CreditHistory.Critical + 
##     Purpose.UsedCar + Purpose.Radio.Television + SavingsAccountBonds.gt.1000 + 
##     SavingsAccountBonds.Unknown + EmploymentDuration.4.to.7 + 
##     Personal.Female.NotSingle + OtherDebtorsGuarantors.Guarantor, 
##     family = binomial(link = "logit"), data = Training)
## F =  8.351342  on  1  and  687  df: p= 0.0039755

Hasil yang didapat nilai p-vaue p= 0.0039755 dibawah nilai signifikansi 0.05 dan menolak H0. Sehinga H1 diterima dengan variabel Purpose.UsedCar berpengaruh signfikan terhadap variabel Class

variabel “Purpose.Radio.Television”

regTermTest(fit_final,"Purpose.Radio.Television")
## Wald test for Purpose.Radio.Television
##  in glm(formula = Class ~ Duration + InstallmentRatePercentage + 
##     NumberExistingCredits + CheckingAccountStatus.none + CreditHistory.Critical + 
##     Purpose.UsedCar + Purpose.Radio.Television + SavingsAccountBonds.gt.1000 + 
##     SavingsAccountBonds.Unknown + EmploymentDuration.4.to.7 + 
##     Personal.Female.NotSingle + OtherDebtorsGuarantors.Guarantor, 
##     family = binomial(link = "logit"), data = Training)
## F =  8.173938  on  1  and  687  df: p= 0.0043785

Hasil yang didapat nilai p-vaue p= 0.0043785 dibawah nilai signifikansi 0.05 dan menolak H0. Sehinga H1 diterima dengan variabel Purpose.Radio.Television berpengaruh signfikan terhadap variabel Class

variabel “SavingsAccountBonds.gt.1000”

regTermTest(fit_final,"SavingsAccountBonds.gt.1000")
## Wald test for SavingsAccountBonds.gt.1000
##  in glm(formula = Class ~ Duration + InstallmentRatePercentage + 
##     NumberExistingCredits + CheckingAccountStatus.none + CreditHistory.Critical + 
##     Purpose.UsedCar + Purpose.Radio.Television + SavingsAccountBonds.gt.1000 + 
##     SavingsAccountBonds.Unknown + EmploymentDuration.4.to.7 + 
##     Personal.Female.NotSingle + OtherDebtorsGuarantors.Guarantor, 
##     family = binomial(link = "logit"), data = Training)
## F =  5.901822  on  1  and  687  df: p= 0.015381

Hasil yang didapat nilai p-vaue p= 0.015381 dibawah nilai signifikansi 0.05 dan menolak H0. Sehinga H1 diterima dengan variabel SavingsAccountBonds.gt.1000 berpengaruh signfikan terhadap variabel Class

variabel “EmploymentDuration.4.to.7”

regTermTest(fit_final,"EmploymentDuration.4.to.7")
## Wald test for EmploymentDuration.4.to.7
##  in glm(formula = Class ~ Duration + InstallmentRatePercentage + 
##     NumberExistingCredits + CheckingAccountStatus.none + CreditHistory.Critical + 
##     Purpose.UsedCar + Purpose.Radio.Television + SavingsAccountBonds.gt.1000 + 
##     SavingsAccountBonds.Unknown + EmploymentDuration.4.to.7 + 
##     Personal.Female.NotSingle + OtherDebtorsGuarantors.Guarantor, 
##     family = binomial(link = "logit"), data = Training)
## F =  11.33266  on  1  and  687  df: p= 0.00080397

Hasil yang didapat nilai p-vaue p= 0.00080397 dibawah nilai signifikansi 0.05 dan menolak H0. Sehinga H1 diterima dengan variabel EmploymentDuration.4.to.7 berpengaruh signfikan terhadap variabel Class

variabel “Personal.Female.NotSingle”

regTermTest(fit_final,"Personal.Female.NotSingle")
## Wald test for Personal.Female.NotSingle
##  in glm(formula = Class ~ Duration + InstallmentRatePercentage + 
##     NumberExistingCredits + CheckingAccountStatus.none + CreditHistory.Critical + 
##     Purpose.UsedCar + Purpose.Radio.Television + SavingsAccountBonds.gt.1000 + 
##     SavingsAccountBonds.Unknown + EmploymentDuration.4.to.7 + 
##     Personal.Female.NotSingle + OtherDebtorsGuarantors.Guarantor, 
##     family = binomial(link = "logit"), data = Training)
## F =  6.707942  on  1  and  687  df: p= 0.0098019

Hasil yang didapat nilai p-vaue p= 0.0098019 dibawah nilai signifikansi 0.05 dan menolak H0. Sehinga H1 diterima dengan variabel Personal.Female.NotSingle berpengaruh signfikan terhadap variabel Class

variabel “OtherDebtorsGuarantors.Guarantor”

regTermTest(fit_final,"OtherDebtorsGuarantors.Guarantor")
## Wald test for OtherDebtorsGuarantors.Guarantor
##  in glm(formula = Class ~ Duration + InstallmentRatePercentage + 
##     NumberExistingCredits + CheckingAccountStatus.none + CreditHistory.Critical + 
##     Purpose.UsedCar + Purpose.Radio.Television + SavingsAccountBonds.gt.1000 + 
##     SavingsAccountBonds.Unknown + EmploymentDuration.4.to.7 + 
##     Personal.Female.NotSingle + OtherDebtorsGuarantors.Guarantor, 
##     family = binomial(link = "logit"), data = Training)
## F =  4.396435  on  1  and  687  df: p= 0.036379

Hasil yang didapat nilai p-vaue p= 0.036379 dibawah nilai signifikansi 0.05 dan menolak H0. Sehinga H1 diterima dengan variabel OtherDebtorsGuarantors.Guarantor berpengaruh signfikan terhadap variabel Class

Varibel “Personal.Female.NotSingle”

regTermTest(fit_final,"Personal.Female.NotSingle")
## Wald test for Personal.Female.NotSingle
##  in glm(formula = Class ~ Duration + InstallmentRatePercentage + 
##     NumberExistingCredits + CheckingAccountStatus.none + CreditHistory.Critical + 
##     Purpose.UsedCar + Purpose.Radio.Television + SavingsAccountBonds.gt.1000 + 
##     SavingsAccountBonds.Unknown + EmploymentDuration.4.to.7 + 
##     Personal.Female.NotSingle + OtherDebtorsGuarantors.Guarantor, 
##     family = binomial(link = "logit"), data = Training)
## F =  6.707942  on  1  and  687  df: p= 0.0098019

Hasil yang didapat nilai p-vaue p= 0.0098019 dibawah nilai signifikansi 0.05 dan menolak H0. Sehinga H1 diterima dengan variabel Personal.Female.NotSingle berpengaruh signfikan terhadap variabel Class

Selanjutnya adalah uji kebaikan model terhadap data menggunakan metode uji Hosmer Lemeshow Test

library(ResourceSelection)
## Warning: package 'ResourceSelection' was built under R version 3.5.3
## ResourceSelection 0.3-5   2019-07-22
hoslem.test(Training$Class,fitted(fit_final),g=10)
## 
##  Hosmer and Lemeshow goodness of fit (GOF) test
## 
## data:  Training$Class, fitted(fit_final)
## X-squared = 6.6907, df = 8, p-value = 0.5703

Hasil yang didapat adalah nilai p-value 0.5703 lebih besar dari nilai signifikansi 0.05 sehingga H0 tetap diterima dengan model yang baik

Sekarang melakukan prediksi dari hasil model yang didapat.

hasil <- predict(fit_final,newdata=Testing[,-10],type='response')
hasil_biner <- ifelse(hasil > 0.5,1,0)

error <- mean(hasil_biner != Testing$Class)
print(paste('Akurasi',1-error))
## [1] "Akurasi 0.73"

Hasil yang didapat model memiliki nilai Akurasi 0.73 dari hasil uji dari data testing.

library(InformationValue)
## Warning: package 'InformationValue' was built under R version 3.5.3
## 
## Attaching package: 'InformationValue'
## The following objects are masked from 'package:caret':
## 
##     confusionMatrix, precision, sensitivity, specificity
plotROC(actuals=Testing[,10],predictedScores=hasil_biner)

Gambar plot ROC menunjukan kurva ROC memiliki nilai 0.628 dengan arti bahwa hasil prdiksi data testing kurang baik. Sehingga model yang didapat masih kurang baik untuk digunakan dalam klasifikasi resiko kredit.