cv_table: Pairwise Cramer's V among a list of categorical variables

Description Usage Arguments Value Author(s) Examples

View source: R/functions.R

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

1
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

1
2
3
4
5
6
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

Example output

         var_1   var_2  cv_value
1 Sepal.Length Species 0.5710458
NULL

scorecardModelUtils documentation built on May 2, 2019, 9:59 a.m.