char_cor_vars: Cramer's V matrix between categorical variables.

Description Usage Arguments Value Examples

View source: R/essential_algorithms.R

Description

char_cor_vars is function for calculating Cramer's V matrix between categorical variables. char_cor is function for calculating the correlation coefficient between variables by cremers 'V

Usage

1
2
3
char_cor_vars(dat, x)

char_cor(dat, x_list = NULL, ex_cols = "date$", parallel = FALSE, note = FALSE)

Arguments

dat

A data frame.

x

The name of variable to process.

x_list

Names of independent variables.

ex_cols

A list of excluded variables. Regular expressions can also be used to match variable names. Default is NULL.

parallel

Logical, parallel computing. Default is FALSE.

note

Logical. Outputs info. Default is TRUE.

Value

A list contains correlation index of x with other variables in dat.

Examples

1
2
3
4
5
6
7
## Not run: 
char_x_list = get_names(dat = UCICreditCard,
types = c('factor', 'character'),
ex_cols = "ID$|date$|default.payment.next.month$", get_ex = FALSE)
 char_cor(dat = UCICreditCard[char_x_list])

## End(Not run)

Example output

Package 'creditmodel' version 1.2.7
                 SEX  EDUCATION   MARRIAGE
SEX       1.00000000 0.03204264 0.03317131
EDUCATION 0.03204264 1.00000000 0.11487308
MARRIAGE  0.03317131 0.11487308 1.00000000

creditmodel documentation built on Jan. 7, 2022, 5:06 p.m.