Credit Scoring Classification with Random Forest
Credit Scoring
Credit scoring is usually used at financial or banking services to detect or rank the creditor which needs financial services. This scoring uses a classification method in Machine Learning with Random Forest Classification.
Load Library
Load library that will use in this model
library(tidyverse, quietly = TRUE)
library(Metrics)
library(caret)
library(randomForest)
library(mice)
library(missForest)
library(vroom)
library(InformationValue)
library(ISLR)
Get data
Before reading the data please set the working directory first from your computer. This dataset is from inalyst.id competition and has been closed.
setwd("D:\\000 Project_R\\55_inalyst_credit") # set working directory
credit_train <- vroom("train.csv")## Rows: 3693 Columns: 11
## -- Column specification -----------------------------------------------
## Delimiter: ","
## chr (4): gender, student, employment, tenure
## dbl (6): customer_id, phone_flag, credit_card, balance, income, de...
## date (1): customer_bod
##
## i Use `spec()` to retrieve the full column specification for this data.
## i Specify the column types or set `show_col_types = FALSE` to quiet this message.credit_test <- vroom("test.csv")## Rows: 307 Columns: 10
## -- Column specification -----------------------------------------------
## Delimiter: ","
## chr (4): gender, student, employment, tenure
## dbl (5): customer_id, phone_flag, credit_card, balance, income
## date (1): customer_bod
##
## i Use `spec()` to retrieve the full column specification for this data.
## i Specify the column types or set `show_col_types = FALSE` to quiet this message.glimpse(credit_test)## Rows: 307
## Columns: 10
## $ customer_id [3m[38;5;246m<dbl>[39m[23m 9365, 999, 2835, 5821, 2330, 5753, 7063, 2007, 9~
## $ customer_bod [3m[38;5;246m<date>[39m[23m 1999-10-22, 1987-05-03, 2000-10-20, 1994-07-13,~
## $ gender [3m[38;5;246m<chr>[39m[23m "Male", "Female", "Male", "Male", "Male", "Male"~
## $ phone_flag [3m[38;5;246m<dbl>[39m[23m 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, ~
## $ student [3m[38;5;246m<chr>[39m[23m "No", "No", "No", "No", "No", "Yes", "No", "No",~
## $ employment [3m[38;5;246m<chr>[39m[23m "Salaried", "Salaried", "Salaried", "Salaried", ~
## $ credit_card [3m[38;5;246m<dbl>[39m[23m 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, ~
## $ balance [3m[38;5;246m<dbl>[39m[23m 0.00, 67431.40, 69128.28, 151051.78, 92727.85, 1~
## $ income [3m[38;5;246m<dbl>[39m[23m 4430744, 3743150, 4821580, 3159765, 5659353, 283~
## $ tenure [3m[38;5;246m<chr>[39m[23m "0yrs 0mon", "0yrs 7mon", "1yrs 11mon", "0yrs 10~glimpse(credit_train)## Rows: 3,693
## Columns: 11
## $ customer_id [3m[38;5;246m<dbl>[39m[23m 8300, 672, 5670, 2975, 3883, 7825, 6676, 7991, 9~
## $ customer_bod [3m[38;5;246m<date>[39m[23m 1993-08-17, 2007-12-17, 2000-02-05, 1999-11-16,~
## $ gender [3m[38;5;246m<chr>[39m[23m "Female", "Female", "Female", "Female", "Male", ~
## $ phone_flag [3m[38;5;246m<dbl>[39m[23m 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, ~
## $ student [3m[38;5;246m<chr>[39m[23m "No", "Yes", "Yes", "Yes", "No", "Yes", "No", "N~
## $ employment [3m[38;5;246m<chr>[39m[23m "Self Employed", NA, NA, NA, "Salaried", NA, "Sa~
## $ credit_card [3m[38;5;246m<dbl>[39m[23m 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0, ~
## $ balance [3m[38;5;246m<dbl>[39m[23m 87104.12, 89236.34, 171553.12, 85979.04, 48874.7~
## $ income [3m[38;5;246m<dbl>[39m[23m 5015120.8, 2266076.6, 1779347.3, 2014246.2, 5445~
## $ tenure [3m[38;5;246m<chr>[39m[23m "4yrs 4mon", "4yrs 1mon", "0yrs 9mon", "1yrs 8mo~
## $ default [3m[38;5;246m<dbl>[39m[23m 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ~
Processing Data
After we look at the structure of the data we process the data to combine train and test data set with add new column that used to define which rows are train or test dataset.
credit_train %>%
mutate(
Train = TRUE
) %>%
glimpse() -> credit_train## Rows: 3,693
## Columns: 12
## $ customer_id [3m[38;5;246m<dbl>[39m[23m 8300, 672, 5670, 2975, 3883, 7825, 6676, 7991, 9~
## $ customer_bod [3m[38;5;246m<date>[39m[23m 1993-08-17, 2007-12-17, 2000-02-05, 1999-11-16,~
## $ gender [3m[38;5;246m<chr>[39m[23m "Female", "Female", "Female", "Female", "Male", ~
## $ phone_flag [3m[38;5;246m<dbl>[39m[23m 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, ~
## $ student [3m[38;5;246m<chr>[39m[23m "No", "Yes", "Yes", "Yes", "No", "Yes", "No", "N~
## $ employment [3m[38;5;246m<chr>[39m[23m "Self Employed", NA, NA, NA, "Salaried", NA, "Sa~
## $ credit_card [3m[38;5;246m<dbl>[39m[23m 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0, ~
## $ balance [3m[38;5;246m<dbl>[39m[23m 87104.12, 89236.34, 171553.12, 85979.04, 48874.7~
## $ income [3m[38;5;246m<dbl>[39m[23m 5015120.8, 2266076.6, 1779347.3, 2014246.2, 5445~
## $ tenure [3m[38;5;246m<chr>[39m[23m "4yrs 4mon", "4yrs 1mon", "0yrs 9mon", "1yrs 8mo~
## $ default [3m[38;5;246m<dbl>[39m[23m 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ~
## $ Train [3m[38;5;246m<lgl>[39m[23m TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, ~credit_test %>%
mutate(
Train = FALSE
) %>%
glimpse() -> credit_test## Rows: 307
## Columns: 11
## $ customer_id [3m[38;5;246m<dbl>[39m[23m 9365, 999, 2835, 5821, 2330, 5753, 7063, 2007, 9~
## $ customer_bod [3m[38;5;246m<date>[39m[23m 1999-10-22, 1987-05-03, 2000-10-20, 1994-07-13,~
## $ gender [3m[38;5;246m<chr>[39m[23m "Male", "Female", "Male", "Male", "Male", "Male"~
## $ phone_flag [3m[38;5;246m<dbl>[39m[23m 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, ~
## $ student [3m[38;5;246m<chr>[39m[23m "No", "No", "No", "No", "No", "Yes", "No", "No",~
## $ employment [3m[38;5;246m<chr>[39m[23m "Salaried", "Salaried", "Salaried", "Salaried", ~
## $ credit_card [3m[38;5;246m<dbl>[39m[23m 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, ~
## $ balance [3m[38;5;246m<dbl>[39m[23m 0.00, 67431.40, 69128.28, 151051.78, 92727.85, 1~
## $ income [3m[38;5;246m<dbl>[39m[23m 4430744, 3743150, 4821580, 3159765, 5659353, 283~
## $ tenure [3m[38;5;246m<chr>[39m[23m "0yrs 0mon", "0yrs 7mon", "1yrs 11mon", "0yrs 10~
## $ Train [3m[38;5;246m<lgl>[39m[23m FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE,~credit_test %>%
mutate(
default = 1 # gagal bayar
) %>%
glimpse() -> test_tmp## Rows: 307
## Columns: 12
## $ customer_id [3m[38;5;246m<dbl>[39m[23m 9365, 999, 2835, 5821, 2330, 5753, 7063, 2007, 9~
## $ customer_bod [3m[38;5;246m<date>[39m[23m 1999-10-22, 1987-05-03, 2000-10-20, 1994-07-13,~
## $ gender [3m[38;5;246m<chr>[39m[23m "Male", "Female", "Male", "Male", "Male", "Male"~
## $ phone_flag [3m[38;5;246m<dbl>[39m[23m 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, ~
## $ student [3m[38;5;246m<chr>[39m[23m "No", "No", "No", "No", "No", "Yes", "No", "No",~
## $ employment [3m[38;5;246m<chr>[39m[23m "Salaried", "Salaried", "Salaried", "Salaried", ~
## $ credit_card [3m[38;5;246m<dbl>[39m[23m 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, ~
## $ balance [3m[38;5;246m<dbl>[39m[23m 0.00, 67431.40, 69128.28, 151051.78, 92727.85, 1~
## $ income [3m[38;5;246m<dbl>[39m[23m 4430744, 3743150, 4821580, 3159765, 5659353, 283~
## $ tenure [3m[38;5;246m<chr>[39m[23m "0yrs 0mon", "0yrs 7mon", "1yrs 11mon", "0yrs 10~
## $ Train [3m[38;5;246m<lgl>[39m[23m FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE,~
## $ default [3m[38;5;246m<dbl>[39m[23m 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ~#combine data
test_tmp %>%
select(
customer_id:tenure,default,Train
) %>%
glimpse() -> test_tmp## Rows: 307
## Columns: 12
## $ customer_id [3m[38;5;246m<dbl>[39m[23m 9365, 999, 2835, 5821, 2330, 5753, 7063, 2007, 9~
## $ customer_bod [3m[38;5;246m<date>[39m[23m 1999-10-22, 1987-05-03, 2000-10-20, 1994-07-13,~
## $ gender [3m[38;5;246m<chr>[39m[23m "Male", "Female", "Male", "Male", "Male", "Male"~
## $ phone_flag [3m[38;5;246m<dbl>[39m[23m 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, ~
## $ student [3m[38;5;246m<chr>[39m[23m "No", "No", "No", "No", "No", "Yes", "No", "No",~
## $ employment [3m[38;5;246m<chr>[39m[23m "Salaried", "Salaried", "Salaried", "Salaried", ~
## $ credit_card [3m[38;5;246m<dbl>[39m[23m 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, ~
## $ balance [3m[38;5;246m<dbl>[39m[23m 0.00, 67431.40, 69128.28, 151051.78, 92727.85, 1~
## $ income [3m[38;5;246m<dbl>[39m[23m 4430744, 3743150, 4821580, 3159765, 5659353, 283~
## $ tenure [3m[38;5;246m<chr>[39m[23m "0yrs 0mon", "0yrs 7mon", "1yrs 11mon", "0yrs 10~
## $ default [3m[38;5;246m<dbl>[39m[23m 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ~
## $ Train [3m[38;5;246m<lgl>[39m[23m FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE,~all_data <- rbind(credit_train, test_tmp)
glimpse(all_data)## Rows: 4,000
## Columns: 12
## $ customer_id [3m[38;5;246m<dbl>[39m[23m 8300, 672, 5670, 2975, 3883, 7825, 6676, 7991, 9~
## $ customer_bod [3m[38;5;246m<date>[39m[23m 1993-08-17, 2007-12-17, 2000-02-05, 1999-11-16,~
## $ gender [3m[38;5;246m<chr>[39m[23m "Female", "Female", "Female", "Female", "Male", ~
## $ phone_flag [3m[38;5;246m<dbl>[39m[23m 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, ~
## $ student [3m[38;5;246m<chr>[39m[23m "No", "Yes", "Yes", "Yes", "No", "Yes", "No", "N~
## $ employment [3m[38;5;246m<chr>[39m[23m "Self Employed", NA, NA, NA, "Salaried", NA, "Sa~
## $ credit_card [3m[38;5;246m<dbl>[39m[23m 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0, ~
## $ balance [3m[38;5;246m<dbl>[39m[23m 87104.12, 89236.34, 171553.12, 85979.04, 48874.7~
## $ income [3m[38;5;246m<dbl>[39m[23m 5015120.8, 2266076.6, 1779347.3, 2014246.2, 5445~
## $ tenure [3m[38;5;246m<chr>[39m[23m "4yrs 4mon", "4yrs 1mon", "0yrs 9mon", "1yrs 8mo~
## $ default [3m[38;5;246m<dbl>[39m[23m 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ~
## $ Train [3m[38;5;246m<lgl>[39m[23m TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, ~
Check the tenure data structure and mutate the column into numeric values & fill the blank data and group the status of the customer.
all_data %>%
mutate(
tenure_year = parse_number(str_extract(tenure,"[0-9]")),
tenure_month = parse_number(str_extract(tenure,"(?<=\\s)[0-9]")),
tenure_in_month = (tenure_year*12) + tenure_month,
student_class = case_when(
student == "Yes" ~ 1,
TRUE ~ 0
),
employment_fix = case_when(
is.na(employment) ~ "Dependents", # student or no with no revenue
TRUE ~ employment
)
) %>%
glimpse() -> all_data## Rows: 4,000
## Columns: 17
## $ customer_id [3m[38;5;246m<dbl>[39m[23m 8300, 672, 5670, 2975, 3883, 7825, 6676, 7991~
## $ customer_bod [3m[38;5;246m<date>[39m[23m 1993-08-17, 2007-12-17, 2000-02-05, 1999-11-~
## $ gender [3m[38;5;246m<chr>[39m[23m "Female", "Female", "Female", "Female", "Male~
## $ phone_flag [3m[38;5;246m<dbl>[39m[23m 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ~
## $ student [3m[38;5;246m<chr>[39m[23m "No", "Yes", "Yes", "Yes", "No", "Yes", "No",~
## $ employment [3m[38;5;246m<chr>[39m[23m "Self Employed", NA, NA, NA, "Salaried", NA, ~
## $ credit_card [3m[38;5;246m<dbl>[39m[23m 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 1, ~
## $ balance [3m[38;5;246m<dbl>[39m[23m 87104.12, 89236.34, 171553.12, 85979.04, 4887~
## $ income [3m[38;5;246m<dbl>[39m[23m 5015120.8, 2266076.6, 1779347.3, 2014246.2, 5~
## $ tenure [3m[38;5;246m<chr>[39m[23m "4yrs 4mon", "4yrs 1mon", "0yrs 9mon", "1yrs ~
## $ default [3m[38;5;246m<dbl>[39m[23m 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ~
## $ Train [3m[38;5;246m<lgl>[39m[23m TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRU~
## $ tenure_year [3m[38;5;246m<dbl>[39m[23m 4, 4, 0, 1, 0, 0, 1, 0, 2, 0, 0, 0, 0, 3, 0, ~
## $ tenure_month [3m[38;5;246m<dbl>[39m[23m 4, 1, 9, 8, 1, 0, 1, 0, 6, 0, 8, 8, 7, 3, 0, ~
## $ tenure_in_month [3m[38;5;246m<dbl>[39m[23m 52, 49, 9, 20, 1, 0, 13, 0, 30, 0, 8, 8, 7, 3~
## $ student_class [3m[38;5;246m<dbl>[39m[23m 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, ~
## $ employment_fix [3m[38;5;246m<chr>[39m[23m "Self Employed", "Dependents", "Dependents", ~
Selected specific column for classification model from all_data object.
all_data %>%
select(
customer_id:phone_flag,
student_class, employment_fix,
credit_card:income, tenure_in_month,
default:Train
) %>%
glimpse() -> all_data_fix## Rows: 4,000
## Columns: 12
## $ customer_id [3m[38;5;246m<dbl>[39m[23m 8300, 672, 5670, 2975, 3883, 7825, 6676, 7991~
## $ customer_bod [3m[38;5;246m<date>[39m[23m 1993-08-17, 2007-12-17, 2000-02-05, 1999-11-~
## $ gender [3m[38;5;246m<chr>[39m[23m "Female", "Female", "Female", "Female", "Male~
## $ phone_flag [3m[38;5;246m<dbl>[39m[23m 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ~
## $ student_class [3m[38;5;246m<dbl>[39m[23m 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, ~
## $ employment_fix [3m[38;5;246m<chr>[39m[23m "Self Employed", "Dependents", "Dependents", ~
## $ credit_card [3m[38;5;246m<dbl>[39m[23m 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 1, ~
## $ balance [3m[38;5;246m<dbl>[39m[23m 87104.12, 89236.34, 171553.12, 85979.04, 4887~
## $ income [3m[38;5;246m<dbl>[39m[23m 5015120.8, 2266076.6, 1779347.3, 2014246.2, 5~
## $ tenure_in_month [3m[38;5;246m<dbl>[39m[23m 52, 49, 9, 20, 1, 0, 13, 0, 30, 0, 8, 8, 7, 3~
## $ default [3m[38;5;246m<dbl>[39m[23m 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ~
## $ Train [3m[38;5;246m<lgl>[39m[23m TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRU~
set as factor for column “gender” and “employment_fix”
all_data_fix %>%
mutate(
gender = as.factor(gender),
employment_fix = as.factor(employment_fix)
) %>%
glimpse() -> all_data_fix## Rows: 4,000
## Columns: 12
## $ customer_id [3m[38;5;246m<dbl>[39m[23m 8300, 672, 5670, 2975, 3883, 7825, 6676, 7991~
## $ customer_bod [3m[38;5;246m<date>[39m[23m 1993-08-17, 2007-12-17, 2000-02-05, 1999-11-~
## $ gender [3m[38;5;246m<fct>[39m[23m Female, Female, Female, Female, Male, Male, N~
## $ phone_flag [3m[38;5;246m<dbl>[39m[23m 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ~
## $ student_class [3m[38;5;246m<dbl>[39m[23m 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, ~
## $ employment_fix [3m[38;5;246m<fct>[39m[23m Self Employed, Dependents, Dependents, Depend~
## $ credit_card [3m[38;5;246m<dbl>[39m[23m 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 1, ~
## $ balance [3m[38;5;246m<dbl>[39m[23m 87104.12, 89236.34, 171553.12, 85979.04, 4887~
## $ income [3m[38;5;246m<dbl>[39m[23m 5015120.8, 2266076.6, 1779347.3, 2014246.2, 5~
## $ tenure_in_month [3m[38;5;246m<dbl>[39m[23m 52, 49, 9, 20, 1, 0, 13, 0, 30, 0, 8, 8, 7, 3~
## $ default [3m[38;5;246m<dbl>[39m[23m 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ~
## $ Train [3m[38;5;246m<lgl>[39m[23m TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRU~
Handling Missing Data
the missing data from the dataset before modeling. This project use the “mice” package to find imputation for filling the missing data
md.pattern(all_data_fix)
## customer_id customer_bod phone_flag student_class employment_fix
## 3666 1 1 1 1 1
## 321 1 1 1 1 1
## 12 1 1 1 1 1
## balance income tenure_in_month default Train credit_card gender
## 3666 1 1 1 1 1 1 1
## 321 1 1 1 1 1 1 0
## 12 1 1 1 1 1 0 1
##
## 3666 0
## 321 1
## 12 1
## [ reached getOption("max.print") -- omitted 2 rows ]temp_data <- mice(all_data_fix,m=5,maxit=50,method = 'logreg',seed=500)## Warning: Type mismatch for variable(s): credit_card
## Imputation method logreg is for categorical data.
##
## iter imp variable
## 1 1 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 1 2 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 1 3 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 1 4 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 1 5 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 2 1 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 2 2 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 2 3 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 2 4 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 2 5 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 3 1 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 3 2 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 3 3 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 3 4 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 3 5 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 4 1 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 4 2 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 4 3 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 4 4 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 4 5 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 5 1 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 5 2 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 5 3 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 5 4 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 5 5 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 6 1 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 6 2 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 6 3 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 6 4 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 6 5 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 7 1 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 7 2 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 7 3 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 7 4 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 7 5 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 8 1 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 8 2 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 8 3 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 8 4 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 8 5 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 9 1 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 9 2 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 9 3 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 9 4 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 9 5 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 10 1 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 10 2 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 10 3 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 10 4 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 10 5 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 11 1 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 11 2 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 11 3 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 11 4 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 11 5 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 12 1 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 12 2 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 12 3 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 12 4 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 12 5 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 13 1 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 13 2 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 13 3 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 13 4 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 13 5 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 14 1 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 14 2 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 14 3 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 14 4 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 14 5 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 15 1 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 15 2 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 15 3 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 15 4 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 15 5 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 16 1 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 16 2 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 16 3 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 16 4 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 16 5 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 17 1 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 17 2 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 17 3 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 17 4 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 17 5 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 18 1 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 18 2 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 18 3 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 18 4 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 18 5 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 19 1 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 19 2 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 19 3 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 19 4 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 19 5 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 20 1 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 20 2 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 20 3 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 20 4 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 20 5 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 21 1 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 21 2 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 21 3 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 21 4 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 21 5 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 22 1 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 22 2 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 22 3 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 22 4 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 22 5 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 23 1 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 23 2 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 23 3 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 23 4 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 23 5 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 24 1 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 24 2 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 24 3 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 24 4 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 24 5 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 25 1 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 25 2 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 25 3 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 25 4 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 25 5 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 26 1 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 26 2 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 26 3 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 26 4 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 26 5 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 27 1 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 27 2 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 27 3 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 27 4 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 27 5 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 28 1 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 28 2 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 28 3 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 28 4 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 28 5 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 29 1 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 29 2 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 29 3 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 29 4 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 29 5 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 30 1 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 30 2 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 30 3 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 30 4 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 30 5 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 31 1 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 31 2 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 31 3 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 31 4 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 31 5 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 32 1 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 32 2 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 32 3 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 32 4 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 32 5 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 33 1 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 33 2 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 33 3 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 33 4 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 33 5 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 34 1 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 34 2 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 34 3 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 34 4 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 34 5 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 35 1 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 35 2 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 35 3 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 35 4 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 35 5 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 36 1 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 36 2 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 36 3 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 36 4 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 36 5 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 37 1 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 37 2 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 37 3 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 37 4 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 37 5 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 38 1 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 38 2 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 38 3 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 38 4 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 38 5 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 39 1 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 39 2 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 39 3 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 39 4 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 39 5 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 40 1 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 40 2 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 40 3 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 40 4 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 40 5 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 41 1 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 41 2 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 41 3 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 41 4 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 41 5 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 42 1 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 42 2 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 42 3 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 42 4 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 42 5 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 43 1 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 43 2 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 43 3 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 43 4 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 43 5 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 44 1 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 44 2 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 44 3 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 44 4 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 44 5 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 45 1 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 45 2 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 45 3 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 45 4 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 45 5 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 46 1 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 46 2 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 46 3 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 46 4 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 46 5 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 47 1 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 47 2 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 47 3 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 47 4 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 47 5 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 48 1 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 48 2 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 48 3 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 48 4 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 48 5 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 49 1 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 49 2 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 49 3 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 49 4 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 49 5 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 50 1 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 50 2 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 50 3 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 50 4 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
##
## 50 5 gender
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'
## credit_card
## Warning in rep(c(rep.int(c(0.5, -0.5), k), rep.int(0, nr)), length = nr
## * : partial argument match of 'length' to 'length.out'summary(temp_data)## Class: mids
## Number of multiple imputations: 5
## Imputation methods:
## customer_id customer_bod gender phone_flag
## "" "" "logreg" ""
## student_class employment_fix credit_card balance
## "" "" "logreg" ""
## income tenure_in_month default Train
## "" "" "" ""
## PredictorMatrix:
## customer_id customer_bod gender phone_flag
## customer_id 0 1 1 1
## customer_bod 1 0 1 1
## gender 1 1 0 1
## phone_flag 1 1 1 0
## student_class employment_fix credit_card balance income
## customer_id 1 1 1 1 1
## customer_bod 1 1 1 1 1
## gender 1 1 1 1 1
## phone_flag 1 1 1 1 1
## tenure_in_month default Train
## customer_id 1 1 1
## customer_bod 1 1 1
## gender 1 1 1
## phone_flag 1 1 1
## [ reached getOption("max.print") -- omitted 2 rows ]complete(temp_data,1)## customer_id customer_bod gender phone_flag student_class
## 1 8300 1993-08-17 Female 1 0
## 2 672 2007-12-17 Female 1 1
## 3 5670 2000-02-05 Female 1 1
## 4 2975 1999-11-16 Female 1 1
## employment_fix credit_card balance income tenure_in_month default
## 1 Self Employed 1 87104.12 5015121 52 0
## 2 Dependents 0 89236.34 2266077 49 0
## 3 Dependents 0 171553.12 1779347 9 0
## 4 Dependents 0 85979.04 2014246 20 0
## Train
## 1 TRUE
## 2 TRUE
## 3 TRUE
## 4 TRUE
## [ reached 'max' / getOption("max.print") -- omitted 3996 rows ]xyplot(temp_data,default ~ gender+credit_card,pch=18,cex=1)
densityplot(temp_data)
stripplot(temp_data, pch = 20, cex = 1.2)
all_data_fix_imp <- complete(temp_data,5) %>%
glimpse() # imputation data## Rows: 4,000
## Columns: 12
## $ customer_id [3m[38;5;246m<dbl>[39m[23m 8300, 672, 5670, 2975, 3883, 7825, 6676, 7991~
## $ customer_bod [3m[38;5;246m<date>[39m[23m 1993-08-17, 2007-12-17, 2000-02-05, 1999-11-~
## $ gender [3m[38;5;246m<fct>[39m[23m Female, Female, Female, Female, Male, Male, F~
## $ phone_flag [3m[38;5;246m<dbl>[39m[23m 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ~
## $ student_class [3m[38;5;246m<dbl>[39m[23m 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, ~
## $ employment_fix [3m[38;5;246m<fct>[39m[23m Self Employed, Dependents, Dependents, Depend~
## $ credit_card [3m[38;5;246m<dbl>[39m[23m 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 1, ~
## $ balance [3m[38;5;246m<dbl>[39m[23m 87104.12, 89236.34, 171553.12, 85979.04, 4887~
## $ income [3m[38;5;246m<dbl>[39m[23m 5015120.8, 2266076.6, 1779347.3, 2014246.2, 5~
## $ tenure_in_month [3m[38;5;246m<dbl>[39m[23m 52, 49, 9, 20, 1, 0, 13, 0, 30, 0, 8, 8, 7, 3~
## $ default [3m[38;5;246m<dbl>[39m[23m 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ~
## $ Train [3m[38;5;246m<lgl>[39m[23m TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRU~md.pattern(all_data_fix_imp)## /\ /\
## { `---' }
## { O O }
## ==> V <== No need for mice. This data set is completely observed.
## \ \|/ /
## `-----'
## customer_id customer_bod gender phone_flag student_class
## 4000 1 1 1 1 1
## 0 0 0 0 0
## employment_fix credit_card balance income tenure_in_month default
## 4000 1 1 1 1 1 1
## 0 0 0 0 0 0
## Train
## 4000 1 0
## 0 0
One-Hot-Encoding
For the algorithm to be more efficient, it is a good idea to create dummy variables (or one-hot-encodings). This should help speed up the algorithms. There is a really good package to do this automatically for us called fastDummies. The function I will use is called dummy_cols and it automatically turns all factor variables or character variables into dummy variables (or one-hot-encodings). You can additionally specify which columns to do this to if you don’t want to do this to all of your columns. The argument remove_most_frequent_dummy = TRUE just removes one of the dummy variables. This is a good idea because keeping all of the one-hot-encodings would be keeping too-much-information; knowing all of the categories but one allows you to know the other category
all_data_fix_imp %>%
fastDummies::dummy_cols(remove_most_frequent_dummy = FALSE) %>%
select(-c(gender, employment_fix)) %>%
glimpse() -> all_data_fix_2## Rows: 4,000
## Columns: 15
## $ customer_id [3m[38;5;246m<dbl>[39m[23m 8300, 672, 5670, 2975, 3883, 7~
## $ customer_bod [3m[38;5;246m<date>[39m[23m 1993-08-17, 2007-12-17, 2000-~
## $ phone_flag [3m[38;5;246m<dbl>[39m[23m 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ~
## $ student_class [3m[38;5;246m<dbl>[39m[23m 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, ~
## $ credit_card [3m[38;5;246m<dbl>[39m[23m 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, ~
## $ balance [3m[38;5;246m<dbl>[39m[23m 87104.12, 89236.34, 171553.12,~
## $ income [3m[38;5;246m<dbl>[39m[23m 5015120.8, 2266076.6, 1779347.~
## $ tenure_in_month [3m[38;5;246m<dbl>[39m[23m 52, 49, 9, 20, 1, 0, 13, 0, 30~
## $ default [3m[38;5;246m<dbl>[39m[23m 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ~
## $ Train [3m[38;5;246m<lgl>[39m[23m TRUE, TRUE, TRUE, TRUE, TRUE, ~
## $ gender_Female [3m[38;5;246m<int>[39m[23m 1, 1, 1, 1, 0, 0, 1, 0, 1, 1, ~
## $ gender_Male [3m[38;5;246m<int>[39m[23m 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, ~
## $ employment_fix_Dependents [3m[38;5;246m<int>[39m[23m 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, ~
## $ employment_fix_Salaried [3m[38;5;246m<int>[39m[23m 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, ~
## $ `employment_fix_Self Employed` [3m[38;5;246m<int>[39m[23m 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, ~
Then mutate another data to create age of the customer
today <- lubridate::as_date("2021-01-01")
all_data_fix_2 %>%
mutate(
age_years = (as.integer(today) - as.integer(customer_bod))/365,
employment_fix_Self_Employed = `employment_fix_Self Employed`,
default = as.factor(default)
) %>%
select(
-c(customer_bod,`employment_fix_Self Employed`)
) %>%
glimpse() -> all_data_fix_ok## Rows: 4,000
## Columns: 15
## $ customer_id [3m[38;5;246m<dbl>[39m[23m 8300, 672, 5670, 2975, 3883, 782~
## $ phone_flag [3m[38;5;246m<dbl>[39m[23m 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,~
## $ student_class [3m[38;5;246m<dbl>[39m[23m 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 1,~
## $ credit_card [3m[38;5;246m<dbl>[39m[23m 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0,~
## $ balance [3m[38;5;246m<dbl>[39m[23m 87104.12, 89236.34, 171553.12, 8~
## $ income [3m[38;5;246m<dbl>[39m[23m 5015120.8, 2266076.6, 1779347.3,~
## $ tenure_in_month [3m[38;5;246m<dbl>[39m[23m 52, 49, 9, 20, 1, 0, 13, 0, 30, ~
## $ default [3m[38;5;246m<fct>[39m[23m 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,~
## $ Train [3m[38;5;246m<lgl>[39m[23m TRUE, TRUE, TRUE, TRUE, TRUE, TR~
## $ gender_Female [3m[38;5;246m<int>[39m[23m 1, 1, 1, 1, 0, 0, 1, 0, 1, 1, 1,~
## $ gender_Male [3m[38;5;246m<int>[39m[23m 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0,~
## $ employment_fix_Dependents [3m[38;5;246m<int>[39m[23m 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 1,~
## $ employment_fix_Salaried [3m[38;5;246m<int>[39m[23m 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 0,~
## $ age_years [3m[38;5;246m<dbl>[39m[23m 27.39452, 13.05205, 20.92055, 21~
## $ employment_fix_Self_Employed [3m[38;5;246m<int>[39m[23m 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,~
Split Data into Train and Test
Splitting the fixed data
all_data_fix_ok %>%
filter(Train) %>%
select(-Train) %>%
glimpse() -> train_mf## Rows: 3,693
## Columns: 14
## $ customer_id [3m[38;5;246m<dbl>[39m[23m 8300, 672, 5670, 2975, 3883, 782~
## $ phone_flag [3m[38;5;246m<dbl>[39m[23m 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,~
## $ student_class [3m[38;5;246m<dbl>[39m[23m 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 1,~
## $ credit_card [3m[38;5;246m<dbl>[39m[23m 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0,~
## $ balance [3m[38;5;246m<dbl>[39m[23m 87104.12, 89236.34, 171553.12, 8~
## $ income [3m[38;5;246m<dbl>[39m[23m 5015120.8, 2266076.6, 1779347.3,~
## $ tenure_in_month [3m[38;5;246m<dbl>[39m[23m 52, 49, 9, 20, 1, 0, 13, 0, 30, ~
## $ default [3m[38;5;246m<fct>[39m[23m 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,~
## $ gender_Female [3m[38;5;246m<int>[39m[23m 1, 1, 1, 1, 0, 0, 1, 0, 1, 1, 1,~
## $ gender_Male [3m[38;5;246m<int>[39m[23m 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0,~
## $ employment_fix_Dependents [3m[38;5;246m<int>[39m[23m 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 1,~
## $ employment_fix_Salaried [3m[38;5;246m<int>[39m[23m 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 0,~
## $ age_years [3m[38;5;246m<dbl>[39m[23m 27.39452, 13.05205, 20.92055, 21~
## $ employment_fix_Self_Employed [3m[38;5;246m<int>[39m[23m 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,~all_data_fix_ok %>%
filter(!Train) %>%
select(-Train) %>%
glimpse() -> test_mf## Rows: 307
## Columns: 14
## $ customer_id [3m[38;5;246m<dbl>[39m[23m 9365, 999, 2835, 5821, 2330, 575~
## $ phone_flag [3m[38;5;246m<dbl>[39m[23m 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1,~
## $ student_class [3m[38;5;246m<dbl>[39m[23m 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0,~
## $ credit_card [3m[38;5;246m<dbl>[39m[23m 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0,~
## $ balance [3m[38;5;246m<dbl>[39m[23m 0.00, 67431.40, 69128.28, 151051~
## $ income [3m[38;5;246m<dbl>[39m[23m 4430744, 3743150, 4821580, 31597~
## $ tenure_in_month [3m[38;5;246m<dbl>[39m[23m 0, 7, 13, 1, 15, 29, 28, 48, 7, ~
## $ default [3m[38;5;246m<fct>[39m[23m 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,~
## $ gender_Female [3m[38;5;246m<int>[39m[23m 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0,~
## $ gender_Male [3m[38;5;246m<int>[39m[23m 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1,~
## $ employment_fix_Dependents [3m[38;5;246m<int>[39m[23m 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0,~
## $ employment_fix_Salaried [3m[38;5;246m<int>[39m[23m 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0,~
## $ age_years [3m[38;5;246m<dbl>[39m[23m 21.21096, 33.69041, 20.21370, 26~
## $ employment_fix_Self_Employed [3m[38;5;246m<int>[39m[23m 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1,~
definition the predictor and yield
Split Data into Training and validation for the model
sample_size = floor(0.8*nrow(train_mf))
set.seed(777)
# randomly split data in r
picked = sample(seq_len(nrow(train_mf)),size = sample_size)
train_set =train_mf[picked,] %>% glimpse()## Rows: 2,954
## Columns: 14
## $ customer_id [3m[38;5;246m<dbl>[39m[23m 5492, 468, 4297, 4514, 1391, 145~
## $ phone_flag [3m[38;5;246m<dbl>[39m[23m 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1,~
## $ student_class [3m[38;5;246m<dbl>[39m[23m 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 0,~
## $ credit_card [3m[38;5;246m<dbl>[39m[23m 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1,~
## $ balance [3m[38;5;246m<dbl>[39m[23m 251536.37, 99159.24, 156287.98, ~
## $ income [3m[38;5;246m<dbl>[39m[23m 5999104, 2961566, 1856201, 22572~
## $ tenure_in_month [3m[38;5;246m<dbl>[39m[23m 36, 5, 32, 5, 19, 16, 36, 24, 15~
## $ default [3m[38;5;246m<fct>[39m[23m 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,~
## $ gender_Female [3m[38;5;246m<int>[39m[23m 1, 0, 0, 1, 0, 0, 1, 1, 1, 1, 0,~
## $ gender_Male [3m[38;5;246m<int>[39m[23m 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 1,~
## $ employment_fix_Dependents [3m[38;5;246m<int>[39m[23m 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 0,~
## $ employment_fix_Salaried [3m[38;5;246m<int>[39m[23m 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 1,~
## $ age_years [3m[38;5;246m<dbl>[39m[23m 25.572603, 23.082192, 26.753425,~
## $ employment_fix_Self_Employed [3m[38;5;246m<int>[39m[23m 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,~val_set =train_mf[-picked,] %>% glimpse()## Rows: 739
## Columns: 14
## $ customer_id [3m[38;5;246m<dbl>[39m[23m 5670, 2975, 3883, 9464, 10000, 1~
## $ phone_flag [3m[38;5;246m<dbl>[39m[23m 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0,~
## $ student_class [3m[38;5;246m<dbl>[39m[23m 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0,~
## $ credit_card [3m[38;5;246m<dbl>[39m[23m 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1,~
## $ balance [3m[38;5;246m<dbl>[39m[23m 171553.12, 85979.04, 48874.77, 0~
## $ income [3m[38;5;246m<dbl>[39m[23m 1779347, 2014246, 5445148, 34446~
## $ tenure_in_month [3m[38;5;246m<dbl>[39m[23m 9, 20, 1, 0, 8, 7, 0, 0, 13, 31,~
## $ default [3m[38;5;246m<fct>[39m[23m 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,~
## $ gender_Female [3m[38;5;246m<int>[39m[23m 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0,~
## $ gender_Male [3m[38;5;246m<int>[39m[23m 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1,~
## $ employment_fix_Dependents [3m[38;5;246m<int>[39m[23m 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0,~
## $ employment_fix_Salaried [3m[38;5;246m<int>[39m[23m 0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1,~
## $ age_years [3m[38;5;246m<dbl>[39m[23m 20.920548, 21.142466, 43.402740,~
## $ employment_fix_Self_Employed [3m[38;5;246m<int>[39m[23m 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0,~train_set %>%
select(-c(customer_id)) -> train_data
val_set %>%
select(-c(customer_id,default)) -> val_data
test_mf %>%
select(-c(customer_id,default)) -> test_data
Modeling Data
the model with a caret for random-forest into the dataset. Caret is the package in R that is usually used to develop a machine learning models.
## + Fold1: mtry= 2
## - Fold1: mtry= 2
## + Fold1: mtry= 7
## - Fold1: mtry= 7
## + Fold1: mtry=12
## - Fold1: mtry=12
## + Fold2: mtry= 2
## - Fold2: mtry= 2
## + Fold2: mtry= 7
## - Fold2: mtry= 7
## + Fold2: mtry=12
## - Fold2: mtry=12
## + Fold3: mtry= 2
## - Fold3: mtry= 2
## + Fold3: mtry= 7
## - Fold3: mtry= 7
## + Fold3: mtry=12
## - Fold3: mtry=12
## + Fold4: mtry= 2
## - Fold4: mtry= 2
## + Fold4: mtry= 7
## - Fold4: mtry= 7
## + Fold4: mtry=12
## - Fold4: mtry=12
## + Fold5: mtry= 2
## - Fold5: mtry= 2
## + Fold5: mtry= 7
## - Fold5: mtry= 7
## + Fold5: mtry=12
## - Fold5: mtry=12
## Aggregating results
## Selecting tuning parameters
## Fitting mtry = 2 on full training set
## Random Forest
##
## 2954 samples
## 12 predictor
## 2 classes: '0', '1'
##
## No pre-processing
## Resampling: Cross-Validated (5 fold)
## Summary of sample sizes: 2363, 2364, 2364, 2363, 2362
## Resampling results across tuning parameters:
##
## mtry Accuracy Kappa
## 2 0.9539596 0.4751373
## 7 0.9529444 0.5769136
## 12 0.9512518 0.5680203
##
## Accuracy was used to select the optimal model using the largest value.
## The final value used for the model was mtry = 2.
After developing the model then we evaluate the model and predict the test dataset.
prediction <- predict(rf_model, newdata = val_data)
print(paste0("Accuracy for this Model are: ", Metrics::accuracy(prediction, val_set$default)), quote = FALSE)## [1] Accuracy for this Model are: 0.937753721244926