BookmarkSubscribeRSS Feed
tomtsya
Calcite | Level 5

Hi, 

 

I need to perform hierarchical clustering on a dataset that contains both numeric and categorical variables and then apply the obtained rules to a new dataset

 

step 1: I create a dgower distance data

proc distance data=ABT_hcluster method=dgower out=gower_distance;
var nominal( categorical variables /std=std) interval(numeric variables) ;
id my_ids;
run;

 

step 2: I perform hierarchical clustering

proc cluster data=gower_distance method=Ward outtree=Tree ccc pseudo PLOTS=ALL;
id my_ids;
run;

 

step 3: Draw dendrogram, place observation to 4 clusters.

axis1 order=(0 to 1 by 0.1)

proc tree data=Tree ncl=4 out=tree_out4 haxis=axis1;
height _rsq_;
id KVHX;

run;

 

step 4:

Now I need to apply rules of dendrogram and place new observations into clusters with the rules found above. How do do it? I could not find any outmodel, code or rules statement for proc cluster.

 

Thank you

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 0 replies
  • 1108 views
  • 0 likes
  • 1 in conversation