Thesis replication¶
Chapter-by-chapter replication of Lavado (2012), Extensões via splines da Análise em Componentes Principais (PhD thesis, ISCTE-IUL, http://hdl.handle.net/10071/6202). The original MATLAB files were lost; the listings printed in the thesis were transcribed and the package was tested against them. The notebooks are shown as they are stored in the repository, already executed; the site does not re-execute them.
| notebook | source | content |
|---|---|---|
| 01 Spline transformations | thesis §1.1 | B-, M- and I-splines, knots, pseudo-indicator matrix; thesis Fig. 1.1 |
| 02 PCA as loss minimisation | thesis §1.2–1.3 | the common loss function; PCA, MCA and qlPCA as spline classes |
| 03 From CATPCA to qlPCA | thesis ch. 2 | HOMALS and CATPCA in brief; discretisation of continuous variables (Table 2.2) |
| 04 The qlPCA algorithm | thesis §3.1–3.2 | corrected pseudo-code, legacy vs default, properties; Figs 3.1, 3.2 |
| 05 The cylinder problem | thesis §3.3 | simulation study; Table 3.3, Figs 3.4–3.7 (qualitative) |
| 06 Science & technology: gender differences | thesis ch. 4 | the application; Tables 4.1–4.8, Figs 4.1–4.10 (exact) |
| 07 Eurostat economic indicators | WCE 2011 | introduction only (the data values and reference year are not in the paper) |
Results compared with the thesis¶
The table of the repository README, included as it is.
Chapter 4 is an exact replication (legacy=True). The tolerance for the qlPCA tables is 0.005,
the rounding of the printed two-decimal values.
| thesis | quantity | thesis | this repository | |
|---|---|---|---|---|
| Table 4.1 | summary statistics of the 11 variables | — | max. difference 0.02 | the thesis prints the mean of m_top as 19.4 (data: 19.42) |
| Table 4.3 | PCA eigenvalues | 4.276, 2.531, 1.878, … | 4.276, 2.532, 1.878, … | max. difference 0.0006 |
| Table 4.4 | PCA loadings (absolute values) | — | max. difference 0.005 | |
| Table 4.5 | qlPCA, 1 knot: eigenvalues, % VAF | 4.582, 2.998; 68.90 % | 4.582, 2.998; 68.90 % | |
| Table 4.5 | qlPCA, 2 knots: eigenvalues, % VAF | 4.760, 3.637; 76.33 % | 4.759, 3.637; 76.33 % | |
| Table 4.6 | qlPCA loadings (absolute values) | — | max. difference 0.005 | signs are a convention (see below) |
| Tables 4.7, 4.8 | communalities | — | max. difference 0.005, 0.003 | |
| p. 100 | PCA communality of mf_funds |
0.0244 | 0.0252 | the thesis value comes from the rounded loadings of Table 4.4 |
| Fig. 4.5 | 2 knots, 3 components | scree plot only | 90.00 % (legacy, thesis column order) or 90.30 % | local optima; the result depends on the start, both are reported |
| Fig. 1.1 | \(I_1(0.58)\), \(I_2(0.58)\), \(f(0.58)\) | 1, 0.29, 1.37 | 1, 0.29, 1.37 | |
| Table 2.2 | discretisation by multiplying | — | identical | with the population standard deviation |
Qualitative comparisons, where the thesis data cannot be recovered:
| thesis | quantity | thesis | this repository |
|---|---|---|---|
| Table 3.3 | cylinder problem, % variance in 2 dimensions, PCA / qlPCA 2 knots / qlPCA 3 knots | no noise 82.15 / 97.77 / 98.43; noise 10 % 80.18 / 96.90 / 97.68; noise 25 % 72.62 / 92.59 / 94.41 | means of 50 simulated data sets: 82.67 / 98.14 / 98.80; 80.95 / 96.95 / 97.79; 73.47 / 92.57 / 93.92 (thesis values inside the simulated range in every cell) |
| Fig. 3.4 | PCA scree plot, noise 25 % | two breaks (3rd and 6th component) | one clear break in the simulated draw: not reproduced |
Not reproduced
| source | what | why |
|---|---|---|
| thesis pp. 52–53 | illustrative pseudo-indicator matrices | the printed code gives different values; probably other boundary knots (open question) |
| thesis §2.2.2, ch. 4; WCE Table II | CATPCA results | computed with SPSS |
| WCE 2011, §V | Eurostat example (58 % / 64 % / 54 %) | data values and reference year not printed in the paper; notebook 07 is an introduction only |
Signs. A loading is defined up to sign per component and — for a non-monotone transformation — also
per variable. The package orients each transformed variable so that \(\mathrm{corr}(f_j, h_j) \ge 0\) and each
component so that its largest loading is positive (the convention of MATLAB's biplot). Comparisons with the
thesis are made in absolute value or after aligning signs. In the two-knot solution of chapter 4 the
V-shaped variable mf_funds is oriented in opposite ways by the package and by the thesis; the thesis reads
its sign change between one and two knots as substantive (p. 92), but part of it is this indeterminacy.