The dataset I use to construct the attached dendrogram contains no cells with a dissimilarity value below 0.3. I therefore want to shrink the length of the tree branches so they range from 0.3 to 1. But no matter what I do the branches always range from 0 to 1.

The dataset is at the very bottom for replication purposes

Here are the commands to generate the dendrogram:

Code:
matrix dissimilarity fields = antrst_d-injury_p, Kulc variables dissim(oneminus)
clustermat completelinkage fields, name(dend) clear labelvar(field) force

gen label="antitrust: defense" if _n==1
replace label="litigation" if _n==2
replace label="real estate" if _n==3
replace label="tax" if _n==4
replace label="labor: management" if _n==5
replace label="securities" if _n==6
replace label="antitrust: plaintiffs" if _n==7
replace label="banking" if _n==8
replace label="commercial" if _n==9
replace label="general corporate" if _n==10
replace label="personal injury: defense" if _n==11
replace label="labor: unions" if _n==12
replace label="patents" if _n==13
replace label="public utilities" if _n==14
replace label="criminal prosecution" if _n==15
replace label="municipal" if _n==16
replace label="probate" if _n==17
replace label="civil rights" if _n==18
replace label="criminal defense" if _n==19
replace label="divorce" if _n==20
replace label="general family" if _n==21
replace label="personal injury: plaintiffs" if _n==22

cluster dendrogram dend, horizontal ylabel(, labsize(*.75) angle(0)) labels(label) yscale(alt) xlabel(.3 .4 .5 .6 .7 .8 .9 1) xscale(range(.3 1) noextend reverse) plotregion(style(none)) title("")
As you can see, the "range" option doesn't change anything. Is there a way to cut out the portions of the branches below 0.4?
Array


It would also be nice to be able to suppress the horizontal line connecting the clusters at dissimilarity=1.0 (and the vertical lines connecting the clusters to this horizontal line). Doing so would bring the clusters into higher relief.

Many thanks!

Ethan Michelson


Here's the dataset:

Code:
* Example generated by -dataex-. To install: ssc install dataex
clear
input byte antrst_d float(litigati real_est tax) byte(lab_man securiti antrst_p banking commerci gen_corp injury_d lab_unio patents_ pub_util crim_pro municipa probate civil_ri crim_def divorce gen_fami injury_p) int var001
0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 101
0 0 0 1 0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 1 1 0 102
0 0 0 1 0 0 0 1 1 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