For the SAS cluster procedure, how to define the number of clusters as cluster output? For example, if I want to have 3 clusters after clustering:
cluster method = eml data = dateset outtree = output ;
by column1 ;
var net_sales ;
run ;
What changes I need to make to enforce the above cluster procedure only generating 3 clusters? Thank you.
PROC CLUSTER requires more work to do. Why do not you use PROC FASTCLUSTER and use the maxc= option in it. Also you can added it to a macro to try different number of cluster.
But if you still need to use PROC CLUSTER you can use PROC TREE after it and use nclusters= option to choose the number of cluster. Here is a good example of using PROC CLUSTER and PROC TREE. Example 91.1 Mammals’ Teeth
PROC CLUSTER requires more work to do. Why do not you use PROC FASTCLUSTER and use the maxc= option in it. Also you can added it to a macro to try different number of cluster.
But if you still need to use PROC CLUSTER you can use PROC TREE after it and use nclusters= option to choose the number of cluster. Here is a good example of using PROC CLUSTER and PROC TREE. Example 91.1 Mammals’ Teeth
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.
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.