How we can know which variable is contributing how much to factor component in PCA

r
pca

#1

I am currently doing a problem on PCA and while doing the problem I have created the my components using the correlation of variables but I want to know which variable is contributing how much to the component of PCA.

library(lattice)
my.wines <- read.csv(“http://steviep42.bitbucket.org/YOUTUBE.DIR/wines.csv”, header=T
pairs(my.wines[,-1])
my.prc <- prcomp(my.wines[,-1], center=TRUE, scale=TRUE)


#2

Hi @hinduja1234,

my.prc$rotation should give you:

Hope this helps!


#3

Hi @shuvayan,

Thanks for your answer. Can you go into a little more detail by interpreting these results? I’m understand that the rotation values give you contributions but I am wondering if the direction matters or is it absolute value we should look for?

For example, in this example does “price” contribute the most to PC1 because it is positive, or is it “acidity” because the value is the largest? Does that make sense?