Happiness ranking for OECD member countries
Are you familiar with the World Happiness Report? Each year, subjects in each country are asked to rate their own happiness on a scale of 0 to 10, and the results are reported in an annual report.
The latest 2022 report can be found at the link below.
World Happiness Report 2022
In this three-part series, we will analyze the happiness levels of each country. Happiness and various items that contribute to it can be obtained as data for each country. The discovery of countries and their factor analysis, etc., is a method of multivariate analysis. principal component analysis "and" cluster analysis ” to find out.
In this Part 1, We will visualize the happiness level in each country, consider the factors that contribute to the happiness level by principal component analysis as multivariate data, calculate the principal component loadings of items and the principal component scores of each country, and examine their relationships. .
The report provides happiness rankings for 146 countries. Organization for Economic Co-operation and Development ), excluding Turkey, whose happiness ranking is lower than other countries, 37 countries are targeted. Countries that are members of the OECD can be said to be economically developed countries, so please consider analyzing developed countries as the target.
First, we show the happiness level of the target country (the higher the value, the happier) on a world map. According to the report, it seems to be the average happiness level in the three-year survey from 2019 to 2021 (However, Luxembourg is the happiness level for 2019 only.)

The above report shows a bar chart of descending happiness levels like this: Here, we list the happiness rank and country name among the target 146 countries. (For example, "31.Italy" indicates that Italy is ranked 31st in happiness.)
European countries dominate the rankings. On the other hand, Japan's ranking is 54 It is low among the ranks and developed countries.

This bar chart consists of the following six items that contribute to happiness and residual items that cannot be explained by them.
GDP per capita : GDP per capita
Social Support : Adequacy of social support
Healthy life expectancy : healthy life expectancy
Freedom to make life choices : freedom of life choices
Generosity: Tolerance towards other companies
Perceptions of corruption : Trust in the country
According to the report, regression analysis was performed with happiness as the objective variable and the above six items as the explanatory variables, and the contribution of each explanatory variable was obtained from the obtained model formula. It is stated that these six explanatory variables can explain about 75% of the adjusted contribution rate of the regression model, that is, three-quarters (3/4) of the happiness level.
Happiness that cannot be explained by these six items is considered to be the so-called residual. for that reason,
Residential : Happiness that cannot be explained by the above items (explanatory variables)
I will assume that
principal component analysis
Below is a report (Summary Plots) of principal component analysis of 7 items (continuous variables) including the above items contributing to happiness and residuals for the 37 countries analyzed. The graph on the right side of the report is the loading plot, and the middle graph is the score plot.
summary report

loading plot
It plots the correlation between each principal component and the variable. A plot of the variables allows you to read out the overall correlation of the variables.
In this example, we can see that "GDP" and "Perceptions of corruption" are highly correlated, and that "Social Support", "Freedom to make life choices", and "Generosity" are highly correlated. increase. Also, since there are no variables located near ``Healthy life expectancy'' or ``Residual'', we can see that the correlation with other variables is not very high. It is helpful to consider this in conjunction with the Scatterplot Matrix report below.
scatterplot matrix

score plot
It plots the values obtained by substituting the values of each variable into the obtained linear combination formula of the principal components. You can characterize each sample ("Country" in this example). Samples plotted close to each other on the score plot have similar properties, so it is used for sample grouping purposes.
Also, here the plot points are colored with happiness scores. (Blue ⇒ Green ⇒ Red) The countries on the right side of the graph have high happiness scores, and the countries on the left side have low happiness scores.
Interpretation of principal component axes
Usually, we look at the loading plot and the score plot to interpret what each principal component axis means.
At that time, the loading plot and the score plot were superimposed biplot It may be easier to interpret by referring to .
biplot

The first principal component on the horizontal axis is Happiness score (higher values in the positive direction indicate higher happiness) You can think of it. Plot points (countries) are colored by their happiness score, so you can see that happiness scores are higher on the right side of the graph and lower on the left side. This axis explains 44.9% of the variation in the data.
The second principal component, the vertical axis, is difficult to interpret. The healthy life expectancy and the residual are located in opposite directions to the origin, but since it is difficult to interpret the residual, we interpret it as indicating the height of the healthy life expectancy. Countries located at the bottom of the graph (Japan and South Korea) have a strong relationship with healthy life expectancy (high levels of happiness attributed to healthy life expectancy). This axis explains 17.9% of the variation in the data.
Principal component analysis is a technique for explaining multivariate data with a small number of components. In this example, we reduced the 7-dimensional data to 2 dimensions, which explains 62.9% of the variation in the data.
Readers should also check their own country's position in the biplot and try to interpret the results.
In the next Part 2, why are the countries located outside the probability ellipse in the score plot (Japan, South Korea, and Mexico) off? Let's consider using JMP's wonderful features.
Supplement: Guideline for determining the number of principal components
From the eigenvalues report below, we can see that the first two components explain approximately 62.9% of the variation. The scree plot is a guideline for determining the number of principal components. Here, we will consider the first two components (1st principal component, 2nd principal component), with the eigenvalue of 1 or more as a guideline.
(*Actually, the third principal component has a high contribution to the residual item, so it is difficult to interpret the results.)
