-1
$\begingroup$

In the case where all my data are expressed in the same units, how can I express the principal components in terms of the original scale?

In economics and finance, it is customary to summarize data using principal components. I would like to apply principal components analysis to the yield curve of a given country (that is, the interest rate paid by the country for its debt at 1,2,...,10 years maturity). All the yields are expressed in percentage.

However, the interpretation of the principal components for the rest of the things I have to do with the principal components is crucial and should be carried out in the initial scale of the data.

Rather than using the principal components analysis for the yields, researchers also use the following transformations (p23 of this paper, for example):

PC1 (level)     = mean(yields);
PC2 (slope)     = yield_10years - yield_1year;[2]][2]
PC3 (curvature) = (-yield_1year + 2*yield_3year - yield_10year);

which are obviously expressed in the original scale. I therefore have some kind of benchmark against which I will compare the principal components I obtain with eigenvalues-eigenvectors decomposition of the covariance matrix. I am mostly interested in the first three principal components (blue is PC1, red is PC2, yellow is PC3).

Here are two pictures depending on the method used:

PC with MATLAB pca function

and

PC with empirical formulae

If we focus on the first principal components under the two methods, we can see that their shape is very similar, but their scale is not. For the values themselves, the PC1 obtain with PCA is centered in 0 whereas it is centered in 1.8452 for the empirical formulae.

How can I therefore express the PC obtained with PCA such that they have the same range of values as the PC obtained with the empirical formulae?

For all intents and purposes, here are my data, where the row dimension is time and the column dimension is the maturity of the yields. Col 1 is the 1-year, col 3 is the 3-years and col 9 is the 10-years. I have put the loadings obtained after centering my data and the corresponding scores.

