[R] weird results w/ prcomp-princomp
Jari Oksanen
jarioksa at sun3.oulu.fi
Fri Apr 8 11:37:41 CEST 2005
On Fri, 2005-04-08 at 11:12 +0200, Alessandro Bigi wrote:
> I am doing a Principal Component Analaysis (PCA) on a 44x19 matrix.
> with
> > princomp(x,cor=TRUE,scores=TRUE)
> and
> > prcomp(x,scale=TRUE,center=TRUE)
> The resulted eigenv. and rotated matrix are the same (as expected), however
> the sum of eigenvalues is lower than 19 (number of variables).
What about the sum of squared sdev? (Hint, the "prcomp" help page says
that the returned sdev are the square root of the eigenvalues. While
"princomp" help does not say this explicitly, it says that "sdev" are
standard deviations).
cheers, jari oksanen
--
Jari Oksanen -- Dept Biology, Univ Oulu, 90014 Oulu, Finland
Ph. +358 8 5531526, cell +358 40 5136529, fax +358 8 5531061
email jari.oksanen at oulu.fi, homepage http://cc.oulu.fi/~jarioksa/
More information about the R-help
mailing list