Learn R Programming

RVAideMemoire (version 0.9-79)

cramer: Cramer's association coefficient

Description

Computes the Cram<e9>r's association coefficient between 2 nominal variables.

Usage

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.

Examples

Run this code
# NOT RUN {
var1 <- sample(LETTERS[1:3],30,replace=TRUE)
var2 <- sample(letters[1:3],30,replace=TRUE)
cramer(var1,var2)
# or cramer(table(var1,var2))
# }

Run the code above in your browser using DataLab