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
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.