[R] calculating distances using Gower's coefficient on mixed variables.

Martin Maechler maechler at stat.math.ethz.ch
Tue Sep 27 09:10:05 CEST 2005


>>>>> "nikonia" == nikonia  <nikonia at duckmail.nl>
>>>>>     on Mon, 26 Sep 2005 12:15:55 +0200 writes:

    nikonia> I want to compute the distances in a mixed variable
    nikonia> matrix using the Gower coefficient. I understand it
    nikonia> is possible to calculate distances in a matrix with
    nikonia> mixed variables using the dudi.pco command. How
    nikonia> would this work?

No need for esoteric functions.  The recommended(*) package
'cluster' has  daisy() for computing dissimilarities.
One of its major features has always been the ability to work with
mixed variables (continuous, nominal, ordinal, .. (a)symmetric binary,...)
implementing a slight generalization of Gower's proposal.

Even though the help for daisy starts its 'Details' section with

 >> 'daisy' is fully described in chapter 1 of Kaufman and Rousseeuw (1990).

I think I should add some more details to the help page when I
get time..

Martin Maechler, ETH Zurich

(*) recommended packages are always available by library(<pkg>) 
    in a normal R installation.




More information about the R-help mailing list