[BioC] PCA-prcomp() versus plotPCA

marco fabbri fabbri.marco at gmail.com
Tue Nov 14 16:33:57 CET 2006


Hi James,
  thank you for the quick reply.
More than plot all the three PCs, I would like to decide which two to
plot, for example to plot PC2 versus PC3.
If you are implementing please let me know I will use for sure.

Marco

On 14/11/06, James W. MacDonald <jmacdon at med.umich.edu> wrote:
> Hi Marco,
>
> marco fabbri wrote:
> > Two question on PCA:
> >
> > 1. I like plotPCA from affycoretools package, but I was not able to
> > plot the third component.
> > Am I wrong?
>
> No you are not wrong. By default plotPCA() only does the first two
> principal components. If there is interest I could easily add the
> capability to do the first three PCs and plot using scatterplot3D.
>
> >
> > 2.I try the prcomp() function and  I compared it to plotPCA.
> >
> > TesetA=t(exprs(esetA))
> > pca=prcomp(TAM,  retx=TRUE,center=TRUE, scale= TRUE)
> > plot(pca$x[,1:2])
> > --------
> > plotPCA(esetA,groups=c(1:10))
> >
> > I had different plots.
> > Can please help me to understand better what  plotPCA is doing?
>
> plotPCA() is using the default arguments to prcomp(), which includes
> scale.=FALSE. Usually one wants to scale data prior to performing the
> PCA if the data are on different scales. However, most Affy data are
> normalized which should put the data on similar scales, so I just stick
> with the default.
>
>
> HTH,
>
> Jim
>
>
> >
> >
> > Thank you
> > MArco
> >
>
>
> --
> James W. MacDonald, M.S.
> Biostatistician
> Affymetrix and cDNA Microarray Core
> University of Michigan Cancer Center
> 1500 E. Medical Center Drive
> 7410 CCGC
> Ann Arbor MI 48109
> 734-647-5623
>
>
> **********************************************************
> Electronic Mail is not secure, may not be read every day, and should not be used for urgent or sensitive issues.
>


-- 
---------------------------------------
Marco Fabbri
Istituto Clinico Humanitas
via Manzoni, 52
20089 Rozzano (Mi)
Tel. 028224 5152
Fax 028224 5101



More information about the Bioconductor mailing list