Principal Component Analysis: Which variables contribute most to principal components ?

November 23, 2010
By

(This article was first published on Recipes, scripts and genomics, and kindly contributed to R-bloggers)

Principal component analysis (PCA) is a mathematical transformation of possibly(correlated) variables into a number of uncorrelated variables called principal components. The resulting components from this transformation is defined in such a way that the first principal component has the highest variance and accounts for as most of the variability in the data (see http://wapedia.mobi/en/Scree_plot)

For each principal component you can see which variables contribute
most to that component. Depending on what you used to do PCA in R, you
can use loadings() function. Loadings function gives a matrix that
shows how each variable contribute to the principal components. You
can do barplots for each principal component. That will visualize what
contributes to which principal component.  You should do the barplots
for absolute values in the loadings matrix.

Take a look at the sources below, especially the second one

check here basic usage of PCA function in R
http://www.ysbl.york.ac.uk/~garib/mres_course/R_commands_for_PCA.html

check here for detailed explanation on loadings()
especially check the section : "How do we know which species
contribute to which axes? We look at the component loadings (or
"factor loadings"): "
http://ordination.okstate.edu/PCA.htm

To leave a comment for the author, please follow the link and comment on his blog: Recipes, scripts and genomics.

R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...



If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Comments are closed.