# Data in CSV:
3.0875,2.99,2.9325,3.1275,3.5525,3.8075,4.03,4.3875,4.715
2.9175,2.8625,2.8875,3.1525,3.5825,3.8275,4.0375,4.3775,4.7025
2.7725,2.6875,2.61,2.785,3.1725,3.455,3.685,4.05,4.4125
2.7275,2.6225,2.5325,2.6675,3.0425,3.2925,3.52,3.895,4.2675
2.4225,2.3225,2.2475,2.3675,2.7725,3.0325,3.2725,3.6925,4.1325
2.43,2.3375,2.2825,2.4875,2.9125,3.1925,3.43,3.8225,4.2375
2.4225,2.3225,2.2675,2.4725,2.945,3.23,3.47,3.86,4.27
2.19,2.11,2.04,2.1625,2.5525,2.8275,3.0675,3.47,3.9
2.066,1.9895,1.9475,2.1625,2.5675,2.8525,3.1025,3.5175,3.9475
2.0747,2.0556,2.1225,2.5575,3,3.3075,3.555,3.925,4.3125
2.09,2.104,2.2365,2.68,3.175,3.4525,3.6675,4,4.33
2.04,2.0025,2.02,2.3375,2.79,3.0925,3.335,3.7275,4.13
2.0967,2.1275,2.3071,2.7475,3.2275,3.52,3.7475,4.0925,4.4275
2.0977,2.1675,2.415,2.905,3.4125,3.7025,3.925,4.2525,4.57
2.0525,2.0675,2.2125,2.6425,3.16,3.46,3.6975,4.06,4.4075
2.0379,2.0522,2.1911,2.6,3.0925,3.3975,3.64,4.025,4.395
1.98,1.9525,1.9975,2.355,2.79,3.105,3.365,3.785,4.1975
1.9122,1.8713,1.9017,2.1925,2.53,2.965,3.225,3.654,4.087
2.015,2.035,2.145,2.5175,2.885,3.306,3.552,3.943,4.331
2.045,2.0975,2.2825,2.73,2.995,3.482,3.728,4.103,4.477
2.055,2.1169,2.3275,2.763,2.995,3.528,3.753,4.104,4.441
2.0576,2.1127,2.2925,2.7,2.995,3.433,3.654,4.002,4.341
2.0575,2.0874,2.1963,2.514,2.839,3.219,3.44,3.801,4.161
2.072,2.136,2.2995,2.6045,2.876,3.239,3.441,3.778,4.122
2.093,2.129,2.236,2.48,2.739,3.1,3.308,3.655,4.013
2.1,2.128,2.212,2.421,2.651,2.985,3.18,3.514,3.868
2.0875,2.14,2.275,2.519,2.734,3.021,3.177,3.458,3.767
2.071,2.1195,2.223,2.456,2.654,2.928,3.076,3.337,3.629
2.0782,2.131,2.2745,2.563,2.794,3.073,3.231,3.499,3.79
2.088,2.136,2.268,2.535,2.735,3.026,3.175,3.438,3.733
2.074,2.081,2.123,2.303,2.488,2.781,2.937,3.106,3.546
2.0755,2.0638,2.0647,2.195,2.365,2.649,2.803,2.957,3.393
2.0665,2.0422,1.9983,2.069,2.225,2.496,2.532,2.801,3.231
2.0775,2.091,2.156,2.315,2.463,2.5645,2.696,2.942,3.237
2.0845,2.095,2.131,2.253,2.38,2.48,2.589,2.809,3.092
2.1215,2.1505,2.266,2.439,2.556,2.646,2.737,2.915,3.155
2.1995,2.317,2.498,2.7,2.819,2.929,3.023,3.186,3.4
2.3885,2.526,2.705,2.852,2.938,3.033,3.109,3.254,3.444
2.433,2.571,2.775,2.926,3.001,3.071,3.11,3.202,3.338
2.502,2.6305,2.8385,3.0318,3.148,3.233,3.29,3.394,3.537
2.609,2.7235,2.919,3.11,3.226,3.28,3.334,3.426,3.554
2.7485,2.9225,3.179,3.4095,3.525,3.609,3.665,3.76,3.884
2.7865,2.9475,3.2165,3.48,3.667,3.712,3.787,3.906,4.049
2.8765,3.048,3.288,3.51,3.615,3.702,3.775,3.904,4.023
2.9905,3.1655,3.4355,3.662,3.795,3.863,3.93,4.038,4.17
3.0995,3.26,3.459,3.605,3.7135,3.752,3.808,3.913,4.05
3.2115,3.385,3.56,3.605,3.6505,3.654,3.685,3.7625,3.882
3.361,3.5085,3.655,3.675,3.65,3.693,3.711,3.755,3.839
3.48,3.6165,3.76,3.754,3.797,3.744,3.746,3.773,3.835
3.578,3.67,3.77,3.738,3.756,3.719,3.721,3.778,3.7965
3.6585,3.7875,3.9525,3.998,3.98,4.0075,4.0065,4.0265,4.0805
3.7215,3.8505,4.0175,4.0675,4.0985,4.1085,4.1185,4.1555,4.2205
3.8,3.891,3.991,3.9795,3.9685,3.973,3.9795,4.006,4.0715
3.8785,3.9905,4.112,4.1195,4.1195,4.114,4.117,4.14,4.2035
3.967,4.0725,4.215,4.2235,4.2135,4.2055,4.2085,4.2265,4.2825
4.065,4.1923,4.4023,4.495,4.5075,4.5035,4.5045,4.5095,4.549
4.1145,4.2505,4.4555,4.5775,4.609,4.6255,4.6405,4.6695,4.7225
4.1925,4.3,4.4355,4.507,4.4885,4.507,4.5045,4.5255,4.5715
4.097,4.1563,4.231,4.232,4.284,4.4505,4.4525,4.4815,4.5575
4.0713,4.0713,4.125,4.1675,4.2138,4.37,4.388,4.444,4.547
4.0813,4.1335,4.2365,4.2515,4.2738,4.325,4.343,4.38,4.462
4.0225,4.0395,4.047,3.9845,3.9995,4.061,4.112,4.221,4.383
4.0435,4.1265,4.183,4.099,4.1285,4.211,4.264,4.3575,4.507
3.9738,3.874,3.694,3.5685,3.6215,3.692,3.765,3.936,4.132
3.9515,3.827,3.578,3.342,3.376,3.563,3.649,3.857,4.09
3.9985,3.988,3.8655,3.7165,3.7245,3.74,3.779,3.883,4.07
4.034,4.045,4.028,3.9155,3.915,3.9565,3.988,4.0705,4.233
4.08,4.186,4.349,4.3965,4.3425,4.3435,4.3505,4.3835,4.488
4.2935,4.415,4.629,4.732,4.7275,4.7245,4.6775,4.6355,4.6405
4.341,4.3845,4.398,4.319,4.4185,4.3415,4.3515,4.3555,4.391
4.324,4.31,4.267,4.1065,4.101,4.1345,4.1465,4.1745,4.25
4.099,4.0255,3.862,3.7465,3.8225,3.9,3.958,4.044,4.134
2.901,2.7595,2.595,2.735,3.021,3.289,3.467,3.764,4.086
2.198,2.01,1.904,2.146,2.472,2.652,2.847,3.159,3.506
1.734,1.6345,1.559,1.9285,2.209,2.457,2.625,2.9195,3.2485
1.201,1.163,1.211,1.5625,1.946,2.259,2.513,2.909,3.3225
0.865,0.8045,0.889,1.249,1.682,2.0095,2.2555,2.6305,3.0295
0.686,0.665,0.748,1.111,1.575,1.889,2.159,2.573,2.974
0.72,0.728,0.815,1.1775,1.601,1.939,2.221,2.647,3.048
0.787,0.759,0.8105,1.2115,1.704,2.122,2.457,2.934,3.36
0.596,0.669,0.819,1.3385,1.828,2.212,2.494,2.915,3.3
0.443,0.489,0.665,1.2465,1.756,2.135,2.41,2.817,3.199
0.405,0.443,0.675,1.2805,1.769,2.126,2.39,2.777,3.139
0.407,0.466,0.673,1.228,1.695,2.039,2.317,2.736,3.128
0.458,0.525,0.766,1.316,1.752,2.05,2.298,2.701,3.085
0.426,0.512,0.756,1.2165,1.633,1.924,2.184,2.594,2.993
0.3865,0.476,0.803,1.386,1.798,2.064,2.314,2.736,3.148
0.366,0.443,0.686,1.1365,1.542,1.862,2.13,2.568,2.996
0.365,0.433,0.567,0.9065,1.296,1.644,1.948,2.434,2.901
0.372,0.471,0.633,0.9795,1.339,1.649,1.936,2.401,2.86
0.438,0.542,0.664,0.9115,1.243,1.542,1.822,2.274,2.72
0.3965,0.427,0.5345,0.7465,1.011,1.305,1.581,2.025,2.464
0.492,0.5445,0.637,0.815,1.028,1.301,1.566,2.012,2.456
0.545,0.615,0.709,0.931,1.185,1.45,1.701,2.119,2.549
0.4955,0.526,0.584,0.703,0.875,1.055,1.245,1.579,1.935
0.706,0.759,0.859,1.023,1.198,1.358,1.54,1.868,2.22
0.821,0.8817,0.974,1.155,1.359,1.5665,1.765,2.1045,2.4615
0.702,0.747,0.816,1.002,1.242,1.53,1.801,2.228,2.644
0.6005,0.663,0.7575,1.0165,1.33,1.686,1.977,2.416,2.856
0.871,0.958,1.164,1.564,1.901,2.162,2.398,2.733,3.06
0.848,0.989,1.232,1.6275,1.918,2.1705,2.377,2.701,3.04
1.024,1.184,1.469,1.919,2.245,2.477,2.669,2.975,3.2698
1.223,1.366,1.592,1.951,2.222,2.4422,2.625,2.9143,3.227
1.154,1.284,1.466,1.715,1.94,2.154,2.363,2.668,2.985
1.345,1.43,1.556,1.734,1.942,2.187,2.385,2.708,3.056
1.248,1.287,1.32,1.383,1.557,1.788,2.016,2.377,2.748
0.901,0.871,0.834,0.902,1.112,1.399,1.664,2.064,2.444
0.742,0.666,0.658,0.735,0.911,1.162,1.385,1.745,2.074
0.778,0.688,0.649,0.729,0.934,1.151,1.377,1.753,2.1076
0.4895,0.453,0.449,0.565,0.806,1.096,1.375,1.813,2.227
0.391,0.377,0.377,0.463,0.622,0.86,1.104,1.506,1.912
0.361,0.346,0.338,0.371,0.5,0.716,0.952,1.3795,1.812
0.3465,0.3415,0.345,0.411,0.553,0.752,0.97,1.3748,1.804
0.3605,0.362,0.371,0.461,0.613,0.8135,1.028,1.429,1.848
0.3125,0.295,0.28,0.327,0.462,0.66,0.877,1.291,1.733
0.272,0.25,0.236,0.25,0.326,0.452,0.606,0.891,1.213
0.239,0.228,0.226,0.285,0.402,0.581,0.791,1.169,1.573
0.056,0.038,0.04,0.084,0.191,0.343,0.539,0.943,1.377
0.0685,0.055,0.056,0.089,0.19,0.358,0.552,0.929,1.353
0.0855,0.0715,0.07,0.126,0.244,0.426,0.629,1.0159,1.453
0.0885,0.082,0.085,0.145,0.265,0.436,0.632,1.021,1.466
0.064,0.049,0.0465,0.093,0.194,0.354,0.538,0.912,1.354
0.067,0.054,0.0495,0.091,0.181,0.309,0.472,0.829,1.273
0.1395,0.1675,0.2375,0.379,0.534,0.699,0.87,1.206,1.606
0.0765,0.073,0.079,0.144,0.27,0.426,0.607,0.983,1.445
0.082,0.082,0.092,0.131,0.234,0.371,0.54,0.886,1.324
0.071,0.07,0.078,0.119,0.198,0.304,0.454,0.7739,1.2
0.069,0.061,0.074,0.15,0.3015,0.446,0.627,0.994,1.452
0.11,0.124,0.168,0.281,0.444,0.673,0.896,1.271,1.708
0.1065,0.11,0.142,0.23,0.402,0.624,0.8465,1.227,1.675
0.098,0.118,0.171,0.312,0.5164,0.775,1.015,1.4132,1.861
0.105,0.117,0.153,0.239,0.409,0.635,0.865,1.274,1.739
0.114,0.119,0.141,0.206,0.3435,0.5435,0.755,1.1583,1.644
0.1255,0.112,0.105,0.143,0.277,0.482,0.7085,1.136,1.643
0.158,0.154,0.156,0.24,0.427,0.644,0.889,1.3136,1.809
0.1355,0.116,0.103,0.126,0.253,0.437,0.6435,1.051,1.544
0.1383,0.125,0.123,0.157,0.283,0.46,0.649,1.0275,1.505
0.1632,0.152,0.145,0.186,0.293,0.451,0.6245,0.987,1.45
0.169,0.152,0.139,0.165,0.269,0.413,0.5793,0.9261,1.3729
0.107,0.083,0.068,0.072,0.158,0.282,0.4343,0.774,1.2282
0.056,0.051,0.041,0.054,0.118,0.2209,0.3583,0.685,1.134
0.067,0.067,0.06,0.069,0.126,0.214,0.337,0.63,1.05
0.0045,0.002,-0.011,-0.006,0.032,0.097,0.1838,0.4092,0.7667
-0.0365,-0.04,-0.056,-0.053,-0.023,0.044,0.143,0.413,0.826
-0.01,-0.014,-0.036,-0.039,-0.008,0.0535,0.135,0.3711,0.7551
-0.002,-0.02,-0.04,-0.039,-0.015,0.026,0.087,0.262,0.594
-0.026,-0.049,-0.07,-0.0755,-0.054,-0.004,0.0567,0.204,0.4931
-0.042,-0.068,-0.086,-0.086,-0.065,-0.031,0.019,0.163,0.3875
-0.0687,-0.09,-0.109,-0.118,-0.093,-0.048,0.016,0.179,0.432
-0.095,-0.112,-0.13,-0.142,-0.1165,-0.073,-0.016,0.12,0.293
-0.106,-0.114,-0.123,-0.109,-0.067,0.003,0.0728,0.222,0.428
-0.125,-0.126,-0.126,-0.1122,-0.0674,0.0075,0.101,0.314,0.595
-0.1205,-0.12,-0.124,-0.105,-0.03,0.096,0.24,0.5228,0.885
-0.122,-0.127,-0.1332,-0.1165,-0.0595,0.03,0.1455,0.4004,0.742
-0.132,-0.135,-0.142,-0.117,-0.05,0.057,0.189,0.479,0.859
-0.144,-0.155,-0.173,-0.171,-0.12,-0.03,0.082,0.344,0.704
-0.188,-0.216,-0.24,-0.24,-0.186,-0.0958,0.021,0.2895,0.658
-0.273,-0.297,-0.325,-0.331,-0.282,-0.19,-0.07,0.211,0.612
-0.235,-0.255,-0.272,-0.252,-0.175,-0.051,0.082,0.371,0.768
-0.299,-0.349,-0.398,-0.416,-0.372,-0.2912,-0.187,0.0681,0.425
-0.359,-0.401,-0.4552,-0.495,-0.4742,-0.4133,-0.334,-0.111,0.222
-0.346,-0.357,-0.379,-0.392,-0.367,-0.316,-0.242,-0.0325,0.301
-0.345,-0.355,-0.378,-0.386,-0.359,-0.295,-0.206,0.038,0.402
-0.343,-0.3575,-0.381,-0.402,-0.385,-0.3423,-0.269,-0.0687,0.284
-0.357,-0.387,-0.421,-0.465,-0.475,-0.4485,-0.3871,-0.229,0.1336
-0.3542,-0.374,-0.402,-0.442,-0.461,-0.4575,-0.421,-0.2751,0.013
-0.351,-0.368,-0.394,-0.427,-0.4343,-0.4237,-0.3932,-0.2561,0.021
-0.35,-0.363,-0.389,-0.427,-0.439,-0.429,-0.39,-0.2548,0.04
-0.35,-0.357,-0.3593,-0.357,-0.332,-0.2905,-0.2253,-0.04,0.282
-0.35,-0.351,-0.351,-0.348,-0.313,-0.252,-0.161,0.086,0.446
-0.347,-0.347,-0.343,-0.333,-0.3,-0.248,-0.163,0.071,0.448
-0.352,-0.35,-0.343,-0.31,-0.239,-0.1491,-0.0378,0.222,0.607
-0.353,-0.353,-0.352,-0.335,-0.297,-0.239,-0.157,0.0716,0.44
-0.351,-0.349,-0.3345,-0.283,-0.208,-0.1305,-0.034,0.204,0.556

