[R] deconvoluting hclust objects

From: Karin Lagesen <karinlag_at_studmed.uio.no>
Date: Thu, 22 May 2008 13:20:26 +0200

I have a hclust object that looks like this:

> test77

Call:
hclust(d = input)

Cluster method : complete
Number of objects: 11

> test77$height
[1] 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.9000000
[8] 0.9473684 1.7894737 8.5771948

> test77$merge

      [,1] [,2]
[1,] -1 -2
[2,] -3 1
[3,] -7 2
[4,] -8 3
[5,] -4 -6
[6,] -5 -10
[7,] -9 5
[8,] -11 4
[9,] 7 8
[10,] 6 9
>

I am specifically interested in what happens when you divide this object into three clusters. When I look at the plot, the three clusters form like this: (monospace font)


    |        |
    |       ----
    |       |  |
    2       3  6

What I am wanting is to get distance information on the three groups, and also the number of objects in each. The distances I need are in height, but I don't know how to get at the sizes of the subtrees.

I know I can use cutree to get at the cut, but I cannot see anything systematic in which group becomes group no 1 and so forth.

The results I want would in this example be:

2 3 6 8.5771948 1.7894737

Any hints for me?

Thanks!

Karin

-- 
Karin Lagesen, PhD student
karin.lagesen_at_medisin.uio.no
http://folk.uio.no/karinlag

______________________________________________
R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Thu 22 May 2008 - 12:22:42 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 22 May 2008 - 13:30:39 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive