BookmarkSubscribeRSS Feed
koomalkc
Fluorite | Level 6

For large dataset, how PROC CLUSTER is use to get initial seeds that got feed into PROC FASTCLUS. Someone please help me to understand the concept with sample code and dataset (or may be other way around, first getting the cluster seeds from PROC FASTCLUS and feed into PROC CLUSTER).

3 REPLIES 3
BeverlyBrown
Community Manager

I've moved your inquiry into the Statistical Procedures Community where it will get more visibility with experts who can help. Thank you for visiting SAS Online Communities!

SAS Innovate 2025 call for content is open through Mon., Sept. 16. Submit your presentation idea today!

PGStats
Opal | Level 21

PROC FASTCLUS can feed small clusters to be grouped by PROC CLUSTER in the following way (adapted from an example in SAS doc) :

/* find a set of 12 clusters with fast method */

proc fastclus data=sashelp.heart(where=(sex="Male")) maxclusters=12

    out=heartClust outseed=heartMeans cluster=fastClusterId;

var height weight Diastolic Systolic MRW Cholesterol;

run;

/* Group the small clusters into larger clusters */

proc cluster data=heartMeans method=average out=heartClusters;

var height weight Diastolic Systolic MRW Cholesterol;

copy fastClusterId;

run;

/* Keep the cluster grouping with three groups */

proc tree noprint ncl=3 data=heartClusters out=heartWardClust;

copy height weight Diastolic Systolic MRW Cholesterol fastClusterId;

run;

/* Assemble the datasets */

proc sort data=heartWardClust;

by fastClusterId;

run;

proc sort data=heartClust;

by fastClusterId;

run;

data clus;

merge heartWardClust heartClust;

by fastClusterId;

run;

/* Plot the clusters against two of the variables */

ods listing style=htmlblue;

proc sgplot data=clus;

scatter x=weight y=Cholesterol /

    group=CLUSTER transparency=0.2 markerattrs=(symbol=circlefilled);

run;

PG

PG
koomalkc
Fluorite | Level 6

Thanks PG!, I really appreciate this.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 2084 views
  • 0 likes
  • 3 in conversation