# Loadings in CSV:
0.31836,-0.40969,0.54776,-0.42775,0.034848,-0.13169,0.30693,-0.35146,0.10724
0.32384,-0.41086,0.2716,0.10054,-0.048166,0.12998,-0.28991,0.71314,-0.17499
0.33241,-0.36172,-0.15189,0.57345,-0.086537,0.19046,-0.28994,-0.52329,0.071288
0.34063,-0.16738,-0.45538,0.22549,0.005662,-0.37892,0.6328,0.22772,0.042794
0.34682,0.015957,-0.37947,-0.37194,0.71414,0.22593,-0.18865,-0.017696,0.013377
0.34837,0.16054,-0.22316,-0.3338,-0.42626,-0.37079,-0.31829,-0.14686,-0.49959
0.34382,0.26412,-0.085207,-0.19197,-0.40953,0.17238,-0.1001,0.1364,0.73611
0.33115,0.40132,0.16181,0.1057,-0.10473,0.60123,0.40878,-0.041413,-0.38816
0.31262,0.49765,0.41051,0.35977,0.34434,-0.45408,-0.15238,0.0046054,0.093103

# Score in CSV:
5.3362,0.49337,0.34761,-0.093587,0.0361,0.021815,-0.0019689,-0.0051055,-0.0023761
5.2471,0.62294,0.19208,-0.078685,0.046923,0.0099034,-0.0032757,-0.0091293,-0.0017862
4.3345,0.48094,0.37133,-0.070702,0.017014,0.012158,-0.0076307,0.0046608,-0.00096716
3.9783,0.36768,0.40936,-0.063207,0.034922,0.014489,-0.0029844,-0.0026711,-0.00032123
3.2086,0.50933,0.4341,-0.029236,0.055797,0.0073481,-0.020572,-0.011632,-0.0035619
3.5026,0.64129,0.3442,-0.068004,0.042805,-0.00055957,-0.012792,-0.0039501,-0.00056086
3.546,0.70679,0.34043,-0.094916,0.042587,0.0094272,-0.027582,-0.0096072,-0.0008371
2.5623,0.5057,0.38915,-0.033922,0.032194,0.011273,-0.02814,-0.0053812,-0.0015866
2.5096,0.69567,0.31549,-0.044573,0.038785,0.0014641,-0.0065569,-0.00024002,-0.00093318
3.4397,1.0802,0.043304,-0.077445,0.035612,-0.021166,0.015416,0.014272,0.0051826
3.72,1.0869,-0.097302,-0.10699,0.039909,0.00071631,-0.011891,-0.00041906,-0.0030463
2.9566,0.92404,0.16517,-0.070755,0.034198,-0.001179,-0.01219,0.0047572,-0.0036403
3.9066,1.1561,-0.11552,-0.064349,0.033127,0.0027219,-0.010845,-0.010899,0.00052312
4.2956,1.2881,-0.23389,-0.058987,0.036734,0.004875,-0.020819,-0.015154,0.001184
3.7273,1.2037,-0.064049,-0.085298,0.036433,0.010433,-0.019433,-0.0081213,-0.001935
3.6157,1.1843,-0.019931,-0.053636,0.039618,0.0050407,-0.014188,-0.0084593,-0.0037511
2.9746,1.041,0.14584,-0.038642,0.036169,-0.0062366,0.0077248,0.0061332,-0.002377
2.5745,0.9928,0.25047,0.0073275,-0.047909,-0.024083,0.0063138,-0.0038384,-0.0052525
3.3781,1.1252,0.074542,0.0023119,-0.043423,-0.02006,-0.0017598,0.00086628,-0.0059848
3.7846,1.2153,-0.019894,0.05852,-0.091109,-0.050387,0.0327,0.0015933,-0.00022159
3.834,1.1779,-0.058022,0.05644,-0.13775,-0.048915,0.02673,-0.0076719,-0.0062418
3.6682,1.0697,-0.051653,0.024585,-0.077498,-0.030355,0.012717,-0.0034016,-0.0055511
3.2396,0.88242,0.059507,0.0095091,-0.04249,-0.013371,-0.0055579,-0.00093304,-0.0073932
3.3254,0.77947,-0.014558,0.050688,-0.046276,-0.018604,-0.0047566,-0.0074473,-0.0065767
3.0498,0.65431,0.091075,0.047183,-0.049189,-0.013993,-0.0069234,-0.0056556,-0.0056515
2.817,0.48799,0.11278,0.045641,-0.043722,-0.015497,-0.0043872,-0.0035484,-0.0056775
2.8614,0.38257,-0.034805,0.025851,-0.03339,-0.020347,-0.0022732,-0.0065583,-0.0071822
2.6327,0.26699,-0.029334,0.0045714,-0.039808,-0.017957,0.00018527,0.0031577,-0.0066038
2.9486,0.43436,-0.085202,0.0011272,-0.030794,-0.01927,0.0054494,-0.0023509,-0.0039565
2.8476,0.35921,-0.060358,0.0088254,-0.042695,-0.026887,0.0066196,-0.0026331,-0.0056019
2.2768,0.14639,0.082905,-0.0092117,-0.033413,-0.092581,-0.045319,0.0068837,0.037616
1.9837,-0.0024734,0.13772,-0.024628,-0.041875,-0.087247,-0.050273,0.0087532,0.041261
1.6115,-0.1864,0.21301,-0.0090449,0.00065855,-0.095617,-0.044101,-0.0037392,-0.045501
1.9784,-0.19149,0.0020141,0.011252,0.047341,-0.015212,0.028677,0.0029814,0.0044205
1.7681,-0.34527,0.017392,-0.0062641,0.033768,-0.016869,0.018672,0.00646,0.00050247
2.1306,-0.32076,-0.1259,-0.012567,0.026667,-0.020447,0.025374,-0.0066563,0.00543
2.8299,-0.19288,-0.23495,0.032302,0.0088117,-0.0083197,0.0040642,0.0054034,0.0026485
3.2217,-0.366,-0.22194,0.052982,0.0017405,-0.00016176,-0.0054181,0.0060551,-0.001752
3.2839,-0.50668,-0.31408,0.015358,-0.007186,0.0023034,-0.0074596,-0.0021658,-0.003787
3.6774,-0.34809,-0.31246,0.00068051,-0.0019174,0.0022012,-0.0041424,-0.0019946,-0.00021095
3.8695,-0.43063,-0.30811,-0.01559,0.01096,0.0051991,0.0042937,-0.0011234,0.0031886
4.7127,-0.27045,-0.3791,0.030835,0.0018217,0.0023117,-0.0044535,0.0031419,-0.00095588
4.9963,-0.12993,-0.3852,0.018673,0.048163,0.0087625,-0.0035432,-0.0022381,0.0033728
5.0571,-0.25832,-0.32114,0.053464,0.0037391,0.012718,0.010536,0.0079324,-0.0043582
5.4944,-0.23551,-0.35382,0.051976,0.023174,0.0049793,-0.0034605,-0.00147,0.00207
5.3603,-0.47918,-0.24945,0.049876,0.030909,0.010033,-0.010179,0.0080605,-0.0016347
5.2694,-0.80618,-0.20656,0.075861,0.025117,0.017469,-0.021859,0.0091751,-0.0039447
5.4188,-0.97554,-0.16702,0.060505,-0.025096,0.010328,-0.0064605,0.008873,-0.0011988
5.639,-1.0949,-0.19331,0.020532,0.030853,0.031732,-0.021199,0.0010324,-0.0015776
5.6435,-1.1864,-0.11106,0.0011896,0.0085691,0.049933,0.0064507,-0.0035321,-0.012388
6.3038,-1.0108,-0.19809,0.035871,-0.016766,0.0041403,0.00435,-0.00069423,-0.0011716
6.5908,-0.9285,-0.18669,0.032917,0.0075678,0.012694,-0.0037583,-0.0024452,-0.0012989
6.354,-1.1477,-0.082539,0.019228,-0.0036584,0.010604,0.0037503,0.0014188,0.0021711
6.7335,-1.1071,-0.11926,0.028639,0.0074486,0.0093581,4.0457e-05,0.0037853,0.00086468
7.0072,-1.1173,-0.12898,0.036039,0.0070573,0.0077883,0.0066837,-0.0048951,0.0044784
7.7165,-0.94297,-0.24294,0.03494,0.013872,-0.00066215,0.014662,-0.0091715,0.0069023
8.0286,-0.81254,-0.22589,0.043478,0.01643,-0.0021915,0.017138,-0.0011046,0.0039162
7.814,-1.0356,-0.1361,0.028659,0.001334,-0.0078646,0.026123,0.0074448,-0.0015087
7.448,-0.86812,0.010624,-0.029003,-0.079808,-0.0030248,-0.03034,-0.0105,-0.0099623
7.2648,-0.82489,0.058654,-0.044264,-0.056894,-0.021345,0.007926,-0.015533,-0.0027842
7.2957,-0.99507,-0.028303,0.0045908,-0.010823,-0.0025687,0.0080875,-0.012241,0.0060349
6.7487,-1.03,0.18886,0.04068,0.0072364,-0.0055897,0.0092198,-0.0019137,0.0037852
7.101,-0.95995,0.1288,0.076062,-0.013003,0.010959,-0.026925,-0.0010035,0.0026455
5.8688,-1.141,0.46649,-0.04141,0.014571,0.0039402,0.026598,0.011358,-0.0043262
5.5215,-1.1405,0.66408,-0.021011,-0.054204,0.0084453,-0.0032247,0.0053441,-0.013927
6.0413,-1.3238,0.33252,0.0062779,0.027502,-0.003738,-0.003271,0.022882,-0.00056303
6.5193,-1.2045,0.21098,0.0301,0.0077165,-0.0079539,-0.0040492,-0.0023343,0.0040005
7.4412,-1.0607,-0.11747,0.084191,0.024379,-0.028838,0.029474,-0.0031282,0.0091932
8.3005,-1.069,-0.28924,0.000462,0.0032028,-0.016646,0.012877,-0.01287,-0.0017673
7.5649,-1.3123,0.034426,-0.062521,0.043483,0.046588,-0.021679,0.0032063,0.0072145
7.0627,-1.427,0.21852,-0.029096,-0.027535,0.0196,-0.0079855,-0.0088874,0.0053898
6.3191,-1.2131,0.3488,-0.11236,-0.036674,0.037275,0.0054324,0.015778,0.0012927
3.9947,0.048604,0.41912,-0.13239,-0.011593,-0.013266,0.019724,0.01497,-0.0019456
2.0907,0.18688,0.27098,-0.17288,0.053485,-0.021627,0.058322,-0.0039115,0.014693
1.2373,0.37406,0.084062,-0.17147,0.0066569,-0.045078,0.062402,0.034129,-0.0037857
0.49551,0.94033,0.065783,-0.062048,0.0078648,-0.0089925,0.013077,0.0032007,0.0050107
-0.39221,1.0244,-0.011504,-0.11365,-0.0089401,0.00020279,-0.0053449,-0.020889,0.0077307
-0.73691,1.1319,-0.019552,-0.090586,0.0043432,0.025581,-0.013136,-0.0065501,0.0018741
-0.56537,1.1481,-0.0082328,-0.049196,-0.013332,0.025766,-0.0063615,0.0044417,0.001291
-0.15072,1.4676,0.096571,-0.071767,-0.035628,0.03421,-0.0034876,0.0061437,0.0055069
-0.13256,1.5472,-0.18961,-0.072464,-0.021599,0.018003,-0.012486,0.02371,-0.0074656
-0.46679,1.6297,-0.26268,-0.11226,-0.014166,0.0050301,0.0010005,0.013472,-0.0029829
-0.51639,1.6024,-0.34531,-0.11104,-0.0091083,-0.00090162,0.016494,-0.0037235,0.0030476
-0.62494,1.5453,-0.27119,-0.060277,0.0043692,0.0046378,0.011673,0.0068426,0.00047649
-0.53667,1.414,-0.32721,-0.043381,0.028412,-0.0060357,0.018836,-0.001597,-0.0031195
-0.77684,1.3118,-0.27353,0.0046239,0.023163,0.0099132,-0.0030367,-0.0079796,0.0011599
-0.48154,1.4909,-0.4076,0.02079,0.063833,-0.022071,0.034635,-0.016679,0.001099
-0.9482,1.3688,-0.22808,0.028411,0.017312,0.0019543,-0.00055522,-0.013246,-0.0012356
-1.3676,1.2668,-0.011709,0.058591,-0.00014406,0.021727,-0.01529,0.0065225,-0.0031032
-1.3174,1.1769,-0.079402,0.080128,0.0158,0.015223,-0.012845,0.011294,-0.002937
-1.4819,0.9514,-0.005709,0.090994,0.00044376,0.03298,-0.032193,0.0135,-0.0044661
-2.04,0.75738,0.051214,0.07896,-0.013226,0.021812,0.0020937,-0.0085638,0.0056281
-1.9216,0.60791,0.079008,0.11779,-0.0054451,0.016629,0.0064409,0.0023696,0.0010324
-1.6011,0.66307,0.014586,0.080372,0.0015713,0.014168,-0.0061905,0.01251,-0.0013615
-2.5376,0.092236,-0.0086753,0.026216,-0.0074806,0.023665,-0.00094623,0.0007564,0.00020185
-1.6909,0.14675,-0.069147,0.04463,0.015218,0.013171,0.0066785,0.001273,-0.00024334
-1.1717,0.29609,-0.039798,0.042698,-0.0035409,0.016242,-0.0027921,0.0067788,-0.0012358
-1.3008,0.62512,0.096483,0.082454,-0.021223,0.026975,0.0014892,0.0084477,0.003985
-1.101,0.97383,0.054598,0.064702,-0.037987,0.021931,-0.0185,0.010863,0.0038096
0.079669,0.92858,-0.25191,-0.0099664,-0.0053366,0.017653,0.0047257,0.0033609,0.0092891
0.11141,0.86333,-0.31528,0.040595,0.00042542,0.00051213,-0.0046987,0.0092484,4.465e-05
0.89182,0.93246,-0.41335,0.018204,0.012035,0.00832,-0.0029522,0.0075589,-0.0045996
0.99719,0.66307,-0.29532,0.035933,0.0077876,0.00013419,-0.0085214,0.012164,-0.00070264
0.3809,0.47087,-0.17433,0.070018,-0.0098796,0.023781,-0.011384,0.010791,0.0075858
0.58057,0.35942,-0.026754,0.072681,-0.019325,0.011365,-0.01671,0.0018005,0.00056849
-0.29992,0.14826,0.16354,0.086737,-0.022526,0.03181,-0.010518,0.0048426,0.0057104
-1.4801,0.27823,0.26357,0.026662,-0.054971,0.046009,0.001491,0.0034661,0.0085293
-2.182,0.092124,0.17301,-0.023925,-0.058612,0.040649,0.024734,-0.020964,0.0073712
-2.1539,0.089015,0.2123,-0.034039,-0.02255,0.036776,0.026331,-0.014644,0.006421
-2.4512,0.47565,0.21525,0.029719,-0.037221,0.04126,0.0083072,-0.0053898,0.0074473
-3.0052,0.19799,0.16463,0.053382,-0.027479,0.026968,0.015897,0.0016913,0.0064787
-3.287,0.086782,0.21746,0.093263,-0.0088592,0.023303,0.016358,-0.0030636,0.00018055
-3.2441,0.090856,0.15529,0.073486,0.003343,0.01334,0.012533,0.00065786,-0.0013228
-3.1134,0.12872,0.12721,0.063323,0.0032322,0.013524,0.01374,0.0039136,-0.0035848
-3.4657,0.051714,0.19245,0.075147,0.0061902,0.010601,0.013592,-8.9622e-05,-0.0028565
-4.0418,-0.41084,0.042718,-0.011973,-0.024328,0.026194,0.012951,-0.0022991,0.0037033
-3.7114,-0.029021,0.12362,0.05415,-0.0049814,0.017416,0.019118,0.0019039,0.0031571
-4.3403,-0.07143,0.12919,0.073236,0.022895,0.0078154,0.023035,-0.0049476,-0.0050261
-4.3266,-0.1019,0.11975,0.062656,0.0019259,0.0084656,0.012515,-0.0043941,-4.3673e-05
-4.1696,-0.010143,0.12745,0.061012,0.0040993,0.0041165,0.01305,-0.0010794,0.00048353
-4.1363,-0.013043,0.11672,0.067162,0.015956,-0.00053948,0.01126,0.00024938,-0.0024256
-4.3419,-0.10542,0.1135,0.06053,0.015323,-0.0057482,0.012977,-0.0018936,-0.0015442
-4.4347,-0.20794,0.090878,0.05563,0.032643,-0.014914,0.012109,-0.00050745,-0.0035688
-3.5902,0.089893,-0.055486,0.030552,0.013106,-0.0038254,0.0019941,-0.0011514,-0.0024064
-4.1748,-0.03592,0.096766,0.06243,0.031305,-0.013676,0.003701,0.00040765,-0.0031531
-4.2949,-0.17064,0.072445,0.056331,0.023531,-0.0084935,0.00057426,-0.0018354,0.00029484
-4.4523,-0.29487,0.037651,0.044898,0.03198,-0.015931,0.0069385,0.0008834,0.001357
-4.1501,-0.010219,0.073958,0.044367,0.039126,-0.01089,-0.00075587,-0.002721,-0.00042343
-3.6481,0.2395,0.061853,0.057574,-0.015889,0.0048556,-0.0026324,-0.0010181,0.0080836
-3.7533,0.20893,0.093731,0.056211,-0.0089665,0.0065474,-0.0088653,-0.0049231,0.0076092
-3.4458,0.42277,0.064518,0.05707,-0.018819,0.0095513,-0.0090501,-0.00080258,0.006043
-3.6966,0.25866,0.11623,0.08406,-0.00040725,0.006228,-0.0060623,-0.003978,0.0033239
-3.8687,0.12552,0.13548,0.095702,0.017341,-0.010736,-0.0016116,-0.0030044,0.0016008
-3.9689,0.11459,0.21294,0.1067,0.020596,-0.0093341,0.0023308,-0.002762,0.0029653
-3.6137,0.27929,0.17866,0.082119,0.01855,0.0011403,-0.0038999,0.0027543,0.0073469
-4.0763,0.0042638,0.19784,0.08967,0.024302,-0.010162,-0.00024106,-0.0050176,0.00055754
-4.055,-0.03622,0.14787,0.071429,0.020811,-0.014521,-0.0053675,-0.0053545,0.00048562
-4.0598,-0.12171,0.12346,0.062568,0.024952,-0.019091,0.0016755,-0.00053268,-0.0015641
-4.1485,-0.19963,0.11705,0.048023,0.022953,-0.01377,-9.2672e-05,-0.0022069,-0.00041654
-4.4754,-0.29878,0.11718,0.050633,0.031788,-0.020098,-0.00035848,-0.0065914,-0.0012403
-4.6374,-0.36507,0.075072,0.056253,0.039273,-0.026081,0.0022768,0.0011084,-0.0039837
-4.6687,-0.45602,0.032664,0.034817,0.031539,-0.021746,-0.0018667,0.0019832,-0.0022041
-5.0465,-0.65581,-0.051477,-0.024447,0.0092654,-0.015442,-0.0058615,0.0034574,-0.0020511
-5.1359,-0.58674,0.0040281,0.020182,0.033532,-0.030713,0.00088334,0.0040675,-0.004563
-5.1379,-0.6703,-0.026823,-0.011065,0.021465,-0.026829,-0.0068375,0.0046747,-0.005017
-5.2536,-0.81082,-0.094365,-0.065878,0.0047113,-0.021525,-0.0066546,0.0010686,0.0022672
-5.3782,-0.85905,-0.12094,-0.096057,-0.023664,-0.005982,-0.0084077,-0.00089064,0.0063485
-5.4711,-0.92061,-0.16422,-0.12465,-0.034957,0.018914,0.0039583,-0.0026064,-0.0019592
-5.5027,-0.86236,-0.13123,-0.10148,-0.030892,0.016189,-0.00068632,-0.0020379,-0.00013937
-5.6242,-0.93662,-0.18687,-0.14291,-0.063773,0.047976,0.0011772,-0.0014343,-0.0030541
-5.4647,-0.79479,-0.18092,-0.12843,-0.062087,0.036329,-0.004059,0.0013307,-0.00093606
-5.3829,-0.65226,-0.11249,-0.060911,-0.027812,0.020497,0.00041435,0.00044389,-0.0028827
-5.125,-0.37887,-0.0049298,-0.0031933,-0.018023,0.011786,-0.0039417,0.0017242,0.0015583
-5.2857,-0.52644,-0.045551,-0.024366,-0.0076634,0.0065392,0.0008046,0.0011896,-0.0013126
-5.2043,-0.41004,-0.0042266,0.0034533,0.0026496,-0.00090744,0.0018514,0.0025743,-0.0025914
-5.4278,-0.55132,-0.01731,-0.017795,-0.0027491,-0.00015381,-0.0011758,0.00075074,-0.0031645
-5.6066,-0.54493,0.0008438,-0.023175,-0.0001732,-0.0018113,0.0029985,-0.0033835,-0.00097874
-5.8569,-0.52594,0.020255,-0.0044511,0.0088512,-0.01161,-0.00042466,-0.001358,-0.00089533
-5.5471,-0.38514,0.013805,-0.010615,-0.0041109,-0.0067983,-0.0043227,-0.0019865,-0.00071488
-6.1477,-0.65228,0.0085035,-0.052253,-0.0063612,-0.00062061,0.0050297,-0.0049079,-0.0021383
-6.4808,-0.80538,-0.027579,-0.067408,-0.013328,0.00090382,-0.0011391,-0.0027911,-0.0048877
-6.2486,-0.76114,-0.092086,-0.054914,-0.004619,-0.0042803,-0.0071716,0.0010751,-0.0039222
-6.1679,-0.67217,-0.0518,-0.026322,0.0046809,-0.0094839,-0.0023055,0.0022235,-0.0056834
-6.2939,-0.79439,-0.083557,-0.048935,0.0029767,-0.014346,-0.0095919,0.00035228,0.0014086
-6.5516,-0.94038,-0.084236,-0.062515,0.0013746,-0.029481,-0.013612,-0.0021547,0.012659
-6.5952,-1.0463,-0.14991,-0.09028,-0.0096506,-0.0055545,-0.0043276,-0.00076915,-0.00058122
-6.5451,-1.0307,-0.16826,-0.10474,-0.016395,-0.0032737,-0.0099426,-0.00077963,-0.002771
-6.5375,-1.025,-0.15641,-0.091921,-0.013035,-0.0081941,-0.012645,0.0011498,0.0030226
-6.2131,-0.77588,-0.14262,-0.066379,-0.0047359,-0.0078144,-0.0085249,-0.0017206,-0.00028491
-6.0702,-0.62721,-0.079915,-0.018927,0.0084094,-0.0064769,-0.0027341,-0.0014177,-0.0056457
-6.0593,-0.64019,-0.092493,-0.01849,0.018371,-0.01933,-0.0057625,-0.0008498,-0.0020997
-5.8557,-0.45112,-0.072703,-0.018038,0.0075411,-0.010497,-0.0098942,-4.1133e-05,-0.001368
-6.0629,-0.63234,-0.10198,-0.030226,0.01225,-0.017907,-0.0070876,0.00061621,-0.0034376
-5.8464,-0.48765,-0.12556,-0.046122,0.0039224,-0.0060125,-0.0069918,-0.00023003,-0.003516

