Keywords - Function groups - @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Library: stats
See also: discrete table2 tableN

Quantlet: crosstable
Description: computes pairwise crosstables from all columns of a data matrix, gives the result of a Chi-square independence test and computes contingency coefficients.

Usage: cross=crosstable(x{,xvars})
Input:
x n x p matrix, the columns correspond to the variables.
xvars optional, p x 1 string vector, variable names.
Output:
cross string output, containing all crosstables of each combinations of columns of x, the result of the Chi-square independence tests and contingency coefficients.

Example:
library("stats")
randomize(970701)
x = ceil(normal(100,2)) ; rounded independent random numbers
crosstable(x)

Result:
the crosstable of the columns of x. The significance level
of the Chi-square independence test should NOT indicate
rejection.



Author: T. Kleinow, M. Mueller, S. Klinke, 19970718
(C) MD*TECH Method and Data Technologies, 05.02.2006