1
votes

I have used SVD to get the matrix V and 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) is the contribution of each PC for total variation.

How do you calculate the total contribution of a variable for 2 or more PCs? e.g. how much variable b contribute to PC1 + PC2 + PC3?

I have read this Principal Components Analysis - how to get the contribution (%) of each parameter to a Prin.Comp.?

Thanks, Ming

1

1 Answers

0
votes

As per this PCA process (read First Principal Component, Second Principal Component), there should not be contribution of same parameters to different components. Correlation between parameters that have contributed to Principal Component 1 (PC1) and PC2 is 0.