[BioC] PCA-3D Plot

Steve Lianoglou lianoglou.steve at gene.com
Mon Jul 1 20:41:12 CEST 2013


Hi,

On Mon, Jul 1, 2013 at 11:07 AM, Veera Venkata Satyanarayana
<veeru.vsn at gmail.com> wrote:
> Dear,
> Yes, Its worked with function "prcomp":
>> PCA_3d<-prcomp(t(Normalized_Expresso), cor=TRUE)
>
> Here is the Question:
> while ploting the object PCA_3d with scatterplot3d from
> package:scatterplot3d, the x,y,z coordinates were given as PCA_3d$x[,1:3],
> but the PCA_3d$x has 7 PC components (columns) and 7 samples as rows. If I
> give the first three PC components [PC1, PC2, PC3] as coordinates, I
> insists to know about other PCs like [PC4,PC5, PC6, PC7]. Out of all which
> gives the best reliable pattern of samples on the plot.

I didn't actually catch the question here.

Do you want to try all possible pairs of 3 axes to see which is
"best"? Just change the `[,1:3]` to include the PC's that you like
(you are picking 1,2,3) to see which you think does better.

Generally speaking, you should expect to get the best separation using
the first three PCs since PC1 explains more of the variance than PC2,
and PC2 > PC3, etc. but feel free to experiment as you like.

James' suggestion to use rgl is a good one -- often times spinning the
plot around interactively is quite helpful.

-steve

--
Steve Lianoglou
Computational Biologist
Bioinformatics and Computational Biology
Genentech



More information about the Bioconductor mailing list