[BioC] A question about PCA on microarray data

Ramon Diaz-Uriarte rdiaz at cnio.es
Mon Nov 15 13:12:50 CET 2004


Dear Johan,

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,

R.

>
> Best regards
>
> // Johan Lindberg
>
>
>
>  [[alternative HTML version deleted]]
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/bioconductor

-- 
Ramón Díaz-Uriarte
Bioinformatics Unit
Centro Nacional de Investigaciones Oncológicas (CNIO)
(Spanish National Cancer Center)
Melchor Fernández Almagro, 3
28029 Madrid (Spain)
Fax: +-34-91-224-6972
Phone: +-34-91-224-6900

http://ligarto.org/rdiaz
PGP KeyID: 0xE89B3462
(http://ligarto.org/rdiaz/0xE89B3462.asc)



More information about the Bioconductor mailing list