Hi. I am doing a Cluster analysis. I ended up doing Hierarchial Clustering by
Wards method for my binary(dichotomous) variables dataset.
I would like to know how I can get a scatter plot showing the three clusters
neatly in different symbols and colors. I am struggling with this. Can you
please help me.
Thanks
PNS
Could this help you?
SYMBOL1 V=circle C=black;
SYMBOL2 V=star C=red;
SYMBOL3 V=diamond C=blue;
proc gplot data=test;
plot var2*var1=Cluster;
run;
More info about symbol statement on:
Hello
I tried doing this, but I need a cluster plot with all the 33 variables shown across the plot on three different clusters. I have no idea how I should be plotting this. ? Could someone help?
Thanks
With binary data, assuming no missing values, all you can show is the number of observations having each variable's state in every cluster, i.e. the strength or importance of each variable in the clusters. You could do this with three horizontal bar graphs side by side. Something along the lines of:
/* Assuming dataset myData contains variables
id: unique observation id,
clusId: cluster to which the observation belongs,
v1 to v33: dichotomous variables with values 0 or 1 */
proc sort data=myData; by clusId id; run;proc transpose data=myData out=myTData name=myVariable;
var v1--v33;
by clusId id;
run;ods graphics on;
proc sgpanel data=myTData;
panelby clusId / layout=columnlattice;
hbar myVariable / response=col1 stat=sum;
run;
Good luck.
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.
Use this tutorial as a handy guide to weigh the pros and cons of these commonly used machine learning algorithms.
Find more tutorials on the SAS Users YouTube channel.