Learn R Programming

sjstats (version 0.2.0)

phi: Phi value for contingency tables

Description

Compute Phi value for a contingency table.

Usage

phi(tab)

Arguments

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

Value

The table's Phi value.

See Also

cramer

Examples

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

Run the code above in your browser using DataLab