Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

iv

Information value of an independent variable in predicting a binary response


Description

Takes in independent and dependent variable and returns IV value

Usage

iv(x, y)

Arguments

x

an independent variable

y

a binary response variable

Details

Information value of a variable is a significant indicator of its relevance in the prediction of a binary response variable. iv computes that value using the formula, IV = summation[(Responders - Non-responders)*ln(Responders / Non-responders) for each bin].

Ten bins are created for continous variables while categories itself are used as bins for categorical independent variables.

Value

information value of x

Author(s)

Akash Jain

See Also

Examples

# A 'data.frame'
df <- data.frame(x = c('a', 'a', 'a', 'b', 'b', 'b'),
                 y = c(0, 1, 0, 1, 0, 1))

# Information value
IV <- iv(x = df[, 'x'], y = df[, 'y'])

StatMeasures

Easy Data Manipulation, Data Quality and Statistical Checks

v1.0
GPL-2
Authors
Akash Jain
Initial release
2015-03-24

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.