| 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. | |
library("stats")
randomize(970701)
x = ceil(normal(100,2)) ; rounded independent random numbers
crosstable(x)
the crosstable of the columns of x. The significance level of the Chi-square independence test should NOT indicate rejection.
| Library: | stats |
| See also: | discrete table2 tablen |