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

From: Martin Maechler <>
Date: Tue 27 Sep 2005 - 17:10:05 EST

>>>>> "nikonia" == nikonia <> >>>>> 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. mailing list PLEASE do read the posting guide! Received on Tue Sep 27 17:17:07 2005

This archive was generated by hypermail 2.1.8 : Sun 23 Oct 2005 - 17:46:20 EST