Question: Height Of The Hcluster Dendrogram In R
1
5.7 years ago by
Shuixia100100
HK
Shuixia100100 wrote:

Hi there,

when I tried to do hcluster in R While I am expecting some dissimilarity value of 0 to 1 in the height, I got a Dendrogram like below! Could any one help explain the height in the dendrogram. And how could i get dissimilarity value of 0 to 1 in hcluster of R

R • 3.6k views
modified 9 days ago by Biostar ♦♦ 20 • written 5.7 years ago by Shuixia100100
0
5.7 years ago by
Thaman3.2k
Finland
Thaman3.2k wrote:

I think this should work

plot(hclust(d), hang=1, labels=groups)

Not working, I thought hang is to control the height between label and the tree but not the height of the Dendrogram

0
6 months ago by
Kevin Blighe17k
University College London Cancer Institute
Kevin Blighe17k wrote:

My guess is that you have used the default distance metrix of Euclidean distance, which are on a scale that go beyond 0 to 1.

If you re-do the dendrogram with Pearson correlation values, then you should see a tree height of just 0 to 1. To do this, you have to create your own function, something like this: function(x) 1-cor(t(x))