cramers_v: Cramer's V

Description Usage Arguments Examples

Description

Calculates Cramer's V for a given contingency table.

Usage

1
cramers_v(contingency_table)

Arguments

contingency_table

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.

## The function is currently defined as
function (contingency_table) 
{
    CV <- sqrt(chisq.test(contingency_table, correct = FALSE)$statistic/(sum(contingency_table) * 
        min(dim(contingency_table) - 1)))
    as.numeric(CV)
  }

andrewheiss/byumpa documentation built on May 10, 2019, 10:31 a.m.