Computes the Theil's U statistic between two categorical variables in data.frame.

theil(dfm, x, y)

Arguments

dfm

data.frame. probability distributions.

x

character. name of categorical or discrete variable.

y

character. name of another categorical or discrete variable.

Value

data.frame. It has the following variables.:

  • var1 : character. first variable name.

  • var2 : character. second variable name.

  • coef_corr : numeric. Theil's U statistic.

See also

Examples

theil(mtcars, "gear", "carb")
#>   var1 var2 coef_corr
#> 1 gear carb 0.1891886