In this article
- In the Analyst toolbox, expand the Advanced analytics folder, right-click on the Cluster Analysis folder and select Insert Cluster Analysis (inside) .
- Variables - this field will contain the variables that will be used in the cluster analysis. The field can contain one or more variables, and the variables must all be numeric. The supported question types are: Numeric, Numeric List answers, Single with numeric codes/scale and Grid elements with numeric scale. Drag and drop one or more questions from the Data Source toolbox to populate the field.
- Filter - this field may contain a filter to restrict the underlying dataset the cluster analysis is performed on. The field can contain only filters of type Filter Expression. Drag and drop a filter expression to populate the field. To review or edit the filter expression, click the "..." button.
- Number of clusters - is used to specify the number of clusters to calculate in the cluster analysis.
- Silhouette coefficient - controls whether a silhouette coefficient should be calculated for the cluster analysis. This coefficient is the average over all responses of the following measure calculated for each response:
- Minimum number of Cases - this field can be used to specify a minimum number of cases (data rows) required to run the multivariate calculation. The default value is 0, imposing no lower limit. If the number of available cases in the calculation is less than the specified limit, an error message will be displayed.
- Clustering algorithm - specifies which algorithm to base the clustering on. Two algorithms are available:
- K-means - this algorithm assigns responses into k clusters (the number of clusters specified) such that the sum of squares from responses to the computed cluster centers are minimized:
- For each response, move it to another cluster if that would lower the sum of squares from responses to the computed cluster centers.
- If a response is moved, immediately update the cluster centers of the two affected clusters.
- Repeat until no responses are moved, or the maximum number of iterations (1000) is reached.
- Hierarchical - in this algorithm, each response is initially assigned to its own singleton cluster. The analysis then proceeds iteratively, at each stage joining the two most “similar” clusters into a new cluster, continuing until the specified number of clusters is reached.
- Show PCA chart - controls whether a scatter plot of the two primary principal component scores is shown for the dataset used in the cluster analysis. Principal components are a way to reduce the dimensionality of the underlying dataset, while maintaining as much of the information (variance) as possible.
- Case selection - specifies how calculations are to be handled if the number of available cases (data rows) exceeds the system limit for maximum number of cases allowed in multivariate calculations. The limit is 10,000 data rows.
- Default - the last 10,000 of the available data rows will be used. This corresponds to the latest collected data.
- Random - a random subset containing 10,000 of the available data rows will be used.
- First - the first 10,000 of the available data rows will be used. This corresponds to the earliest collected data.
- Data selection - specifies which data values are to be used for categorical variables in the multivariate calculation. The options are:
- Codes - The variables' answer codes will be used. This requires the codes to be numerical.
- Scores - The variables' answer scores will be used. This requires the answer scores to be specified. Any answers with missing scores will be omitted by list-wise deletion in the calculation.
Figure 1 - Creating a new cluster analysis object
A new Cluster Analysis object is created in the folder and the Cluster Analysis designer page opens automatically .
Figure 2 - The Cluster Analysis designer page
The fields are as follows:
To adjust the Advanced Settings for the cluster analysis calculation, click Show advanced settings to reveal the following dialog .
Figure 3 - The Cluster Analysis Advanced Settings dialog
The properties are as follows:
(Y - X) / Max(X , Y)
Where
X is the Euclidean distance from the response to the centroid of the cluster which the response belongs to, and Y is the minimal Euclidean distance from the response to the centroid of every other cluster.
The silhouette coefficient has a range from -1 to 1, with -1 indicating a very poor clustering model, and 1 indicating a perfect clustering model. It is common to interpret coefficients > 0.5 to indicate a good clustering model, and coefficients < 0.2 to indicate that the clustering model is sub-par or that the data does not exhibit a cluster structure.
The clustering starts with an initial set of cluster centers.
The joining is based on a distance measure (Euclidian distance) as well as a linkage measure between clusters (Ward linkage function).