help clpam

Title

clpam -- Partitioning Around Medoids from distance matrix

Syntax

clpam newvarname, DISTmat(string) IDvar(varname) MEDoids(string) [MANY GA NONVORonoi]

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

medoids Either the number of clusters, or a binary variable marking pre-chosen initial medoids

Description

clpam carries out Partitioning Around Medoids (PAM) clustering, from the pairwise distance matrix.

PAM or k-medoid clustering is a non-hierarchical approach to
clustering data. Starting with k initial cases ("medoids", chosen either
at random or according to prior knowledge), the data is partitioned into
k clusters such that each case is in the cluster of its closest medoid.
Then iteratively each medoid is replace with another case that
summarises its cluster better (i.e., the sum of its distance to each
other case is less), and cases are re-assigned to clusters, until a
stable clustering emerges. The Voronoi variant of the algorithm (the
default without the nonvoronoi option) replaces the medoid with
the best alternative, which gives a faster result but may be more
vulnerable to returning a local minimum.

The default is to start from random cases assigned as medoids (or
the cases designated by the medoids option, if a variable is
submitted to it), and iterate to a solution. Because it is easy to find
local maxima, two alternatives are offered: (i) the many option
selects the best result starting from 100 random medoid sets, and (ii)
the ga option uses a genetic algorith to search for a good solution.

Remarks

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

Author

Brendan Halpin, brendan.halpin@ul.ie

Examples

. clpam k4, dist(distances) id(id) medoids(4)

See Also

getmedoids

calinski

dudahart

discrepancy

SADI