LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (February 1998, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 4 Feb 1998 12:39:33 -0600
Reply-To:     swheeler@MOORMAN.COM
Sender:       "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From:         swheeler@MOORMAN.COM
Organization: Deja News Posting Service
Subject:      Re: grouping obs

Sorry if this is a repeat.

Try using PROC FASTCLUS with MAXCLUSTER= # of stores Radius = 0

Here is an example:

/* Start with 1 observation per store. If necessary, Use PROC TRANSPOSE to form the data set */

Data Stores; Input Store X1-X8; Cards; 1 1 2 3 4 5 6 7 8 2 1 2 3 4 5 6 7 8 3 2 2 3 4 5 6 7 8 4 1 3 4 5 6 7 8 9 5 2 2 3 4 5 6 7 8 6 9 8 7 6 5 4 3 2 7 9 8 7 6 5 4 3 2 8 9 8 7 6 5 4 3 2 9 9 8 7 6 5 4 3 2 ; /* Use PROC FASTCLUS to cluster the stores. SET MAXCLUSTERS = # of Stores RADIUS = 0 you can increase RADIUS if you do not need strict equality see SAS STAT Manual for definition of distance */

PROC FASTCLUS DATA=Stores MAXCLUSTERS=9 radius=0 OUT=clusters; VAR x1-x8; ID Store; RUN;

/* Print output data step you are on your own from here */ PROC SORT DATA=Clusters; BY CLUSTER; RUN;

PROC PRINT data=CLUSTERS; RUN;

Stan Wheeler

In article <19980204060601.BAA27123@ladder02.news.aol.com>, emwalczak@aol.com (EMWalczak) wrote: > > Thanks for the ideas!!! But I don't think I explained the problem very well. > I need to look at store#1 52 weeks of data and see if store#2 has exactly the > same prices over those 52 weeks. > but if store #2 doesnt maybe store#3 looks like store #1 and Store #2 looks > like store #4 etc..... I have 800+ stores that I want to look at over 52 weeks, > does that make more sense? I was thinking proc cluster might do the trick, > but have no clue on that proc! > > I need to group these 800+ stores in to different groups based on their 52 week > spending trends. > > Any help would be great, I hate the idea of going thru this 2 stores at a time! > Thanks, > Ellen

-------------------==== Posted via Deja News ====----------------------- http://www.dejanews.com/ Search, Read, Post to Usenet


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