Hi all,
I have analysed the correlation between two variables: hp and cyl and i'm writing a code for cluster analysis for the same varibles but ending up with error, need help. The code is:
proc corr data=rank_mtcars out=cluster_mtcars; /*Here rank_mtcars is a predefined dataset*/
var hp cyl;run;
proc cluster data= cluster_mtcars method=centroid rmsstd
outtree=cluster_mtcars;
var cyl hp;run;
PROC CLUSTER documentation explains the common ways to do this:
Don't you want to do the clustering on the original data set rank_mtcars? It doesn't make sense to me to cluster the correlation matrix.
Thanks Sir.
One more question: After clustering i got the output as dendogram.
How to obtain the optimum number of clusters from the dendogram?
PROC CLUSTER documentation explains the common ways to do this:
Thanks Sir..!!
BTW, Maybe you need 1-rho to make CORR matrix looks like Distance matrix .
Hi,
Can you please provide me dataset rank_mtcars. I am not able to find it anywhere.
Thanks!!
Vijay
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.
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.