Pearson contingency coefficient C (Gibbons Ch 14.2.1)
Source:R/cntgc.R
morie_contingency_coefficient.RdC = sqrt(chi^2 / (chi^2 + n)). Also reports Cramer's V and the maximum attainable C = sqrt((min(r,c)-1)/min(r,c)).
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"
#>