psi_vector | R Documentation |
Function to calculate the vector psi given 2 vector of counts
psi_vector(old, new)
old |
A vector of original count distribution |
new |
A vector with the new count distribution |
A vector with psi index (value) a label and the table for with counts, percents, woe.
o <- sample(letters[1:5], size = 9000, prob = 1:5, replace = TRUE)
n <- sample(letters[1:5], size = 1000, prob = 1:5 + 4, replace = TRUE)
table(o)
table(n)
psi_vector(
table(o),
table(n)
)
p <- psi_vector(
table(o),
table(n)
)
p
sum(p)
psi_label(sum(p))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.