# How to select the best number of clusters in cluster analysis in SPSS?

When I used SAS for cluster analysis, I used to use some plots of CCC, pseudo F and pseudo T^2 indices to help determine best the number of clusters. Not sure about this in SPSS, not familiar with SPSS.

in SPSS, there is a TwoStep clustering, which can help determine the number of clusters (it first performs a hierarchical method to define the number of clusters). Are there other better methods or indicators of number of clusters in SPSS?

• Most often, internal clustering criterions (some of which you mentioned) are used to compare cluster solutions with different number of clusters K, in order to select the "best" K. SPSS has no in-built computation of such indices along with its clustering routines (with the exception of automatic K-selection in TwoStep clustering and computation of Silhouette index there). – ttnphns Jun 29 '16 at 22:13
• (cont.) However, users have written macros or scripts for SPSS which do the job. My collection of some clustering criterions is perhaps the richest so far for SPSS. The link to my page is in my profile. – ttnphns Jun 29 '16 at 22:13
• If you are willing to try out other free tools, in R there's a package called NbClust it uses 30 different popular criteria for optimal cluster size including CCC. And if your data is too big, I wrote a custom function that does not calculate the distance matrix so it is scalable stats.stackexchange.com/questions/212293/… – candles_and_oranges Jun 30 '16 at 2:22
• The STATS CLUS SIL extension command will give you silhouette plots for the clusters from twostep or other clustering procedures, which helps in deciding on the number. – JKP Jun 30 '16 at 12:47