powered by
Compute the Cramer's V, a descriptive statistic that measures the association between categorical variables.
cramer(x)
Data frame or matrix with a set of categorical variables.
A matrix with the Cramer's V between the categorical variables.
Any integer variable is internally converted to a factor.
Cram<U+00E9>r, H. Mathematical methods of statistics. Princeton: Princeton University Press, p. 575, 1946.
Everitt, B. S. The Cambridge dictionary of statistics. Cambridge: Cambridge University Press, p. 432, 2006.
assocstats
# NOT RUN { data <- read.csv("http://www.math.smith.edu/r/data/help.csv") data <- data[, c("female", "homeless", "racegrp")] str(data) test <- cramer(data) test # }
Run the code above in your browser using DataLab