10-01-2017 03:08 PM
Hi, first off, I am new to cluster analysis and am still learning the appropriate methods to emply. I am trying to divide a variable ("condition") with 300 levels into clusters based on 1 numberical/continuous variable ("active_score"). Using proc cluster to start (code below) I am seeing that the y-axis of the dendrogram is unreadable as the labels are all on top of eachother (dendrogram image attached). I was trying to find a way to space out the labels but unsuccessfully.. any ideas? It also might just be that proc cluster is not the best way to go (proc fastclus or proc varclus?) Again, I'm learning so might need to move to another procedure but still wondering if I can make it work to be able to adjust the y-axis to see what I have. I'm using SAS 9.4. Thank you in advance!!
Proc cluster simple method=centroid rmsstd rsquare nonorm out=tree plots(maxpoints=1000);
proc tree out=cluster nclusters=5 inc=10 ;
proc sort; by cluster;
proc print; by cluster;
var condition active_score;
10-01-2017 05:29 PM
plots=dendrogram suboptions do what you want
10-01-2017 06:36 PM - edited 10-01-2017 06:56 PM
thank you so much for your reply! I tried the below but it isn't working; nothing changed in the display.
Here is what I tried: I reviewed the computeheight option and tried increasing by a factor of 3 to start(?) and changed the unit to inches. Seems I'm missapplying the suboptions, but not sure what is wrong. I tried searching for an example that applied these suboptions and couldn't find one. Any suggestions for me? Thank you again very much!
Proc cluster simple method=centroid rmsstd rsquare nonorm out=tree plots(maxpoints=1000)
plots=dendrogram(unit=in computeheight=3.12 .375) ;
10-01-2017 07:11 PM
proc cluster data=sashelp.mileages(type=distance) method=density k=3 plots=dendrogram(ch=3 5 unit=in); id City; run;
I just tried the option and it affects the size for me.
10-02-2017 11:16 AM - edited 10-02-2017 11:17 AM
Ah- great to know it does in fact work. I tried the plots=dendrogram(ch=3 5 unit=in) option and am seeing the attached (a blank graph; ods graphics are on. I am in SAS enterprise 9.4) so maybe it's something with my data (too many levels to the id var?) I will continue to try some different sub-options and explore different methods as well.
thank you again!
10-02-2017 01:31 PM
I just tried this and it made a really big graph.
data x; array x; do i = 1 to 10 * dim(x); do j = 1 to dim(x); x[j] = uniform(368); end; output; end; run; ods html body='b.html'; ods graphics on; proc cluster plots(only maxpoints=5000) = dendrogram(unit=in sh=100) method=ward; ods select dendrogram; run; ods html close;