Skip to contents

C = sqrt(chi^2 / (chi^2 + n)). Also reports Cramer's V and the maximum attainable C = sqrt((min(r,c)-1)/min(r,c)).

Usage

morie_contingency_coefficient(x)

Arguments

x

A 2-D contingency table of counts.

Value

Named list: statistic (C), morie_cramers_v, chi2, p_value, df, max_C, n.

Examples

morie_contingency_coefficient(x = matrix(sample(1:5, 50, TRUE), 10, 5))
#> $statistic
#> [1] 0.3741096
#> 
#> $morie_cramers_v
#> [1] 0.2017015
#> 
#> $chi2
#> [1] 25.71196
#> 
#> $p_value
#> [1] 0.8982066
#> 
#> $df
#> [1] 36
#> 
#> $max_C
#> [1] 0.8944272
#> 
#> $n
#> [1] 158
#> 
#> $method
#> [1] "Pearson contingency coefficient"
#>