help dudahart

Title

dudahart -- Duda-Hart cluster stopping index from distance matrix

Syntax

dudahart , DISTmat(string) IDvar(varname) [NGroups(integer 15) NAME(clname) GRaph *]

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
ngroups The number of cluster solutions to test (default 15)

name Name of cluster analysis to use

graph If "both" plot the DH index and T-squared against cluster size, if "dh" the index only, if "dht" the T-squared only.

twoway_options options allowed with graph twoway

Description

dudahart calculates the Duda-Hart index for
stopping rules in cluster analysis, from the pairwise distance matrix.
This is widely used to determine the optimum number of clusters. Stata's
default cluster stop does the same calculation on the basis of the
original variables, but cannot operate on the distance matrix.
dudahart is thus useful when the original variables are not
available, or when the distances are created other than as squared
Euclidean distances between variables (as is the case for instance with
sequence analysis).

NB: Stata's built-in
clustermat stop, variables(...) rule(duda) does not estimate the DH index on the distance matrix
used by clustermat. Rather, it creates a new temporary distance
matrix based on the variables listed in the variables() option.

Returns:

r(duda_#) Duda-Hart Je(2)/Je(1) value for # groups

r(dudat2_#) Duda-Hart pseudo-T-squared value for # groups

Remarks

While cluster stop, rule(duda) and
clustermat stop, variables(...) rule(duda) estimate the Duda-Hart index from the original
variables of the cluster solution, and are therefore explicitly rooted in a
squared-Euclidean distance point of view, dudahart takes the distances
as they are given in the supplied distance matrix. If they are squared distances based on the
original variables, the results will be identical to cluster stop. If they are squared
Euclidean distances from another source, the interpretation will be the same. If there are other
sorts of differences (e.g., non-Euclidean) the interpretation is not necessarily the same, but can
be understood to be analogous, in the same way as the discrepancy partitioning of the
distance matrix (described by Studer et al 2011) is analogous to ANOVA.

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.

References

Milligan, G. W., and M. C. Cooper. 1985. An examination of procedures for determining the number of clusters in a dataset. Psychometrika 50: 159-179.

M Studer, G Ritschard, A Gabadinho and NS Müller, Discrepancy analysis of state sequences, Sociological Methods and Research, 40(3):471-510

Author

Brendan Halpin, brendan.halpin@ul.ie

Examples

. dudahart, dist(distances) id(id) graph(dht)

See Also

cluster stop

silhouette

calinski

discrepancy

SADI