1
$\begingroup$

I'm fairly new to statistical learning. At the moment, I'm using the EU-SILC dataset to analyse the factors that determine the French income (x). It can be found here: https://ec.europa.eu/eurostat/web/microdata/statistics-on-income-and-living-conditions. I'm working with following variables

enter image description here

As you can see, all variables are treated as numerical (num) in RStudio, but most of them (exluding x) (in not all???) take on different values that correspond to categories (ex. Gender: 1 = Male, 2 = Female).

I would like to gain more insight into the data, by performing unsupervised methods like PCA and clustering (K-means/hierarchical). However, I know that for example PCA is developed for continuous variables. The current dataset views all variables as numerical, so doing PCA would yield results, but I'm not sure if these results would be accurate/interpretable, since the variables are categorical in nature.

How should I approach this problem?

  • Should I simply do PCA/clustering on the given dataset, or

  • convert the variables to categories (as.factor), but then, how can I perform an unsupervised method?

I feel like I can first perform PCA (depending on what the answer to the above question will be) and then cluster the observations using PC scores. The clustering, however, is also rather difficult:

  • if I keep the numerical interpretation of all variables, which metric should I use? Does the Euclidean metric have any meaning, when using categorical labels (even though they're considered as numerals here)?

  • if it turns out that converting to categorical is better, which metric could I use in the case of hierarchical clustering? Is it possible to use the K-means algorithm in this case?

Thanks in advance.

$\endgroup$
2
  • $\begingroup$ PCA for categorical unordered (nominal) variables is known as (Multiple) Correspondence Analysis. More general Categorical PCA (CatPCA) allows for a mixture of data of different type. These are not very simple procedures. If you are new to multivariate data analysis you probably should postpone storming them untill you are very well experienced with classic PCA which is for scale (numeric/continuous) data. $\endgroup$
    – ttnphns
    Commented Apr 25, 2020 at 20:00
  • $\begingroup$ Hierarchical clustering is not as difficult. With Gower measure, it can take in variables of different type. stats.stackexchange.com/q/15287/3277 $\endgroup$
    – ttnphns
    Commented Apr 25, 2020 at 20:03

0

Your Answer

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