BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
wutao9999
Obsidian | Level 7

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.

1 ACCEPTED SOLUTION

Accepted Solutions
mohamed_zaki
Barite | Level 11

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

View solution in original post

1 REPLY 1
mohamed_zaki
Barite | Level 11

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

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is Bayesian Analysis?

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 1618 views
  • 0 likes
  • 2 in conversation