If you don’t mind alcohol, this example suggests some drinks might be better than others... The following table summarises the drinking habits of a handful of countries, along with key health indicators.
Kudos: This analysis is adapted from an example given at
Using the PCA pack, we can easily compute the first two Principal Components and represent this dataset along them:
Drinking Habits along first two Principal Components
5
Not synced yet
There is clearly an outlier, but let’s interpret the Principal Components first:
Drinking Habits: Loadings for PC1
7
Not synced yet
Quite predictably, life expectancy and heart disease rate are negatively correlated. Thus when moving from right to left on the map above, life expectancy increases and heart disease rate decreases.
More surprising is the positive correlation between between life expectancy and wine consumption for these countries: the more you drink wine, the more you’re expected to live! (Full disclosure: I’m French). On the other hand, there’s a positive correlation between heart diseases and spirits consumption.
Drinking Habits: Loadings for PC2
7
Not synced yet
These loadings show a negative correlation between beer on one side, and wine & spirits on the other. Put differently, countries of our dataset can be distinguished by their preference between beer and drinks with a higher percentage of alcohol (wine or spirits).
These loadings explain the vertical dispersion of the countries in the map above: from top to bottom, consumption of beer decreases while consumption of higher-alcohol beverages increases.
🍷 or 🍺, anyone?
These explanations are to be taken carefully, thought: the first principal component explains only
46.03%
of our data, while the use of two components explains
78.14%
Beside this caveat, life expectancy and/or heart disease rates depend of course on many more variables which are not part of our dataset, such as access to health care, etc.
🧭 Now you’re well equipped to use PCA and create a ranking or map for your multidimensional data. Knowing you have the best visual representation will greatly simplify your decision-making!
👉 To use Principal Component Analysis in your own docs, see