EDIT: I have run the PCA function on unscaled (using the covariance rather than the correlation matrix) and uncentered data and this is the result:

PC with unscaled and uncentered data

I think my mistake was to think that the PC should be of the same order of magnitude as the original data (I have divided the data by 100 to change the order of magnitude of the PC and original data).

Data in decimals

$\endgroup$
  • $\begingroup$ Just to check - you want the principle components of each of (data, loadings and score) calculated, but so that they are on the same scale as the original values? $\endgroup$ – TMrtSmith Jan 25 '18 at 11:51
  • $\begingroup$ Yes, I want to express the score as percentage points, just like the original data. $\endgroup$ – user89073 Jan 25 '18 at 12:32
4
$\begingroup$

I can answer at least the first part of your questions, which is easy. Principal component scores in the scale of the original variables are computed by using the decomposition of the covariance (and not correlation) matrix. The scores are computed by postmultiplying the data matrix (X) by the unscaled eigenvectors (E), or Scores = XE. Often the eigenvectors are called "loadings" but a better usage for that term is the correlation between the scores and the original data.

But, based on the 2nd part of your question, I think you are asking about location and not about scale (scaling shrinks or blows up stuff while translation rigidly moves stuff around to different locations). Your scores are on the same scale as the original data but they have simply been centered (rigidly translated so the multivariate mean is located at the origin). If you want the uncentered scores, don't center the X or the raw scores. Or if you want to re-center to any location, simply add the vector to each case.

