cv_test: Cramer's V value between two categorical variables

Description Usage Arguments Value Author(s) Examples

View source: R/functions.R

Description

The function gives the pairwise Cramer's V value between two input categorical variables.

Usage

1
cv_test(base, var_1, var_2)

Arguments

base

input dataframe

var_1

categorical variable name, to be passed as string

var_2

categorical variable name, to be passed as string

Value

The function returns a dataframe with pairwise CV value.

Author(s)

Arya Poddar <aryapoddar290990@gmail.com>

Examples

1
2
3
4
5
data <- iris
data$Species <- as.character(data$Species)
data$Sepal.Length <- as.character(floor(data$Sepal.Length))
data$Y <- sample(0:1,size=nrow(data),replace=TRUE)
cv_result <- cv_test(base = data,var_1 = "Species",var_2 = "Sepal.Length")

Example output



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