cramer function

Cramer's association coefficient

Cramer's association coefficient

Computes the Cramer's association coefficient between 2 nominal variables.

cramer(x, y)

Arguments

  • x: a contingency table ('matrix' or 'table' object). x and y can also both be factors.
  • y: ignored if x is a contingency table. If not, y should be a vector of the same length.

Author(s)

Maxime HERVE maxime.herve@univ-rennes1.fr

Examples

var1 <- sample(LETTERS[1:3],30,replace=TRUE) var2 <- sample(letters[1:3],30,replace=TRUE) cramer(var1,var2) # or cramer(table(var1,var2))
  • Maintainer: Maxime HERVE
  • License: GPL-2
  • Last published: 2023-11-06

Useful links