[R] Can't reproduce clusplot princomp results.

From: Thomas M. Parris <parris_at_isciences.com>
Date: Tue 24 May 2005 - 04:01:38 EST


Dear R folk:

Perhaps I'm just dense today, but I am having trouble reproducing the principal components plotted and summarized by clusplot. Here is a brief example using the pluton dataset. clusplot reports that the first two principal components explain 99.7% of the variability. But this is not what princomp is reporting. I would greatly appreciate any advice.

With best regards,
-- Tom

> R.version

         _
platform i386-pc-mingw32

arch     i386           
os       mingw32        
system   i386, mingw32  
status                  
major    2              
minor    0.1            
year     2004           
month    11             
day      15             
language R         

> require("cluster")

[1] TRUE
> pluton.agnes <- agnes(pluton)
> clusters <- cutree(as.hclust(pluton.agnes), h=4.00)
> clusplot(pluton, clusters, lines=0)
> pca <- princomp(pluton, cor=TRUE)
> loadings(pca)

Loadings:

      Comp.1 Comp.2 Comp.3 Comp.4

Pu238  0.521  0.348  0.714  0.313
Pu239 -0.540                0.837
Pu240  0.418 -0.835         0.353
Pu241  0.512  0.418 -0.698  0.277

               Comp.1 Comp.2 Comp.3 Comp.4
SS loadings      1.00   1.00   1.00   1.00
Proportion Var 0.25 0.25 0.25 0.25 Cumulative Var 0.25 0.50 0.75 1.00

R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Tue May 24 04:08:19 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:32:00 EST