Learn R Programming

vcd (version 1.3-2)

assocstats: Association Statistics

Description

Computes the Pearson chi-Squared test, the Likelihood Ratio chi-Squared test, the phi coefficient, the contingency coefficient and Cramer's V.

Usage

assocstats(x)

Arguments

x
an $r \times c$ table.

Value

  • A list with components:
  • chisq_testsa $2 \times 3$ table with the chi-squared statistics.
  • phiThe absolute value of the phi coefficient.
  • contThe contingency coefficient.
  • cramerCramer's V.

References

Michael Friendly (2000), Visualizing Categorical Data. SAS Institute, Cary, NC.

Fleiss, J. L. (1981). Statistical methods for rates and proportions (2nd ed). New York: Wiley

Examples

Run this code
data("Arthritis")
tab <- xtabs(~Improved + Treatment, data = Arthritis)
summary(assocstats(tab))

Run the code above in your browser using DataLab