Rolling PCA and plotting proportional variance of principal components
问题 I'm using the following code to perform PCA: PCA <- prcomp(Ret1, center = TRUE, scale. = TRUE) summary(PCA) I get the following result: #Importance of components: # PC1 PC2 PC3 PC4 #Standard deviation 1.6338 0.9675 0.60446 0.17051 #Proportion of Variance 0.6673 0.2340 0.09134 0.00727 #Cumulative Proportion 0.6673 0.9014 0.99273 1.00000 What I would like to do is a Rolling PCA for a specific window ( e.g. 180 days). The Result should be a matrix which shows the evolution of the "Proportion of