[BioC] A question about PCA on microarray data
rdiaz at cnio.es
Mon Nov 15 13:12:50 CET 2004
On Thursday 11 November 2004 17:01, Johan Lindberg wrote:
> I have a question about principal component analysis on microarray data.
> I found two functions for doing PCA, princomp and prcomp.
> The calculation in prcomp is done by a singular value decomposition
> which is not what I want to do.
Why? prcomp uses svd because of numerical stability issues, and using svd is a
standard way of doing PCA. The help for princomp says:
The calculation is done using 'eigen' on the correlation or
covariance matrix, as determined by 'cor'. This is done for
compatibility with the S-PLUS result. A preferred method of
calculation is to use 'svd' on 'x', as is done in 'prcomp'."
> The problem with princomp is that the function seems to scale the data
> by default. Since I am dealing with log rations there is no reason to
> scale the data because it is on a comparable scale. Is there some way of
> doing PCA in R on microarray data without having to scale the data?
if you do ?prcomp
you'll see you can set the "scale." argument to FALSE.
> Best regards
> // Johan Lindberg
> [[alternative HTML version deleted]]
> Bioconductor mailing list
> Bioconductor at stat.math.ethz.ch
Centro Nacional de Investigaciones Oncológicas (CNIO)
(Spanish National Cancer Center)
Melchor Fernández Almagro, 3
28029 Madrid (Spain)
PGP KeyID: 0xE89B3462
More information about the Bioconductor