CLUSTER directive
Forms a non-hierarchical classification.
Options
Parameters
Description
Printed output from CLUSTER directive is controlled by the PRINT option. This has the following possible settings.
The DATA option supplies the data to be classified: the single structure must be either a matrix, with rows corresponding to the units and columns to the variables, or a pointer whose values are the identifiers of the variates in the data matrix. Note that CLUSTER always operates on a matrix, and so will copy the variate values into a matrix if you supply a pointer as input; thus for large data sets it is better to supply a matrix.
The CRITERION option specifies which criterion CLUSTER is to optimize, the default being sums. The four settings are:
The INTERCHANGE option specifies which types of interchange (transfers or swops) are to be used. The default is transfer, which is taken to imply that both transfers and swops are used, since a swop is simply two transfers. If you set INTERCHANGE=swop, only swops are used. If INTERCHANGE=* the algorithm does not attempt to improve the classification from the initial classification; you might want this, in conjunction with the PRINT=initial setting, to display the results for an existing classification which you do not wish to improve.
The START option should be used to supply a factor to define the initial classification. If START is not specified, CLUSTER will divide the units, in order, into roughly equal-sized groups. For example, with 97 units to be classified into 10 groups, the first 10 units will be put into the first group, the 11th to 20th into the second group, and so on; the last three groups will contain only nine units each. Procedure CLASSIFY provides another way of forming an initial classification for k classes. It finds the k units that are furthest apart in the multi-dimensional space defined by the data variates. These are then used as the nuclei for the classes, with each remaining unit being allocated to the class containing the nearest nucleus.
The first parameter, NGROUPS, is used to specify the number of classes to be formed. Any single-valued structure can be supplied here. Often you would want several classifications from a single data set, into different numbers of groups. In this case the NGROUPS parameter should be a list of the numbers of groups in descending order. For the initial classification of the second classification, CLUSTER takes the optimal classification from the first number of groups, and does some reallocation of units to make a smaller number of groups. This is repeated, as often as required, to provide initial classifications for all the later analyses; hence the need to specify the numbers in descending order. The GROUPS parameter is used to specify a list of identifiers of factors to save the optimal classifications. The CRITERIONVALUE parameter can specify a list scalars to saves the criterion values for each number of groups, and the subsidiary criterion values can be saved (also in scalars) using the BCRITERIONVALUE parameter. The MEANS parameter can save a matrix containing the means of the variates within the groups of each classification, and the PREDICTORS parameter can matrixes containing the group predictors from maximal predictive classifications.
Options: PRINT, DATA, CRITERION, INTERCHANGE, START.
Parameters: NGROUPS, GROUPS, CRITERIONVALUE, BCRITERIONVALUE, MEANS, PREDICTORS.
Action with
RESTRICT
Any restrictions, for example on variates in a DATA pointer, are ignored.