The function may be called by the names: g03ejc, nag_mv_cluster_hier_indicator or nag_mv_cluster_indicator.
Given a distance or dissimilarity matrix for objects, cluster analysis aims to group the objects into a number of more or less homogeneous groups or clusters. With agglomerative clustering methods (see g03ecc), a hierarchical tree is produced by starting with clusters each with a single object and then at each of stages, merging two clusters to form a larger cluster until all objects are in a single cluster. g03ejc takes the information from the tree and produces the clusters that exist at a given distance. This is equivalent to taking the dendrogram (see g03ehc) and drawing a line across at a given distance to produce clusters.
As an alternative to giving the distance at which clusters are required, you can specify the number of clusters required and g03ejc will compute the corresponding distance. However, it may not be possible to compute the number of clusters required due to ties in the distance matrix.
If there are clusters then the indicator variable will assign a value between 1 and to each object to indicate to which cluster it belongs. Object 1 always belongs to cluster 1.
Everitt B S (1974) Cluster Analysis Heinemann
Krzanowski W J (1990) Principles of Multivariate Analysis Oxford University Press
1: – IntegerInput
On entry: the number of objects, .
2: – const doubleInput
On entry: the clustering distances in increasing order as returned by g03ecc.
, for .
3: – const IntegerInput
On entry: the objects in the dendrogram order as returned by g03ecc.
4: – const doubleInput
On entry: the clustering distances corresponding to the order in iord.
5: – Integer *Input/Output
On entry: indicates if a specified number of clusters is required.
The accuracy will depend upon the accuracy of the distances in cd and dord (see g03ecc).
8Parallelism and Performance
g03ejc is not threaded in any implementation.
A fixed number of clusters can be found using the non-hierarchical method used in g03efc.
Data consisting of three variables on five objects are input. Euclidean squared distances are computed using g03eac and median clustering performed using g03ecc. A dendrogram is produced by g03ehc and printed. g03ejc finds two clusters and the results are printed.