help dhm

Title

dhm -- DHM Dendrogram-informed heatmap for distance matrices

Syntax

dhm varname , DISTmat(string) IDvar(varname) [ *]

options

Required
distmat(matname) names the distance matrix

idvar(varname) identifies the variable that links the sort-order of the distance matrix to the sort-order of the data

Optional
BY(varname) Grouping variable, typically the cluster group

ORDER(varname) Variable defining order within groups

LEVELS(real) The number of levels of the heat variable

BOX Draw boxes around the clusters

twoway_options options allowed with graph twoway

Description

dhm draws a heatmap, using the pairwise
distance matrix given in the distmat option, optionally grouped and ordered.

Remarks

The distance matrix can be generated from variables using the matrix dissimilarity command (see example).
However, if you have a pairwise distance matrix created otherwise (e.g., using sequence analysis) you can use that directly.

Because the order of the data and the order of the distance matrix
must coincide, the dataset must be sorted by idvar. It is the
user's responsibility that this variable defines the correct order.

Note that except for smaller data sets, this command is slow.

Author

Brendan Halpin, brendan.halpin@ul.ie

Examples

Using NLSW88, clustering on variables:

. sysuse lifeexp

. keep if !missing(gnppc)

. sort country

. cluster wards popg-gnppc

. cluster generate g5=groups(5)

. matrix dissim dd = popg-gnppc

. dhm, dist(dd) id(country) by(g5)

See Also

cluster stop

calinski

dudahart

SADI