我使用SVD来获得矩阵V和D
a <- rnorm(10, 50, 20)
b <- seq(10, 100, 10)
c <- seq(88, 10, -8)
d <- rep(seq(3, 16, 3), 2)
e <- rnorm(10, 61, 27)
my_table <- data.frame(a, b, c, d, e)
X<- as.matrix(my_table)
sv<- svd(X)
U<- sv$u
V<- sv$v
D<- sv$d
Z<- X%*%V
# I know V is loadings for each variable
V
[,1] [,2] [,3] [,4] [,5]
[1,] -0.47127774 0.1101038 0.84237687 -0.2330963 -0.04291587
[2,] -0.46309655 0.6788144 -0.19949420 0.5031776 0.17823289
[3,] -0.41041595 -0.7145416 0.02300398 0.5538093 0.11728268
[4,] -0.07145917 0.0415040 -0.03735585 0.2083779 -0.97383478
[5,] -0.62441269 -0.1216386 -0.49867688 -0.5851088 -0.06543590
D ^ 2 / sum(D ^ 2)是每台PC对总变差的贡献。
如何计算变量对2台或更多台PC的总贡献? 例如变量b对PC1 + PC2 + PC3贡献了多少?
我已阅读此Principal Components Analysis - how to get the contribution (%) of each parameter to a Prin.Comp.?
谢谢, 明