cv_table {scorecardModelUtils}R Documentation

Pairwise Cramer's V among a list of categorical variables

Description

The function gives a dataframe with pairwise Cramer's V value between all possible combination of categorical variables from the list of variables provided.

Usage

cv_table(base, column_name)

Arguments

base

input dataframe

column_name

column name or array of column names for which Cramer's V is to be calculated

Value

An object of class "cv_table" is a list containing the following components:

cv_val_tab

pairwise Cramer's V value as a dataframe

single_class_var_index

array of column index of variables with only one class

Author(s)

Arya Poddar <aryapoddar290990@gmail.com>

Examples

data <- iris
data$Species <- as.character(data$Species)
data$Sepal.Length <- as.character(floor(data$Sepal.Length))
cv_tab_list <- cv_table(data, c("Species", "Sepal.Length"))
cv_tab_list$cv_val_tab
cv_tab_list$single_class_var_index

[Package scorecardModelUtils version 0.0.1.0 Index]