Library: | xclust |
See also: | kmcont adaptive distance agglom kmeans |
Quantlet: | wardcont | |
Description: | performes Ward's hierarchical cluster analysis of the data of the rows and the columns of a contingency table including the multivariate graphic using the correspondence analysis; makes the factorial coordinates of the points in a row and in a column available |
Usage: | cw = wardcont (x, k, l) | |
Input: | ||
x | n x p matrix, n points of p rows to be clustered (the elements must be >= 0, with positive marginal sums) | |
k | scalar, the maximum number of clusters of rows | |
l | scalar, the maximum number of clusters of columns | |
Output: | ||
cw.y | n x l matrix, correspondence analysis scores of the points in a row (l = min(n-1,p-1) | |
cw.z | p x l matrix, correspondence analysis scores of the points in a column | |
cw.r | n x 1 matrix, Partition of n points into k clusters | |
cw.c | p x 1 matrix, Partition of p points into l clusters |
; load the library xclust library("xclust") ; generate a data set x = #(4, 4, 25, 18, 10)~#(2, 3, 10, 24, 6)~#(3, 7, 12, 33, 7)~#(2, 4, 4, 13, 2) ; apply the ward method cw = wardcont(x, 3, 4)
produces three displays with the ward analysis for the rows, for the columns and for both.