Skip to contents

Computation of association coefficients.

Usage

calc_association(
  x,
  y,
  type = c("chi-square", "contingency", "cramers-v", "fisher", "phi")
)

Arguments

x

A character vector

y

A character vector

type

A character single value, that is the type of the association to be computed

Value

A numeric single value with the computed value.

Details

Currently, it is possible to compute the following metrics:


- Contingency association coefficient
- Chi-square test statistic
- Cramer's V association coefficient
- Fisher test statistic
- Phi association coefficent

Examples


calc_association(mtcars$vs,mtcars$am)
#> Error in calc_association(mtcars$vs, mtcars$am): length(type) == 1 is not TRUE