Calculating medoids
-------------------
medoid ^varlist^ if ^exp^ in ^exp^ [weight], group(^groupvar^) [dist(#)]
The program ^medoid^ takes as input a set of variables and a grouping
variable, which is designated ^groupvar^. ^Groupvar^ indicates into which
group each case falls. As output, it generates a set of group ^medoids^,
which are medians of each variable in ^varlist^, and a set of distances,
which indicate how far each case is from each medoid.
Output is as follows:
Let g be the number of levels of ^groupvar^.
Let v be the number of variables in ^varlist^.
MEDij, for i=1,...,g;j=1,...,v:
The median of the ith group on the jth variable.
DISTi, for i=1,...g:
The distance of each case from the ith medoid.
Distance option
---------------
"Distance" is calculated by the Minkowski metric with parameter specified
by the dist(#) option. If you do not specify this option, Euclidean distance
is assumed (#=2). Allowable values are greater than or equal to 1.
Author contact information is in the ado file.