smbinning.psi {smbinning}R Documentation

Population Stability Index

Description

Often models are developed using multiple periods in time for a number of reasons. For example, to avoid seasonality, to increase the size of the population, and some others. With a metrics like the Population Stability Index (PSI), users can check if there is a significant variation in the distribution of a certain feature by partition (usually time) using the first one as the reference.

Usage

smbinning.psi(df, y, x)

Arguments

df

Data frame.

y

Column name the indicates the different partitions.

x

Feature to be evaluated in terms of stability (It must be factor).

Value

Three crosstabs by feature and period that show the frequency (psicnt), percentage (psipct) and PSI (psimg), and a plot for the analyzed characteristic.

Examples

# Load library and its dataset
library(smbinning)

# Check stability for income
smbinning.psi(df=smbsimdf1,y="period",x="inc") 

[Package smbinning version 0.9 Index]