07 · Eurostat economic indicators (WCE 2011)¶
Status: introduction only. The analysis of this notebook is not written yet; it waits for a decision on the data (see "What is missing" below).
This notebook is about the application in Lavado & Calapez, Quasi-Linear PCA: Low Order Spline's Approach to Non-Linear Principal Components
[lavado2011wce], World Congress on Engineering 2011, pp. 360–364. The same method is described at length in [lavado2011ijam] and in the thesis [lavado2012phd]
(notebooks 01–06).
The paper¶
The paper presents qlPCA as an approach that recovers the spline-based algorithm of CATPCA [meulman2004principal] but introduces continuous variables directly,
without a discretisation step. Section V is a deliberately modest illustration — the authors say it is "a convenient illustration of our approach rather than a substantive
economic application":
- Data: twelve economic indicators for 26 European countries, publicly available from Eurostat (Table I of the paper: trade balance in goods and in services, harmonised
consumer prices, unemployment rate, long-term government bond yields, GDP per capita in PPS, real GDP growth, expenditure on pensions, balance of payments,
motorisation rate, human resources in science and technology, public balance). The Eurostat codes are in
data/wce2011_eurostat_indicators.csv. - Methods compared: qlPCA (splines of degree 1 with one interior knot, no order restrictions), CATPCA (same splines, on variables discretised by the multiplying option) and ordinary PCA.
- Explained variance in two dimensions (Table II): qlPCA 58 %, CATPCA 64 %, PCA 54 %. The authors note that CATPCA does better than qlPCA and that qlPCA is "not intended to be a direct competitor of CATPCA but rather a different approach".
- Optimal transformations (Fig. 2): although no order restriction was imposed, all twelve transformations turn out monotonically increasing. This is what allows the loadings to be read on the original variables.
- Loadings (Table III) of the two-dimensional qlPCA solution, and the projection of the countries on the first two nonlinear components (Fig. 3). The paper's interpretation: high positive scores on the first component go with high long-term bond yields and low GDP per capita; high positive scores on the second with high unemployment and low balance of payments.
What this notebook will do¶
- Load the twelve indicators for the 26 countries and standardise them.
- Fit PCA and qlPCA (degree 1, one interior knot, two components) and compare the percentages of variance explained with Table II (the CATPCA figure comes from SPSS and cannot be recomputed here).
- Check that the optimal transformations are monotone (Fig. 2) and compare the loadings with Table III, aligning signs (a loading is defined up to sign, notebook 04).
- Plot the countries on the first two nonlinear components (Fig. 3), and add the monotone variant (
monotone=True), which makes the reading on the original variables exact rather than a property of the fitted splines.
What is missing — and why this cannot be an exact replication¶
- The data values are not printed in the paper, and neither is the reference year of the indicators (open question 4 in docs/SPEC.md §9). The numbers can only be re-created approximately from Eurostat, and some of the codes may have changed or been discontinued since 2011.
- The CATPCA result (64 %) was obtained with SPSS and is quoted, not recomputed.
- Therefore the targets will be qualitative (58 % vs 54 %, monotone transformations, the sign pattern of the loadings), as for the cylinder study in notebook 05 — in contrast with chapter 4 (notebook 06), which is an exact replication.
The numbers printed in the paper that will serve as targets are stored in tests/reference_values.json under wce2011.
References¶
lavado2011wce— N. Lavado & T. Calapez, Quasi-Linear PCA: Low Order Spline's Approach to Non-Linear Principal Components, Proceedings of the World Congress on Engineering 2011, vol. I, pp. 360–364.lavado2011ijam— N. Lavado & T. Calapez, Principal components analysis with spline optimal transformations for continuous data, IAENG Int. J. Applied Mathematics 41(4), 2011.lavado2012phd— N. Lavado, PhD thesis, ISCTE-IUL, 2012.meulman2004principal— Meulman, van der Kooij & Heiser, in Sage Handbook of Quantitative Methodology, 2004 (CATPCA).