cramers_v: Cramer's V

Description Usage Arguments Examples

View source: R/cramers_v.R

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 June 3, 2017, 5:11 p.m.