InformationValue (version 1.2.3)

WOETable: WOETable

Description

Compute the WOETable that shows the Weights Of Evidence (WOE) for each group and respeective Information Values (IVs).

Usage

WOETable(X, Y, valueOfGood = 1)

Arguments

X
The categorical variable stored as factor for which WOE Table is to be computed.
Y
The actual 1/0 flags for the binary response variable. It can take values of either 1 or 0, where 1 represents the 'Good' or 'Events' while 0 represents 'Bad' or 'Non-Events'.
valueOfGood
The value in Y that is used to represent 'Good' or the occurence of the event of interest. Defaults to 1.

Value

The WOE table with the respective weights of evidence for each group and the IV's.
  • CAT. The groups (levels) of the categorical X variable for which WOE is to be calculated.
  • GOODS. The total number of "Goods" or "Events" in respective group.
  • BADS. The total number of "Bads" or "Non-Events" in respective group.
  • TOTAL. The total number of observations in respective group.
  • PCT_G. The Percentage of 'Goods' or 'Events' accounted for by respective group.
  • PCT_B. The Percentage of 'Bads' or 'Non-Events' accounted for by respective group.
  • WOE. The computed weights of evidence(WOE) for respective group. The WOE values can be used in place of the actual group itself, thereby producing a 'continuous' alternative.
  • IV. The information value contributed by each group in the X. The sum of IVs is the total information value of the categorical X variable.

Details

For a given actual for a Binary Y variable and a categorical X variable stored as factor, the WOE table is generated with calculated WOE's and IV's

Examples

Run this code
data('SimData')
WOETable(X=SimData$X.Cat, Y=SimData$Y.Binary)

Run the code above in your browser using DataLab