Library: | stats |
See also: | relation relationchi2 relationcont relationrank relationcorr |
Quantlet: | relationcorrcont | |
Description: | Computes the corrected contingency coefficient for discrete data. |
Usage: | rel = relationcorrcont (x {, colname {, opt}}) | |
Input: | ||
x | n x p variables | |
colname | n x p variable names | |
opt | q x 1 text vector of optional parameters | |
Output: | ||
rel.r | p x p matrix of corrected contingency coefficients | |
rel.pval | p x p significance level of chi^2 statistics |
; loads the library stats library("stats") ; read swiss banknote data ; actually these data are continuous, but the first ; three variables have approx. 20 realizations x = read("bank2") x = x[,1:3] ; compute the corrected contingency coefficients and the ; pvalues of the chi^2 statistic automatically colname = string("X%0.f", 1:cols(x)) relationcorrcont(x, colname, "automatic")
Contents of rel.r [1,] 1 0.81833 0.85195 [2,] 0.81833 1 0.86405 [3,] 0.85195 0.86405 1 Contents of rel.pval [1,] 0 0.20152 0.0024184 [2,] 0.20152 0 3.8681e-11 [3,] 0.0024184 3.8681e-11 0