help clustermat
-------------------------------------------------------------------------------
Title
[MV] clustermat -- Introduction to clustermat commands
Syntax
clustermat linkage matname ...
linkage description
-------------------------------------------------------------------------
singlelinkage single-linkage cluster analysis
averagelinkage average-linkage cluster analysis
completelinkage complete-linkage cluster analysis
waveragelinkage weighted-average linkage cluster analysis
medianlinkage median-linkage cluster analysis
centroidlinkage centroid-linkage cluster analysis
wardslinkage Ward's linkage cluster analysis
-------------------------------------------------------------------------
See [MV] cluster linkage.
clustermat stop has similar syntax to that of cluster stop; see [MV]
cluster stop. For the remaining postclustering subcommands and user
utilities, you may specify either cluster or clustermat -- it does not
matter which.
Description
clustermat performs hierarchical cluster analysis on the dissimilarity
matrix matname. clustermat is part of the cluster suite of commands; see
> [MV] cluster. All Stata hierarchical clustering methods are allowed
with clustermat. The partition-clustering methods (kmeans and kmedians)
are not allowed because they require the data.
See [MV] cluster for a listing of all the cluster and clustermat
commands. The cluster dendrogram command ([MV] cluster dendrogram) will
display the resulting dendrogram, the clustermat stop command (see [MV]
clustermat stop) will help in determining the number of groups, and the
cluster generate command (see [MV] cluster generate) will produce
grouping variables. Other useful cluster subcommands include notes, dir,
list, drop, use, rename, and renamevar; see [MV] cluster notes and [MV]
cluster utility.
Examples
Setup
. webuse wclub
. matrix dissimilarity clubD = , variables Jaccard dissim(oneminus)
Examine portion of dissimilarity matrix
. matlist clubD[1..5, 1..5]
Perform single linkage heirarchical clustering, clearing dataset in
memory
. clustermat singlelinkage clubD, name(singlink) clear
. cluster dendrogram singlink
Perform Ward's linkage heirarchical clustering, adding to results in
memory
. clustermat wardslinkage clubD, name(wardslink) add
. cluster dendrogram wardslink
Also see
Manual: [MV] clustermat
Help: [MV] cluster, [MV] cluster programming utilities