RE: [R] loadings or summary in Principal components

From: Berton Gunter <gunter.berton_at_gene.com>
Date: Fri 01 Apr 2005 - 04:22:04 EST


(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.

"The business of the statistician is to catalyze the scientific learning process." - George E. P. Box    

> -----Original Message-----
> From: r-help-bounces@stat.math.ethz.ch
> [mailto:r-help-bounces@stat.math.ethz.ch] On Behalf Of Adrian Katschke
> Sent: Thursday, March 31, 2005 7:47 AM
> To: RHelp
> Subject: [R] loadings or summary in Principal components
>
> May be a simple question, but not understanding why in
> princomp I get different results for loadings and summary for
> my eigenvectors and eigenvalues.
>
> When I use pc.cr$loadings using the USArrests dataset the
> proportion of variance is equal for each of the components,
> but when summary(pc.cr) is used the proportion of variance is
> showing different proportions. My question is why do they
> differ? I thought that they would report the same thing?
>
> Thanks in advance for clearing this confusion for me.
> Adrian Katschke
>
>
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide!
> http://www.R-project.org/posting-guide.html
>



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Fri Apr 01 04:37:44 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:30:58 EST