7
$\begingroup$

I am often disappointed with PCA plots in the scientific literature. Typically PCA plots do not provide a breakdown of the variables and their weights, just something like PCA1 (70% variance explained), PCA2 (10% variance explained). How could one tell which variables are strongly loaded into a component?

Are there PCA visualizations that can provide more insight into the data?

$\endgroup$
4
  • 2
    $\begingroup$ The components $\psi$ given by the spectral decomposition of the covariance function: $C(x_i,x_j) = \Sigma_k \lambda_k \psi_k(x_i)\psi_k(x_j)$ are themselves linear combinations of the original modes of variation in the sample. I guess that simply examining the correlations between the projections/scores $A$, $A_l = \Sigma_i \{Y_l(x_i) - \mu(x_i) \} \psi_k$, associated with a specific $\psi$ (what you call weights I think) and each original variable will give you the answer you want. So... a bar chart for each component? :D Simple and understandable from all? $\endgroup$
    – usεr11852
    Commented Jun 18, 2013 at 17:09
  • 2
    $\begingroup$ cran.r-project.org/web/packages/pca3d/pca3d.pdf Try the pca3d package in R. That might be of some help. $\endgroup$ Commented Jun 18, 2013 at 17:21
  • 1
    $\begingroup$ You could render % of variance explained for example by thickness of the component lines on a loading plot or a PCA's biplot. Something like here. $\endgroup$
    – ttnphns
    Commented Jun 18, 2013 at 17:44
  • $\begingroup$ There's these plots $\endgroup$
    – Glen_b
    Commented Jul 7, 2013 at 12:14

3 Answers 3

9
$\begingroup$

In my humble opinion, it depends on what you want out of the PCA, but that there are two simple plots that are quite common and might be helpful:

  • To know which variables have high loadings in which principal component, a simple barplot of loadings (as small multiples) will display this pretty clearly.

  • To look for patterns between samples a scatterplot of scores can sometimes help (e.g. in genetics when you've genotyped a bunch of individuals, a scatterplot of PC1 and PC2 is usually used to look for population patterns).

If you know variable or sample groupings a priori, colour the dots and bars.

Cheers,

m.

ps. I hope it's not bad form to include links, but I've written a small post about these plots and making them in my favourite software. http://martinsbioblogg.wordpress.com/2013/06/26/using-r-two-plots-of-principal-component-analysis/

$\endgroup$
2
  • $\begingroup$ +1 and welcome to this site! Your link is certainly welcome as it provides useful code and illustrations but your answer is still useful without it (i.e. it's a real answer, not spam or a way to push your website). However, I think a biplot is something slightly different than a scatterplot of scores, I don't see any in your blogpost. $\endgroup$
    – Gala
    Commented Jun 27, 2013 at 9:48
  • $\begingroup$ Thank you! And yes, you are right about the biplot. I should've written "a part of the so-called biplot" or somethink akin, since the scatterplot contains only the data points, not the arrows. Mostly because I personally don't find them very helpful. $\endgroup$ Commented Jun 27, 2013 at 11:46
5
$\begingroup$

Here are a few clues.

  1. Depending on what the variables are, the loadings themselves can be very informative. For example, in PCAs derived from gene expression data, I can use the loadings in combination with Gene Ontology to test for enrichment of particular terms in the variables with large absolute loadings.

  2. Biplots are very useful if you have just a few variables, as they can neatly visualise which variables are important for which component. However, they are not very practical if there are too many variables (my package, pca3d, allows to select N "top" variables from each component to be shown of the plot; it's called "pca3d" but also has a "pca2d" function for regular 2D plots).

  3. If you have categorical variables that group the samples into different groups, then simply colouring the points on a standard plot can be very informative (this is the main purpose of pca3d).

$\endgroup$
2
  • $\begingroup$ can you post some visual examples of pca3d in action? $\endgroup$
    – jermdemo
    Commented Jun 27, 2013 at 13:24
  • 2
    $\begingroup$ I have posted it here - logfc.wordpress.com/2013/06/26/pca3d $\endgroup$
    – January
    Commented Jun 27, 2013 at 14:16
3
$\begingroup$

I find biplots very useful. A biplot represents both the variables and the observations in a space defined by two (or three) components. The length and direction of the vector representing each variable tell you how much it loads on these two components, directly addressing the question at the end of the first paragraph.

You can find more information on Wikipedia and many examples/code through google.

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.