-1
$\begingroup$

I have a dataset of around 25 observations and most of them being categorical. I have three questions for this. 1- Do the covariates I pick for hierarchical clustering matter or should I try and include as many covariates as I can? 2- Is it possible to do hierarchical clustering for the whole data set, including the categorical data? 3- I want to reduce the levels on two covariates. My thought was to do hierarchical clustering for both of them using the same variables. I won't be using the results from one cluster in another. Would I run into any problems by doing this?

$\endgroup$
1
  • $\begingroup$ How many variables have you got and how many categories on each? One point is shown by the trivial case of 2 categorical variables each with 2 categories, in which case observations classify themselves into at most 4 groups. Conversely if even some variables have several categories, then the number of jointly defined categories possible far exceeds the number of observations. I have seen posts where there were say 4 binary variables, so no fancy method was needed beyond a table of which of the 16 possibilities occurred and how often. $\endgroup$
    – Nick Cox
    Commented Apr 17, 2019 at 17:37

1 Answer 1

1
$\begingroup$

HAC can run on any distance matrix (although some variants such as Ward assume it is Euclidean or squared Euclidean, so check the documentation!).

In particular, you can try a Gower distance matrix.

The main problems with categorical attributes are: weighting because the features usually are not all equally important and interpretation of the results. Sure, you got clusters. But are they better than "random"? You can get almost any result just by playing around with the parameters.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.