1. Home
  2. DCLUSTERLABELS procedure

DCLUSTERLABELS procedure

Labels clusters in a single-page dendrogram plotted by DDENDROGRAM(R.W. Payne).

Options

WINDOW = scalar Window containing the dendrogram; default 1
UNITS = variate or text Names used for the units in the clusters supplied by CLUSTER
PEN = scalar Pen to use to plot the labels; default 1

Parameters

CLUSTER = variates or texts Specifies clusters to be labelled
LABEL = texts Specifies the label to be plotted where each cluster is formed
YSAVE = scalars
Saves the y-coordinate where each label is plotted
XSAVE = scalars
Saves the x-coordinate where each label is plotted

Description

DCLUSTERLABELS can be used to plot labels by the positions, where clusters are formed in a dendrogram previously plotted by DDENDROGRAM.

The WINDOW option specifies the window containing the dendrogram; default 1. The PEN option specifies the pen to use for the plot; default 1.

The clusters are specified by the CLUSTER parameter. By default, each one is specified in a variate containing the numbers of the units in that cluster. (These numbers are the row or column positions of those units in the similarity matrix used by HCLUSTER.) You can form clusters like these using the HFCLUSTERS procedure. Alternatively, you can use textual labels or other numbers to identify the contents of the clusters, by supplying these in a text or a variate using the UNITS option. The contents of UNITS must be in the same order as the rows and columns of the similarity matrix used by HCLUSTER.

The label for each cluster is specified, in a single-valued text, by the LABEL parameter. The YSAVE and XSAVE parameters can save the y- and x-coordinate where each label is plotted, in scalars. You might want to adjust these, and use them to plot the labels on a new dendrogram, if some of the clusters are formed too close together.

Options: WINDOW, UNITS, PEN.
Parameters: CLUSTER, LABEL, YSAVE, XSAVE.

See also

Directive: HCLUSTER.
Procedures: DDENDROGRAM, HFCLUSTERS, HPCLUSTERS.
Commands for: Multivariate and cluster analysis.

Example

CAPTION         'DCLUSTERLABELS example',\
                'Data from the Guide to Genstat, Part 2, Section 6.1.2.';\
                STYLE=meta,plain
TEXT            [VALUES=Estate,'Arna1.5','Alfa2.5',Mondialqc,Testarossa,\
                Croma,Panda,Regatta,Regattad,Uno,X19,Contach,Delta,Thema,\
                Y10,Spider] Cars
POINTER         [VALUES=CC,NCyl,Tank,Wt,Length,Width,Ht,WBase,TSpeed,StSt,\
                Carb,Drive] Vars
VARIATE         [NVALUES=Cars] Vars[]
READ            [PRINT=errors] Vars[]
 1490  4  50  966 414 161 133 245 177 10.9  1  2
 1409  4  50  845 399 162 139 242 174 10.2  1  2
 2492  6  49 1160 433 163 140 251 210  8.2  1  1
 3185  8  87 1430 458 179 126 265 249  7.4  2  1
 4942 12 120 1506 449 198 113 255 291  5.8  2  1
 1995  4  70 1180 450 176 143 266 209  7.8  2  2
  965  4  35  761 338 149 146 216 134 16.8  1  2
 1585  4  55  970 426 165 141 244 180 10.0  1  2
 1714  4  55  980 426 165 141 245 150 18.9  3  2
  999  4  42  720 364 155 143 236 145 16.2  1  2
 1498  4  48  912 397 157 118 220 171 11.0  1  1
 5167 12 120 1446 414 200 107 245 286  4.9  1  1
 1585  4  45 1000 389 162 138 247 195  8.2  1  2
 1995  4  70 1150 459 175 143 266 224  7.6  2  2
 1049  4  47  790 339 151 143 216 179 11.8  1  2
 1995  4  45 1050 414 162 125 228 190  9.0  2  1 :
SYMMETRICMATRIX [ROWS=Cars] CarSim
FSIMILARITY     [SIMILARITY=CarSim]\
                Vars[]; TEST=4(cityblock,euclidean),2(cityblock,simplematching)
HCLUSTER        [PRINT=*; METHOD=average] CarSim; AMALGAMATIONS=Am;\
                PERMUTATION=Perm
DDENDROGRAM     [STYLE=average; ORDERING=given; DSIMILARITY=yes] DATA=Am;\
                PERMUTATION=Perm; LABELS=Cars; WINDOW=3
DCLUSTERLABELS  [WINDOW=3; UNITS=Cars] !t(Panda,Uno,Y10),\
                !t(Testarossa,Contach), !t(Croma,Mondialqc,Thema),\
                !t('Alfa2.5',Spider,X19),!t('Arna1.5',Delta,Estate,Regatta);\
                LABEL='small','sports','large','sports','family'
Updated on September 11, 2019

Was this article helpful?