naCombine {logiBin} | R Documentation |
Combine NA bins
Description
This function combines the NA bin with either the bin having the closest bad rate or the average bad rate if the count of observations in NA bin is low
Usage
naCombine(binObj, xVars, cutoffPropn = 0.01)
Arguments
binObj |
- An object returned by getBins or other functions (except createBins) in this package |
xVars |
- A vector of names of variables for which NA bins have to be combined |
cutoffPropn |
- The minimum proportion of observations that must be present in the NA bin for it to be combined with the bin with closest bad rate. If the proportion s below this, the NA bin will be combined with bin having average bad rate |
Value
Returns a list containing 3 objects. Similar to the getBins function
Examples
b1 <- getBins(loanData, "bad_flag", c('age', 'score', 'LTV'))
b1 <- naCombine(b1, c('LTV'))
[Package logiBin version 0.3 Index]