[R] Multiv / pb with clustering methods?

Friedrich Leisch Friedrich.Leisch at ci.tuwien.ac.at
Thu Aug 31 18:16:20 CEST 2000

>>>>> On Thu, 31 Aug 2000 17:50:13 +0100,
>>>>> Charles Raux (CR) wrote:

CR> Le 31 Aug 00 à 12:26, Winfried Theis écrivait:
>> you may try hclust in mva it does have plot.hclust as default plotting
>> routine which does a dendrogram. 

CR> plot.hclust with a result of hierclust produces a strange figure with 
CR> an orphan vertical line (with my data) while with hclust it works 
CR> well. 

hmm, plot.hclust works on hierclust objects for me ... could you
supply data such that I can reproduce the bug?

>> functions "diana" and "agnes" in the library cluster which do both hierarchicle
>> clustering and have default plot routines which offer a dendrogram as well as
>> another useful graphic called "banner" for details see Kaufman and Rousseeuw
>> (1990) "Finding Groups in Data", Wiley, New York.

CR> It seems impossible to use plot.agnes with a result of hierclust.

the structure of agnes objects is a little bit different than hclust
objects ... in mva you find a conversion utility called as.hclust
which transforms agnes objects into hclust objects.

CR> In fact my question about availability of dendrogram plotting *with 
CR> hierclust* is motivated by a memory issue. As far as I understand 
CR> hierclust is the only one which manages large data set


CR> A more troubling issue is that I have checked the same data (18 obs, 
CR> 3 var) with the 3 functions and the same method (ward). This does 
CR> not give the same results (height) and the same hierarchy:
>> library(mva)
>> library(multiv)
>> library(cluster)
>> h<-hclust(dist(col),method="ward")
>> hc<-hierclust(data.matrix(col),method=1)
>> ag<-agnes(col,method="ward")
>> h$height
CR>  [1] 0.005221242 0.009670544 0.010135010 0.017487202 0.019811790
CR>  0.028691132 [7] 0.030891092 0.035334642 0.051179115 0.056848540
CR>  0.057858657 0.073317828
CR> [13] 0.152969145 0.228699576 0.269021808 0.659097143 0.756180840
>> hc$height
CR>  [1] 1.363068e-05 9.811893e-05 5.135922e-05 1.001958e+00 1.962535e-04
CR>  [6] 3.071681e-04 4.115905e-04 1.301867e-03 8.769330e-04 1.061292e-03
CR> [11] 1.673812e-03 1.859374e-03 9.444782e-03 2.431675e-02 2.924522e-02
CR> [16] 7.656077e-02 9.686475e-02 
>> ag$height
CR>  [1] 0.005221242 0.046071504 0.009670544 0.029152501 0.220530047
CR>  0.383204909 [7] 0.017487202 0.060143295 0.010135010 0.121114212
CR>  0.028691132 0.423073789
CR> [13] 0.019811790 0.035322842 0.051418163 0.183578860 0.057858657

CR> Why?

A good question ... I'll have to dig into that (I just tried and there
are also differences using average linkage).

r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch

More information about the R-help mailing list