cramer {treeClust} | R Documentation |
Compute Cramer's V for a two-way table
Description
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. |
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)).
Value
Numeric value of Cramer's V, with name "X-squared".
Author(s)
Sam Buttrey
References
Agresti, "Categorical Data Analysis," p. 75, where V^2 is used.
[Package treeClust version 1.1-7 Index]