Calculates similarity and dissimilarity measures - ------------------------------------------------
^distan^ varlist^, st^andar ^di^stan^(^distance-measure^)^ ^av^erage ^sa^ve^(^filename^)^
Description - -----------
^distan^ calculates similarity and dissimilarity measures between observations
Options - -------
^st^andar standarizes the variables in ^varlist^.
^di^stan^(^distance-measure^)^. Euclidian distance is used as default. The following measures are allowed:
^co^variance: covariance between observations.
^cor^relation: correlation coefficient between observations.
^ma^nhattan: Manhattan distance between observations.
^mi^nkowski^[^n^]^: Minkowski metrics of dimension ^n^. Euclidian and Manhattan distances are particular cases of dimension 2 and 1 respectively.
^average^ calculates mean distances if Manhattan, Euclidian or Minkowski distances are specified. This option is specially useful if missing values are present in the original dataset.
^sa^ve^(^filename^)^ saves the results to ^filename^
Remarks - -------
Saved output contains three variables: ^elem1^, ^elem2^ and ^distan^. The first two identify the observation numbers of the original dataset for which the distance ^distan^ was calculated.
Examples - --------
. ^distan x y z, st^ . ^distan x y z, di(mi[3.2]) av sa(c:\dist.dta)^ . ^distan x y z, di(cor)^
Author - ------
Jose Maria Sanchez Saez