Calculates Cramer's V for a table of nominal variables.
Usage
cramerV(x, y = NULL, digits = 4, bias.correct = FALSE)
Arguments
x
Either a two-way table or a two-way matrix.
Can also be a vector of observations for one dimension
of a two-way table.
y
If x is a vector, y is the vector of observations for
the second dimension of a two-way table.
digits
The number of significant digits in the output.
bias.correct
If TRUE, a bias correction is applied.
Value
A single statistic, Cramer's V.
Details
Cramer's V is used as a measure of association
between two nominal variables, or as an effect size
for a chi-square test of association. For a 2 x 2 table,
the absolute value of the phi statistic is the same as
Cramer's V.