# Hierarchical clustering with categorical variables

Can categorical variables be used in hierarchical clustering? I have heard only continuous variables are used, but have seen people discussing categorical variables may / may not be used as well. Can anyone provide insight?

• Yes of course, categorical data are frequently a subject of cluster analysis, especially hierarchical. A lot of proximity measures exist for binary variables (including dummy sets which are the litter of categorical variables); also entropy measures. Clusters of cases will be the frequent combinations of attributes, and various measures give their specific spice for the frequency reckoning. One problem with clustering categorical data is stability of solutions. And this recent question puts forward the issue of variable correlation. – ttnphns Jun 22 '16 at 21:22
• Search this site for hierarchical clustering categorical to read related threads. – ttnphns Jun 22 '16 at 21:44
• Possible duplicate of Clustering of mixed type data with R – kjetil b halvorsen Oct 30 '18 at 17:31
• I don't think this is a duplicate, exactly. The linked question is about R, and might even be off-topic now. This question is about statistics and doesn't mention a software package. – Peter Flom Oct 31 '18 at 11:57
• @ttnphns: do you want to post your comment(s) as an answer? Better to have a short answer than no answer at all. Anyone who has a better answer can post it. – Stephan Kolassa Apr 27 '19 at 20:53