| assocstats | R Documentation | 
Computes the Pearson chi-Squared test, the Likelihood Ratio chi-Squared test, the phi coefficient, the contingency coefficient and Cramer's V for possibly stratified contingency tables.
assocstats(x)
x | 
 a contingency table, with possibly more than 2 dimensions. In this case, all dimensions except the first two ones are considered as strata.  | 
In case of a 2-dimensional table, a list with components:
chisq_tests | 
 a   | 
phi | 
 The absolute value of the phi coefficient (only
defined for   | 
cont | 
 The contingency coefficient.  | 
cramer | 
 Cramer's V.  | 
In case of higher-dimensional tables, a list of the above mentioned structure, each list component representing one stratum defined by the combinations of all levels of the stratum dimensions.
David Meyer David.Meyer@R-project.org
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
data("Arthritis")
tab <- xtabs(~Improved + Treatment, data = Arthritis)
summary(assocstats(tab))
assocstats(UCBAdmissions)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.