1

I would like to produce some nice PCA plots in R. As usual, in R, there are several ways to perform a principal component analysis. I found so far 3 different ways of how to calculate your components and 3 ways of plotting them. I was wondering whether people who are familiar with these functions can give me some advise on the best combination of functions to produce the following plots:

  • Scores Plot
  • Loadings Plot
  • Histogram / Bar chart of the variances explained by each principal component

My research on functions and plots used for PCA in R resulted in:

Functions:

  • pca.xzy()
  • prcomp()
  • princomp()
  • dudi.pca()

Plot:

  • plot.pca (this one seems to belong to the function pca.xzy())
  • ggplot2
  • plot
  • biplot

I also found the following webpage:

http://pbil.univ-lyon1.fr/ade4/ade4-html/dudi.pca.html

And I was wondering if you can draw those circles and lines starting from each of the circle centers with one of the other functions mentioned above as the function dudi.pca from the ade4 package seems to be the most complicated one.

4

1 回答 1

2

请一题一题!有psychWilliam Revelle 的包,看这个这个这里也有一个很好的教程。反正...

  • 分数/负荷图见pairs
  • 直方图:见hist

所以再一次,你的问题是什么?=)

于 2012-07-26T10:55:10.557 回答