augment_chisq_add_phi: Augment a chi-squared test and compute phi coefficients

View source: R/stat_cross.R

augment_chisq_add_phiR Documentation

Augment a chi-squared test and compute phi coefficients

Description

Augment a chi-squared test and compute phi coefficients

Usage

augment_chisq_add_phi(x)

Arguments

x

a chi-squared test as returned by stats::chisq.test()

Details

Phi coefficients are a measurement of the degree of association between two binary variables.

  • A value between -1.0 to -0.7 indicates a strong negative association.

  • A value between -0.7 to -0.3 indicates a weak negative association.

  • A value between -0.3 to +0.3 indicates a little or no association.

  • A value between +0.3 to +0.7 indicates a weak positive association.

  • A value between +0.7 to +1.0 indicates a strong positive association.

Value

A tibble.

See Also

stat_cross(), GDAtools::phi.table() or psych::phi()

Examples

tab <- xtabs(Freq ~ Sex + Class, data = as.data.frame(Titanic))
augment_chisq_add_phi(chisq.test(tab))

ggstats documentation built on June 22, 2024, 12:21 p.m.