x <- data.frame(a=rnorm(100), b=rnorm(100), d=rnorm(100))

prcomp(x, scale=T)
prcomp(scale(x), scale=F)

The above will give you the same thing.  This should be the case because 
the correlation matrix is the same as the covariance of the scaled and 
centered original data.

FWIW

Stephen


On 02/29/2012 08:52 AM, Blaz Simcic wrote:
> Dear R buddies,
> IâEUR^(TM)m trying to run Principal Component Analysis, package
> princomp: 
> http://stat.ethz.ch/R-manual/R-patched/library/stats/html/princomp.html.
> My question is: why do I get different results with pca =
> princomp (x, cor = TRUE) and pca = princomp (x, cor = FALSE) even when I
> standardize variables in my matrix?
> Best regards,
> Blaž SimÄ?iÄ?
>       [[alternative HTML version deleted]]
>
>
>
> ______________________________________________
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

-- 
Stephen Sefick
**************************************************
Auburn University
Biological Sciences
331 Funchess Hall
Auburn, Alabama
36849
**************************************************
sas0...@auburn.edu
http://www.auburn.edu/~sas0025
**************************************************

Let's not spend our time and resources thinking about things that are so little 
or so large that all they really do for us is puff us up and make us feel like 
gods.  We are mammals, and have not exhausted the annoying little problems of 
being mammals.

                                 -K. Mullis

"A big computer, a complex algorithm and a long time does not equal science."

                               -Robert Gentleman



        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to