Skip to content

calculating distances using Gower's coefficient on mixed variables.

2 messages · nikonia, Martin Maechler

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

Jorine
#
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.