Assocs | R Documentation |
Collects a number of association measures for nominal and ordinal data.
Assocs(x, conf.level = 0.95, verbose = NULL)
## S3 method for class 'Assocs'
print(x, digits = 4, ...)
x |
a 2 dimensional contingency table or a matrix. |
conf.level |
confidence level of the interval. If set to |
verbose |
integer out of |
digits |
integer which determines the number of digits used in formatting the measures of association. |
... |
further arguments to be passed to or from methods. |
This function wraps the association measures phi, contingency coefficient, Cramer's V, Goodman Kruskal's Gamma, Kendall's Tau-b, Stuart's Tau-c, Somers' Delta, Pearson and Spearman correlation, Guttman's Lambda, Theil's Uncertainty Coefficient and the mutual information.
numeric matrix, dimension [1:17, 1:3]
the first column contains the estimate, the second the lower confidence interval, the third the upper one.
Andri Signorell <andri@signorell.net>
Phi
, ContCoef
, CramerV
, GoodmanKruskalGamma
, KendallTauB
, StuartTauC
,
SomersDelta
, SpearmanRho
, Lambda
, UncertCoef
, MutInf
options(scipen=8)
# Example taken from: SAS/STAT(R) 9.2 User's Guide, Second Edition, The FREQ Procedure
# http://support.sas.com/documentation/cdl/en/statugfreq/63124/PDF/default/statugfreq.pdf
# Hair-Eye-Color pp. 1816
tob <- as.table(matrix(c(
69, 28, 68, 51, 6,
69, 38, 55, 37, 0,
90, 47, 94, 94, 16
), nrow=3, byrow=TRUE,
dimnames=list(eye=c("blue","green","brown"),
hair=c("fair","red","medium","dark","black")) ))
Desc(tob)
Assocs(tob)
# Example taken from: http://www.math.wpi.edu/saspdf/stat/chap28.pdf
# pp. 1349
pain <- as.table(matrix(c(
26, 6,
26, 7,
23, 9,
18, 14,
9, 23
), ncol=2, byrow=TRUE))
Desc(pain)
Assocs(pain)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.