# Analysis of k-means clustering in r

I have a group of 144 people. I have 3 categorical observations and each of them is described by three variables. After performing a k-means on 3 clusters in r I see that one of the groups, "overt" is clustered together and the other two groups overlap a lot. Moreover when clustering with 2 clusters, the "overt" group again has their own cluster while the other two groups overlap.

My question: Is this enough to conclude that the groups "chemical" and "normal" are statistically the same and the third group is different?

I feel like I didn't really perform any statistical experiment in here. Could anyone give me some hints on how to analyse this correctly? Thanks.

diabetes<-read.csv(file="diabetes1.csv")
set.seed(312)
DIABETES.new = diabetes
DIABETES.new$Class <- NULL DIABETES.standard <- scale(DIABETES.new) results1 <-kmeans(DIABETES.standard, 3) table(diabetes$Class, results1$cluster) # 1 2 3 #Chemical 0 18 18 #Normal 0 11 64 #Overt 20 3 9 results2 <-kmeans(DIABETES.standard, 2) table(diabetes$Class, results2\$cluster)

#         1  2
#Chemical 36  0
#Normal   75  0
#Overt    12 20

• K-means is sensitive to data preprocessing. So you can only say that this applies to your preprocessing. – Anony-Mousse May 1 '18 at 6:45
• Of course I understand that and with this assumption is what I am saying correct? – Patrick May 1 '18 at 12:19
• No. KMeans is not a statistical test. It is a randomized algorithm, it may fail to find patterns and it can produce wrong patterns. – Anony-Mousse May 1 '18 at 22:56