Load Data Dataset is available here. # Loading the data here library(haven) bank_loan_df <- read_sav("P4_bankloan_5000_clients.sav") bank_loan_df$defaulted_loan<-as.factor(bank_loan_df$defaulted_loan) bank_loan_df$education_level<-as.factor(bank_loan_df$education_level) str(bank_loan_df) ## tibble [5,000 x 9] (S3: tbl_df/tbl/data.frame) ## $ age : num [1:5000] 41 30 40 41 57 45 36 39 43 34 … ## ..- attr(*, “label”)= chr “Age in years” ## ..- attr(*, “format.spss”)= chr […]