Learn R Programming

JWileymisc (version 1.4.1)

cramerV: Calculate Phi or Cramer's V effect size

Description

Simple function to calculate effect sizes for frequency tables.

Usage

cramerV(x)

Value

A numeric value with Phi for 2 x 2 tables or Cramer's V for tables larger than 2 x 2.

Arguments

x

A frequency table, such as from xtabs().

Examples

Run this code
cramerV(xtabs(~ am + vs, data = mtcars))
cramerV(xtabs(~ cyl + vs, data = mtcars))
cramerV(xtabs(~ cyl + am, data = mtcars))

Run the code above in your browser using DataLab