[R] Principal Components Loadings
Pavneet Arora
pavneet.arora at uk.rsagroup.com
Tue Mar 25 14:41:16 CET 2014
Hello All,
I have a dataset "bodysize.Rdata" from Journal of Statistics Education
Data Archive, which I have attached here.
I am trying to do principal components analysis on it using princomp, and
it seems to be working fine. However, I am really struggling in
interpretating the loadings of PCA, so I can answer questions like:
"What features of the body sizes do the first few components reflect?"
So for my R Analysis - following is what I have done:
body.pc <- princomp(bodysize,cor=T)
summary(body.pc)
body.pc$loadings
print(body.pc$loadings,cutoff=0.1,digits=1)
The book suggests that the answer to the above question should be:
it is easy to see that the first component reflects variations in overall
size
of body; the second contrasts arm size (mostly) with body and leg size;
the
third contrasts leg with rest of body, and the fourth is body against
limbs. If
we plot PC1 against PC2 (i.e., scores on first component against those on
the
second) with
plot(body.pc$scores[,2],body.pc$scores[,1])
we can see one outlier at the bottom of the plot and two to the left.
Noting
the signs of the loadings on the first component (vertical axis), we can
see that
the outlier at the bottom arises from a subject with large measurements.
The
two outliers to the left are from people of average size but with
proportionately
well-developed arms by comparison with their legs. Using identify() gives
identify(body.pc$scores[,2],body.pc$scores[,1])
which reveals that these outliers are observations 39 (lower) and 31 and
86
(rightmost).
But I am really struggling to see how the first component reflect
variations in overall size and the second in arm and so on forth. Please
help?
Also when I try to use the "identify" function in R, all I get is "no
point with 0.25m" or R crashes. How does one use the "identify" function
in R?
Thanks in Advance
***********************************************************************************************************************************************************************************************************************
MORE TH>N is a trading style of Royal & Sun Alliance Insurance plc (No. 93792). Registered in England and Wales at St. Mark’s Court, Chart Way, Horsham, West Sussex, RH12 1XL.
Authorised by the Prudential Regulation Authority and regulated by the Financial Conduct Authority and the Prudential Regulation Authority.
************************************************************************************************************************************************************************************************************************
***********************************************************************************************************************************************************************************************************************
MORE TH>N is a trading style of Royal & Sun Alliance Insurance plc (No. 93792). Registered in England and Wales at St. Mark’s Court, Chart Way, Horsham, West Sussex, RH12 1XL.
Authorised by the Prudential Regulation Authority and regulated by the Financial Conduct Authority and the Prudential Regulation Authority.
************************************************************************************************************************************************************************************************************************
More information about the R-help
mailing list