Learn R Programming

sjstats (version 0.2.0)

cramer: Cramer's V for a contingency table

Description

Compute Cramer's V for a table with more than 2x2 fields.

Usage

cramer(tab)

Arguments

tab
A table or ftable. Tables of class xtabs and other will be coerced to ftable objects.

Value

The table's Cramer's V.

See Also

phi

Examples

Run this code
tab <- table(sample(1:2, 30, TRUE), sample(1:3, 30, TRUE))
cramer(tab)

Run the code above in your browser using DataLab