Hello,
I am using k-means clustering to partition observations into clusters, based on a number of similar variables. I have done lots of reading on different ways of determining an appropriate number of clusters in the data, so my question does not concern that. I have settled on assessing a number of cluster options and comparing them against one another to determine the optimal solution. So, I plan to run the cluster analysis with 2, 3, 4, 5, etc. clusters and compare the sum of squared distances between the members and the centroids. Then I plan to choose the option at which the squared distances or sums of squared error stop substantially decreasing.
I am fairly unfamiliar with the cluster kmeans function in Stata, so I don't know how to get these statistics. So, my question is: how can I get the sum of squared distances from the cluster centers or the sums of squared error in Stata?
I decided to post here, as I usually get such great insight from users, so I would appreciate any help. Thank you in advance.
- JC7821
I am using k-means clustering to partition observations into clusters, based on a number of similar variables. I have done lots of reading on different ways of determining an appropriate number of clusters in the data, so my question does not concern that. I have settled on assessing a number of cluster options and comparing them against one another to determine the optimal solution. So, I plan to run the cluster analysis with 2, 3, 4, 5, etc. clusters and compare the sum of squared distances between the members and the centroids. Then I plan to choose the option at which the squared distances or sums of squared error stop substantially decreasing.
I am fairly unfamiliar with the cluster kmeans function in Stata, so I don't know how to get these statistics. So, my question is: how can I get the sum of squared distances from the cluster centers or the sums of squared error in Stata?
I decided to post here, as I usually get such great insight from users, so I would appreciate any help. Thank you in advance.
- JC7821
Comment