psi_vector: Function to calculate the vector psi given 2 vector of counts

View source: R/psi.R

psi_vectorR Documentation

Function to calculate the vector psi given 2 vector of counts

Description

Function to calculate the vector psi given 2 vector of counts

Usage

psi_vector(old, new)

Arguments

old

A vector of original count distribution

new

A vector with the new count distribution

Value

A vector with psi index (value) a label and the table for with counts, percents, woe.

Examples


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))


jbkunst/risk3r documentation built on March 19, 2024, 10:49 p.m.