smbinning.factor {smbinning} | R Documentation |
Binning on Factor Variables
Description
It generates a table with relevant metrics for all the categories of a given factor variable.
Usage
smbinning.factor(df, y, x, maxcat = 10)
Arguments
df |
A data frame. |
y |
Binary response variable (0,1). Integer ( |
x |
A factor variable with at least 2 different values. Labesl with commas are not allowed. |
maxcat |
Specifies the maximum number of categories. Default value is 10.
Name of |
Value
The command smbinning.factor
generates and object containing the necessary info and utilities for binning.
The user should save the output result so it can be used
with smbinning.plot
, smbinning.sql
, and smbinning.gen.factor
.
Examples
# Load library and its dataset
library(smbinning) # Load package and its data
# Binning a factor variable
result=smbinning.factor(smbsimdf1,x="inc",y="fgood", maxcat=11)
result$ivtable
[Package smbinning version 0.9 Index]