I am trying to obtain a PCA loadings plot similar to that in the artículo siguiente (vea la página 40).
I have estimated a so called affine no-arbitrage model with latent state variables (level, slope and curvature), which I want to track (/plot) together with the PCA loadings (similar to the article, however I will plot Level, inflation and PCA 1, instead of LEVEL and CPI. Similarly with slope and curvature).
Puedo usar el
princomp(X)function in MATLAB, however I am not able to obtain the loadings such that I can plot them with the other data. That is: I do not know how I obtain a time series of the loadings in the PCA (once again, see the article). How do I do this in MATLAB?
I also assume that I have to do some data processing on the original data such that it can be plotted on the same "scale" as the loadings. In the article they use normalized data series on CPI and so on. So if I am correct, that should be pretty straight forward, I just need to demean the data and find unit variance by X=X/std(X(:));.. (where X is the original data vector).
The code I have been running so far is
[COEFF,SCORE,latent,tsquare] = princomp(yields) however, does
SCORE provide me with the time series of the PCA loadings? The SCORE matrix seem to be the correct size...and if SCORE is the correct matrix for plotting (such as the fig. in the article) then do I also need to process the PCA data (normalize)...?
Note: Yields is a 170x5 matrix (5 yields of zero coupon bonds over 170 months)
preguntado el 12 de junio de 14 a las 10:06