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!

Register now for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.

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-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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