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!

Learn from the Experts! Check out the huge catalog of free sessions in the Ask the Expert webinar series.
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: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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
  • 2120 views
  • 0 likes
  • 3 in conversation