This is R code to do this:

library(data.table)
X <- as.matrix(fread('pca.txt'))
S <- cov(X)
res <- eigen(S)

E <- res$vectors
head(E)

L <- res$values
# percent
L/sum(L)
# wow, essentially a singe vector

# these are the uncentered scores
Scores <- X%*%E
head(Scores)
apply(Scores, 2, mean)

# here are the scores you posted, which are centered at zero
head(scale(Scores, scale=FALSE))


# show that sum of variances in Scores = sum of variances in X
sum(diag(S))
sum(diag(cov(Scores)))
# so, these are on same scale
$\endgroup$
3
$\begingroup$

If you calculate the PCA on the original data without scaling, then the scores should be in the original scale. For instance, the default prcomp function in R would do this. It has an argument scale which is FALSE by default. If you set it to TRUE then it'll scale the inputs by the variance and the scores will not be in the original scale anymore.

One thing to be aware of is the center parameter. PCA in general requires that the inputs be centered. It's not an issue with interest rates usually, because you're supposed to run PCA on the differences of rates, which are usually centered around zero. You don't seem to be differencing the rates, so in your case centering (which is default in the function) will shift the component levels, though the range will still be in the same scale as the input rates.

Running PCA on levels of rates is not meaningful in most applications. In your data set the yields are clearly non-stationary, you start in early 2000s, pre great recession. Applying PCA to such a long period is a question in itself, because correlations are unstable over time. Applying it to levels is even more questionable in this case.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.