I have a dataset like:
id color body eyes 1 A blue slim green 2 B black fat blue 3 A black slim black 4 C green slim blue 5 D black medim black
whereas each id represents an individual with his individual physical characteristics.
structure(list(id = structure(c(1L, 2L, 1L, 3L, 4L), .Label = c("A", "B", "C", "D"), class = "factor"), color = structure(c(2L, 1L, 1L, 3L, 1L), .Label = c("black", "blue", "green"), class = "factor"), body = structure(c(3L, 1L, 3L, 3L, 2L), .Label = c("fat", "medim", "slim"), class = "factor"), eyes = structure(c(3L, 2L, 1L, 2L, 1L), .Label = c("black", "blue", "green"), class = "factor")), .Names = c("id", "color", "body", "eyes"), class = "data.frame", row.names = c(NA, -5L))
Then number of the characteristics is fixed (color: blue/black/green, body: slim/fat/medium, eyes: green/blue/black).
My aim is to cluster those individuals.
My conceptual question regards the approach:
A simple correlation could be a first step. A question could be: how the combination of these characteristic is likely to appear in groups of individuals?
- A more complicated approach. Maybe k-means clustering. How can address this given that these are categorical variables? should I convert them into dummies?
I'm new to this kind of analysis and any hint/reference to the implementation in R is highly appreciated! Thanks