06-12-2017 12:50 PM
I am using PROC CLUSTER , ward method to cluster countries (N=214). After I consider CCC to select appropriate number of cluster, I would like to create a new column telling which cluster each country is in. What is the code (or where to click) for creating such variable as a new column in data set? Thank you.
06-12-2017 02:07 PM
You might try sharing the code you are using.
Note the PROC Cluster by default creates relationship trees of values.
Perhaps you want to look at Proc FASTCLUS as that generally assigns each value to a single cluster.
06-12-2017 03:09 PM
Below are the steps to create a cluster variable:
/* wards method cluster analysis */
proc cluster data=have method=ward outtree=tree ccc ;
var a b c;
/* PROC TREE prints the tree diagram, also output a data set, called "want" that contains variable containing four clusters --- */
proc tree data=tree out=want nclusters=4;