Learn R Programming

JWileymisc (version 1.2.0)

cramerV: Calculate Phi or Cramer's V effect size

Description

Simple function to calculate effect sizes for frequency tables.

Usage

cramerV(x)

Arguments

x

A frequency table, such as from xtabs().

Value

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

Examples

Run this code
# NOT RUN {
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