This function computes the value of Cramer's V for a two-way table.
Usage
cramer(tbl)
Arguments
tbl
Two-way table, or matrix, of counts.
Value
Numeric value of Cramer's V, with name "X-squared".
Details
If X^2 is the usual chi-squared measure of association in a two-way table,
Cramer's V is sqrt (X^2 / (n * (k-1))), where n is the total number of
observations in the table, and k is min (nrow(table), ncol(table)).
References
Agresti, "Categorical Data Analysis," p. 75, where V^2 is used.