Description Usage Arguments Details Value Examples
fit_logit
takes a dataset and formula input by the user to generate
a logistic regression model that will be later used for the scoring borrower
accounts.
1 |
.data |
A tibble or data.frame |
formula |
A formula of the form |
The function performs the following:
Calculate the weights-of-evidence (WOEs) of the categorical variables
Replace the category values with the weights of evidence
Returns a glm model object with modified attributes
All numeric variables are used in the logistic regression model as is. All categorical variables are converted into WOEs before modelling. For better accuracy and for simplicity, it is recommended that numeric variables are first binned before modelling.
A glm object containing the resulting model, with the name of the bad variable, and the weights of evidence for each value in each variable as attributes.
1 2 3 4 5 6 7 8 9 10 11 | library(dplyr)
bin_manual(german, bad, age = c_l(40, 55)) %>%
fit_logit(bad ~ age + history + purpose)
bin_manual(german,
bad,
duration = c_r(15, 32),
check = TRUE) %>%
fit_logit(bad ~ duration + age + employed_since)
#
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.