[R] prcomp help: is this a typo?

Ramon Diaz-Uriarte rdiazuri at students.wisc.edu
Fri Jun 16 08:40:36 CEST 2000


Thanks to Prof. Ripley for his answer (and apologies for not having checked
things in 1.1.0).

Ramon


On Fri, 16 Jun 2000, Prof Brian D Ripley wrote:
> On Thu, 15 Jun 2000, Ramon Diaz-Uriarte wrote:
> 
> > Dear All,
> > 
> > The help for prcomp, under "Value" says:
> > 
> >     sdev: the standard deviation of the principal components (i.e., the
> >           eigenvalues of the cov matrix, though the calculation is
> >           actually done with the singular values of the data matrix).
> > 
> > The way I read it, it implies that the sdev are the eigenvalues, but  I think
> > that sdev is actually the square root of the eigenvalues ( from looking at,
> > say, pp. 317 and 318 in Morrison's (1990) "Multivariate statistical methods" or
> > pp. 61 to 63 of Krzanowski's (1990) "Principles of multivariate analysis"; or by
> > comparing the output of 
> > > prcomp(my.data,  scale = TRUE)
> > 
> > with the brute force
> > 
> > > eigen(cor(my.data))
> > )
> 
> Take a look at 1.1.0.  That has been altered to be
> 
>     sdev: the standard deviations of the principal components (i.e.,
>           the square roots of the eigenvalues of the
>           covariance/correlation matrix, though the calculation is
>           actually done with the singular values of the data matrix).
> 
> Thank you for pointing it out.  As your example show, the correlation
> matrix is appropriate if scale.=TRUE. (And if center=FALSE it is an
> uncentred cov/cor matrix.)
> 
> -- 
> Brian D. Ripley,                  ripley at stats.ox.ac.uk
> Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
> University of Oxford,             Tel:  +44 1865 272861 (self)
> 1 South Parks Road,                     +44 1865 272860 (secr)
> Oxford OX1 3TG, UK                Fax:  +44 1865 272595
> 
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
> Send "info", "help", or "[un]subscribe"
> (in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
-- 
Ramón Díaz-Uriarte
Dept. Zoology and Statistics
University of Wisconsin-Madison
Madison, WI 53706-1381

email: rdiazuri at students.wisc.edu
(NOTE: starting 15-July-2000 new email:
ramon-diaz at teleline.es)
phone: 608-238-8041
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list