# how to complement the results of cluster analysis with known groups

I have some prior knowledge of grouping, but this may be incorrect or is not sufficient as I need larger number of groups (i.e. subgroups). For example in the following data I have 3 groups in addition to two variables. I would like to use the group information (as prior knowledge) (here 3 groups) to create meaningful groups (here 9 groups/clusters). Is there a correct way to perform such analysis.

# Dummy data
group <- rep(1:3, each =3000)
X <- c(rnorm(1000, 0.1, 0.04), rnorm(1000,0.2, 0.04), rnorm(1000, 0.4, 0.02),
rnorm(1000, 0.4, 0.04), rnorm(1000,0.5, 0.08), rnorm(1000, 0.6, 0.12),
rnorm(1000, 0.7, 0.08), rnorm(1000,0.8, 0.1), rnorm(1000, 0.9, 0.06)
)

Y <-  c(rnorm(1000, 0.5, 0.04), rnorm(1000,0.6, 0.04), rnorm(1000, 0.7, 0.04),
rnorm(1000, 0.35, 0.12), rnorm(1000,0.45, 0.04), rnorm(1000, 0.3, 0.02),
rnorm(1000, 0.55, 0.09), rnorm(1000,0.65, 0.12), rnorm(1000, 0.65, 0.04)
)


Prior information of 3 clusters:

col = c("red", "cyan", "green")
plot(cbind(X,Y), col = col[group], pch = ".")


Clustering analysis assuming 9 clusters.

cl <- kmeans(cbind(X,Y), 9)

colrs <- c("red","purple", "yellow", "tan", "pink", "cyan", "blue", "green", "black")
plot(cbind(X,Y), col = colrs[cl\$cluster], pch = ".")


• You are looking for a formal test of the existence of 9 distinct clusters when data are assessed in 2 dimensions. Is that right? – rolando2 Aug 5 '14 at 0:49
• I am trying use the prior cluster information (i.e. group ) in my hand in cluster analysis (posterior information) - the cluster can be any number. Assumtion here is that prior cluster information can guide the clustering particularly in a confusion situation – rdorlearn Aug 5 '14 at 1:07