smbinning.plot: Plots after binning

Description Usage Arguments Examples

View source: R/smbinning.R

Description

It generates plots for distribution, bad rate, and weight of evidence after running smbinning and saving its output.

Usage

1
smbinning.plot(ivout, option = "dist", sub = "")

Arguments

ivout

An object generated by binning.

option

Distribution ("dist"), Good Rate ("goodrate"), Bad Rate ("badrate"), and Weight of Evidence ("WoE").

sub

Subtitle for the chart (optional).

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
# Load library and its dataset
library(smbinning)

# Example 1: Numeric variable (1 page, 4 plots)
result=smbinning(df=chileancredit,y="fgood",x="cbs1") # Run and save result
par(mfrow=c(2,2))
boxplot(chileancredit$cbs1~chileancredit$fgood,
        horizontal=TRUE, frame=FALSE, col="lightgray",main="Distribution")
mtext("Credit Score",3)
smbinning.plot(result,option="dist",sub="Credit Score")
smbinning.plot(result,option="badrate",sub="Credit Score")
smbinning.plot(result,option="WoE",sub="Credit Score")
par(mfrow=c(1,1))

# Example 2: Factor variable (1 plot per page)
result=smbinning.factor(df=chileancredit,y="fgood",x="inc",maxcat=11)
smbinning.plot(result,option="dist",sub="Income Level")
smbinning.plot(result,option="badrate",sub="Income Level")
smbinning.plot(result,option="WoE",sub="Income Level")

smbinning documentation built on Dec. 1, 2017, 9:02 a.m.