Re: [R] princomp and eigen

From: Bjørn-Helge Mevik <bhs2_at_mevik.net>
Date: Sun 16 Jul 2006 - 14:29:12 EST

Murray Jorgensen wrote:

> > set.seed(160706)
> > X <- matrix(rnorm(40),nrow=10,ncol=4)
> > Xpc <- princomp(X,cor=FALSE)
> > summary(Xpc,loadings=TRUE, cutoff=0)
> Importance of components:
> Comp.1 Comp.2 Comp.3 Comp.4
> Standard deviation 1.2268300 0.9690865 0.7918504 0.55295970
[...]
>
> I would have expected the princomp component standard deviations to be
> the square roots of the eigen() $values and they clearly are not.

It's an 1/n vs. 1/(n-1) thing:

> eX <- eigen(var(X))
> sqrt(eX$values)

[1] 1.2931924 1.0215069 0.8346836 0.5828707
> sqrt(9/10 * eX$values)

[1] 1.2268300 0.9690865 0.7918504 0.5529597

-- 
Bjørn-Helge Mevik

______________________________________________
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 Sun Jul 16 14:33:03 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Sun 16 Jul 2006 - 16:15:23 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.