smbinning.monotonic {smbinning}R Documentation

Monotonic Binning

Description

It gives the user the ability to impose a monotonic trend for good/bad rates per bin.

Usage

smbinning.monotonic(df, y, x, p = 0.05)

Arguments

df

A data frame.

y

Binary response variable (0,1). Integer (int) is required. Name of y must not have a dot. Name "default" is not allowed.

x

Continuous characteristic. At least 5 different values. Value Inf is not allowed. Name of x must not have a dot.

p

Percentage of records per bin. Default 5% (0.05).

Value

The command smbinning.monotonic 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.

Examples

# Load library and its dataset
library(smbinning) # Load package and its data

# Example 1: Monotonic Binning (Increasing Good Rate per Bin)
smbinning(df=smbsimdf2,y="fgood2",x="chr2",p=0.05)$ivtable # Run regular binning
smbinning.monotonic(df=smbsimdf2,y="fgood2",x="chr2",p=0.05)$ivtable # Run monotonic binning
 
# Example 2: Monotonic Binning (Decreasing Good Rate per Bin)
smbinning(df=smbsimdf2,y="fgood3",x="chr3",p=0.05)$ivtable # Run regular binning
smbinning.monotonic(df=smbsimdf2,y="fgood3",x="chr3",p=0.05)$ivtable # Run monotonic binning

[Package smbinning version 0.9 Index]