vcd (version 0.9-0)

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 phi coefficient.
  • contThe contingency coefficient.
  • cramerCramer's V.

References

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

Examples

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

Run the code above in your browser using DataLab