LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (July 2005, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 11 Jul 2005 13:08:44 -0400
Reply-To:     Talbot Michael Katz <topkatz@MSN.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Talbot Michael Katz <topkatz@MSN.COM>
Subject:      Re: Cluster analysis: Mahalabonis distance
Comments: To: i.m.boerefijn@HOME.NL

Hi, Irene.

So it looks like you want to use pairwise Mahalanobis distances to compute your clusters with. PROC CLUSTER will accept either raw or distance matrix data as input, so if you compute the Mahalanobis distances beforehand, you can feed them directly into PROC CLUSTER. I don't know of a canned procedure or macro that will compute the pairwise matrix for you on a whole data set, although you might be able to adapt the macro from the SUGI paper I referenced in my original reply. But this is why I suggested you look into PROC ACECLUS, because you might want to feed the output of PROC ACECLUS into one of the clustering procedures (CLUSTER, FASTCLUS, MODECLUS); I believe that the Euclidean distances between the canonical variables it computes will look like the Mahalanobis distances between the original variables (but I don't promise that to be the case). SAS also provides a macro, %DISTANCE, in the SAS/STAT sample library (probably in a file called DISTNEW.SAS) that computes many different types of distance matrices (although not, unfortunately, Mahalanobis).

-- TMK -- "The Macro Klutz"

On Mon, 11 Jul 2005 18:48:21 +0200, I.M. Boerefijn <i.m.boerefijn@HOME.NL> wrote:

>Hello, > >thanks for your quick response! I'm not sure if I was specific enough. To >make it clear I've put an print screen of SPSS on-line: >http://stuwww.uvt.nl/~s803626/SPSSprintscreen.htm > >You can see the interval measure Squared Euclidean Distance is selected at >the moment. But instead of that measure, I want to use the Mahalanobis >distance. SPSS does not provide that. > >The reason why I want it, is that there is multicollinearity among the >variables I use for the Cluster Analysis. > >Irene > > > >"Talbot Michael Katz" <topkatz@MSN.COM> schreef in bericht >news:200507111529.j6BFTwZu030508@listserv.cc.uga.edu... >> Hi, Irene. >> >> Yes, you can compute Mahalanobis distances (note the spelling) for >> clusters in SAS. You have several options. There is a SUGI paper that >> presents a macro to compute the distance between two groups, and gives >> confidence intervals, ("A Macro for Computing Point Estimates and >> Confidence Intervals for Mahalanobis Distance," >> http://www2.sas.com/proceedings/sugi30/163-30.pdf); it requires the use of >> SAS/IML. After using one of the clustering procedures in SAS/STAT (e.g., >> PROC CLUSTER, PROC FASTCLUS), you can obtain Mahalanobis distances between >> clusters (as well as F values and p values) from PROC DISCRIM and PROC >> CANDISC. >> >> If you want to produce a pairwise distance matrix for conducting cluster >> analysis, you might have to program it yourself, but before you do that, >> look into PROC ACECLUS. It uses Mahalanobis distance to produce canonical >> variables that you can use as input to the cluster procedures in SAS, so >> that may be what you want. >> >> Good luck! >> >> -- TMK -- >> "The Macro Klutz" >> >> >> On Mon, 11 Jul 2005 15:53:07 +0200, I.M. Boerefijn <i.m.boerefijn@HOME.NL> >> wrote: >> >> >Hello, >> > >> >I am a user of SPSS. But I encountered a problem with that program. The >> >Mahalabonis Distance measure is not included for Cluster Analysis. I was >> >wondering if SAS includes this distance measure for conducting Cluster >> >analysis? >> > >> >Thanks in advance, >> > >> >Irene


Back to: Top of message | Previous page | Main SAS-L page