Skip to content

loadings or summary in Principal components

2 messages · Adrian Katschke, Bert Gunter

#
(R 2.0.1)

summary() gives the correct results.

The print.loadings() print method is just giving the squared length of each
of the eigenvectors, which is 1 by definition, of course. I don't know
whether this is a bug or intentional, but it certainly seems silly. 

In general, it is good practice to use summary() and other supplied
extraction methods for obtaining information about a fitted object rather
than directly accessing the components themselves (however, I, too, often
violate this rule of thumb).

Finally, prcomp() is the preferred way of doing PCA in R, as the princomp
documentation says. The fit object has no "loadings" component and therefore
no problem.


-- Bert Gunter
Genentech Non-Clinical Statistics
South San Francisco, CA
 
"The business of the statistician is to catalyze the scientific learning
process."  - George E. P. Box